5184d02a7c
If the image has an ext filesystem and the zerofree utility is present on the build system then run zerofree. This should make images as compressable as possible which is a nice feature when building compressed qcow2 images. Change-Id: Ia6062c291f7a3f58b85a4f408ecb3d0574c65d53
18 lines
301 B
Bash
Executable File
18 lines
301 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eux
|
|
set -o pipefail
|
|
|
|
sudo apt-get update || true
|
|
sudo apt-get install -y \
|
|
debootstrap \
|
|
inetutils-ping \
|
|
kpartx \
|
|
zerofree \
|
|
qemu-utils || \
|
|
sudo yum -y install \
|
|
debootstrap \
|
|
kpartx \
|
|
zerofree \
|
|
qemu-img
|