diff --git a/steps/improve/after.sh b/steps/improve/after.sh index 9a3ddb6e..155a7425 100644 --- a/steps/improve/after.sh +++ b/steps/improve/after.sh @@ -14,7 +14,11 @@ if [ "${INTERACTIVE}" = True ]; then fi if [ "${CHROOT}" = False ]; then + # ignore errors due to fstab or swapfile not existing + swapoff -a &> /dev/null || true sync + # sysrq to avoid device busy; then mount to wait for it to finish + echo u > /proc/sysrq_trigger mount -o remount,ro / echo o > /proc/sysrq_trigger # power off fi diff --git a/steps/jump/move_disk.sh b/steps/jump/move_disk.sh index 0818fade..ec721f3b 100755 --- a/steps/jump/move_disk.sh +++ b/steps/jump/move_disk.sh @@ -43,5 +43,6 @@ mkdir -p /rootonly # This doesn't recursively mount - that's why we're able to copy everything over mount --bind / /rootonly cp -ar /rootonly/* /newroot/ +sed -e 's/newroot//' /rootonly/etc/mtab | grep -v 'rootonly' > /newroot/etc/mtab umount /rootonly switch_root /newroot /init