Skip to content

Commit

Permalink
Add rootwait to grub command line to fix USB boot failures
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Googulator committed Feb 18, 2024
1 parent 11d3605 commit ee3ab50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion steps/improve/make_bootable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions steps/jump/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ee3ab50

Please sign in to comment.