diff options
Diffstat (limited to 'scripts/build-GCE-image')
-rwxr-xr-x | scripts/build-GCE-image | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/build-GCE-image b/scripts/build-GCE-image index 9986e8dc..90eb6468 100755 --- a/scripts/build-GCE-image +++ b/scripts/build-GCE-image @@ -16,6 +16,9 @@ # Purpose: # Build VyOS image for Google cloud. +apt-get update && apt-get install -y \ + grub-pc grub2-common parted kpartx + lb bootstrap lb chroot @@ -60,6 +63,12 @@ OUTPUTGZ=VyOS-"$dateymd".tar.gz IMAGE_SIZE=10 qemu-img create -f raw ${OUTPUT} ${IMAGE_SIZE}G +LOOPNAME=`losetup -f` +LOOPMINOR=${LOOPNAME//[^0-9]} +if [ ! -e $LOOPNAME ]; then + mknod $LOOPNAME b 7 $LOOPMINOR +fi + ${PARTED} -s ${OUTPUT} mktable msdos ${PARTED} -s -a optimal ${OUTPUT} mkpart primary ext4 1Mi 100% ${PARTED} -s ${OUTPUT} set 1 boot on |