diff options
author | Leah Rowe <leah@libreboot.org> | 2023-12-18 07:58:31 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-12-18 07:58:31 +0000 |
commit | c4544e04bb533aed2fbbea7eed5e83adac4df434 (patch) | |
tree | 524c152825342e01976a848b4c32ba39f13cab9d | |
parent | eaa1341b9e9e124eab299c25bb33c805771182ad (diff) |
grub.cfg: handle extlinux in the default menuentry
isolinux/syslinux/extlinux config files should all work,
using the syslinux parser function in grub
the current behaviour is to only search for grub.cfg,
so extlinux users can't use the default libreboot setup.
with this change, their systems should hopefully work.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | config/grub/config/grub.cfg | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/config/grub/config/grub.cfg b/config/grub/config/grub.cfg index 36b2bc92..60de9ab6 100644 --- a/config/grub/config/grub.cfg +++ b/config/grub/config/grub.cfg @@ -92,13 +92,21 @@ function search_isolinux { done echo # Insert newline } +function try_bootcfg { + try_user_config "${1}" + try_isolinux_config "${1}" +} +function search_bootcfg { + search_grub "${1}" + search_isolinux "${1}" +} menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o' { if [ "${grub_scan_disk}" != "ata" ]; then - search_grub ahci + search_bootcfg ahci fi if [ "${grub_scan_disk}" != "ahci" ]; then - search_grub ata + search_bootcfg ata fi # grub device enumeration is very slow, so checks are hardcoded @@ -113,7 +121,7 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o # TODO: optimize grub itself, and use */? here for everything for vol in ${lvmvol} ${raidvol} ; do - try_user_config "${vol}" + try_bootcfg "${vol}" done unset ahcidev @@ -139,13 +147,13 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o # after cryptomount, lvm volumes might be available for vol in ${lvmvol}; do - try_user_config "${vol}" + try_bootcfg "${vol}" done - search_grub crypto + search_bootcfg crypto for vol in lvm/* ; do - try_user_config "${vol}" + try_bootcfg "${vol}" done true # Prevent pager requiring to accept each line instead of whole screen |