diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-01-26 06:03:56 (EST) |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-01-26 06:03:56 (EST) |
commit | ac9f94aab6e3082977ac7e752c834fcd52178ab2 (patch) | |
tree | 9c707751d98fa0d8d2d17abf8c956d7b281e8c53 /resources/grub/config/menuentries | |
parent | 1e830e02a014a6ac790e97954d1aa65674c28112 (diff) | |
download | libreboot-ac9f94aab6e3082977ac7e752c834fcd52178ab2.zip libreboot-ac9f94aab6e3082977ac7e752c834fcd52178ab2.tar.gz libreboot-ac9f94aab6e3082977ac7e752c834fcd52178ab2.tar.bz2 |
grub.cfg: hardcode the list of partitions to search
For libreboot_grub.cfg or ISOLINUX parsing, the old grub.cfg was
using regexp to automatically search all partitions. For example,
it was using (ahci0,*). This, and the ls, is extremely slow on
some machines. Partition/file access is itself fast, but producing
the list can be slow.
Therefore, use hardcoded entries like ahci0,1-4 (up to 4) or
usb0,1-4 instead of *. This is less flexible, but much faster
and it should still work for most people.
Diffstat (limited to 'resources/grub/config/menuentries')
-rw-r--r-- | resources/grub/config/menuentries/common.cfg | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg index b0a420c..da6968c 100644 --- a/resources/grub/config/menuentries/common.cfg +++ b/resources/grub/config/menuentries/common.cfg @@ -1,9 +1,8 @@ menuentry 'Load Operating System' { - insmod regexp insmod ahci insmod part_msdos insmod part_gpt - for x in (ahci0,*); do + for x in (ahci0,1) (ahci0,2) (ahci0,3) (ahci0,4); do if [ -f "$x/grub/libreboot_grub.cfg" ] ; then set root=$x configfile /grub/libreboot_grub.cfg @@ -21,11 +20,10 @@ menuentry 'Load Operating System' { fi } menuentry 'Parse ISOLINUX menu (USB)' { - insmod regexp insmod usbms insmod part_msdos insmod part_gpt - for x in (usb0) (usb0,*); do + for x in (usb0) (usb0,1) (usb0,2) (usb0,3) (usb0,4); do set root=$x if [ -f "/isolinux/isolinux.cfg" ] ; then syslinux_configfile -i /isolinux/isolinux.cfg @@ -56,12 +54,11 @@ menuentry 'Switch to grubtest.cfg' { configfile (cbfsdisk)/grubtest.cfg } menuentry 'Search for GRUB configuration (grub.cfg) outside of CBFS' { - insmod regexp insmod ahci insmod usbms insmod part_msdos insmod part_gpt - for x in (ahci0,*) (usb0) (usb0,*); do + for x in (ahci0,1) (ahci0,2) (ahci0,3) (ahci0,4) (usb0) (usb0,1) (usb0,2) (usb0,3) (usb0,4); do if [ -f "$x/grub/grub.cfg" ] ; then submenu "Load Config from $x" $x { root=$2 |