commit: ee3ab501da30b8a7e8d9d124df4e89b2f2f961a7
parent 11d3605b08a3683347e7473c917025cee44049e3
Author: Gábor Stefanik <netrolller.3d@gmail.com>
Date: Sun, 18 Feb 2024 17:49:32 +0100
Add rootwait to grub command line to fix USB boot failures
Without this, one of my boards fails to reboot from USB drive due to
slow USB enumeration. Rootwait is not needed during the Fiwix -> Linux
jump, because we use an initramfs there, and the init scripts already
wait for USB drives to show up. Linux->Linux kexec, used with a custom
early kernel, might need it, so add it there as well to be safe.
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/steps/improve/make_bootable.sh b/steps/improve/make_bootable.sh
@@ -28,7 +28,7 @@ menuentry 'Linux live-bootstrap' {
insmod part_msdos
set root='$(grub-probe -d /dev/${DISK} -t bios_hints | sed -e 's/ //g')'
set gfxpayload=auto
- linux /boot/vmlinuz root=/dev/${DISK} rw $(cat /proc/cmdline)
+ linux /boot/vmlinuz root=/dev/${DISK} rootwait rw $(cat /proc/cmdline)
}
EOF
diff --git a/steps/jump/linux.sh b/steps/jump/linux.sh
@@ -23,10 +23,10 @@ else
# kexec time
if [ "${BARE_METAL}" = True ]; then
kexec -l "/boot/vmlinuz" \
- --append="root=/dev/sda1 rootfstype=ext3 init=/init rw"
+ --append="root=/dev/sda1 rootfstype=ext3 init=/init rw rootwait"
else
kexec -l "/boot/vmlinuz" --console-serial \
- --append="console=ttyS0 root=/dev/sda1 rootfstype=ext3 init=/init rw"
+ --append="console=ttyS0 root=/dev/sda1 rootfstype=ext3 init=/init rw rootwait"
fi
kexec -e
fi