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.
This commit is contained in:
Gábor Stefanik 2024-02-18 17:49:32 +01:00
parent 11d3605b08
commit ee3ab501da
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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