grub.cfg: don't boot linux without a grub.cfg

the fallback code in the main menuentry is
potentially unsafe, depending on user config.

Signed-off-by: Leah Rowe <leah@libreboot.org>
9020vga
Leah Rowe 2023-12-18 06:45:56 +00:00
parent 2d6e5ca4c4
commit b817001e29
1 changed files with 0 additions and 26 deletions

View File

@ -146,32 +146,6 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
try_user_config "${vol}"
done
if [ "${grub_scan_disk}" != "ata" ]; then
# Last resort, if all else fails
set root=ahci0,1
for p in / /boot/; do
if [ -f "${p}vmlinuz" ]; then
linux ${p}vmlinuz root=/dev/sda1 rw
if [ -f "${p}initrd.img" ]; then
initrd ${p}initrd.img
fi
fi
done
fi
if [ "${grub_scan_disk}" != "ahci" ]; then
# Last resort (for setups that use IDE instead of SATA)
set root=ata0,1
for p in / /boot/; do
if [ -f "${p}vmlinuz" ]; then
linux ${p}vmlinuz root=/dev/sda1 rw
if [ -f "${p}initrd.img" ]; then
initrd ${p}initrd.img
fi
fi
done
fi
true # Prevent pager requiring to accept each line instead of whole screen
}