From c4544e04bb533aed2fbbea7eed5e83adac4df434 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 18 Dec 2023 07:58:31 +0000 Subject: 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 --- config/grub/config/grub.cfg | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'config/grub') 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 -- cgit v1.2.1