diff options
author | bnjf <bnjf@users.noreply.github.com> | 2019-02-27 10:48:51 +1100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-02-27 06:48:51 +0700 |
commit | f3e356ca7d1bd566a24af7e4616f924daca25edb (patch) | |
tree | ef097d6c110616db5826202084ba51b01b627d22 /scripts | |
parent | 613e4cbb7252fe3eaefe8c3fac57bfb739f8ce5d (diff) | |
download | vyos-build-f3e356ca7d1bd566a24af7e4616f924daca25edb.tar.gz vyos-build-f3e356ca7d1bd566a24af7e4616f924daca25edb.zip |
Update build-GCE-image (#46)
1. enable serial output for grub
2. sync isn't enough, tar was reliably throwing "changed as we read it" on my build box. umount instead to quiesce.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-GCE-image | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/build-GCE-image b/scripts/build-GCE-image index 7684bd43..9e2bcaf5 100755 --- a/scripts/build-GCE-image +++ b/scripts/build-GCE-image @@ -127,6 +127,10 @@ cat > ${MOUNT_DIR}/boot/grub/grub.cfg << EOF set timeout=5 set default=0 +serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1 +terminal_input serial +terminal_output serial + menuentry "VyOS $version (Serial console)" { linux /boot/"$version"/vmlinuz boot=live vyos-union=/boot/"$version" console=tty0 console=ttyS0,38400n8d earlyprintk=ttyS0,38400 consoleblank=0 systemd.show_status=true initrd /boot/"$version"/initrd.img @@ -147,7 +151,9 @@ grub-install --boot-directory ${MOUNT_DIR}/boot --force --no-floppy --skip-fs-p ################### ### HOOK SCRIPT ### ################### -fstrim ${MOUNT_DIR} -sync -tar -Sczf ${OUTPUTGZ} ${OUTPUT} +fstrim ${MOUNT_DIR} +umount ${MOUNT_DIR} && { + tar -Sczf ${OUTPUTGZ} ${OUTPUT} + mount /dev/mapper/${LOOP_DEVICE} ${MOUNT_DIR} +} |