summaryrefslogtreecommitdiff
path: root/config/grub/config
diff options
context:
space:
mode:
Diffstat (limited to 'config/grub/config')
-rw-r--r--config/grub/config/grub.cfg45
1 files changed, 38 insertions, 7 deletions
diff --git a/config/grub/config/grub.cfg b/config/grub/config/grub.cfg
index 3bbd2ecc..6b36d90b 100644
--- a/config/grub/config/grub.cfg
+++ b/config/grub/config/grub.cfg
@@ -76,10 +76,20 @@ function search_grub {
echo -n "Attempting to load grub.cfg from '${1}' devices"
for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
- try_user_config "(${1}${i},${part})"
+ if [ "${1}" != "nvme" ]; then
+ try_user_config "(${1}${i},${part})"
+ else
+ # TODO: do we care about other namesapces
+ try_user_config "(nvme${i}n1,${part})"
+ fi
done
- # raw devices e.g. (ahci0) instead of (ahci0,1)
- try_user_config "(${1}${i})"
+ if [ "${1}" != "nvme" ]; then
+ # raw devices e.g. (ahci0) instead of (ahci0,1)
+ try_user_config "(${1}${i})"
+ else
+ # TODO: do we care about other namesapces
+ try_user_config "(nvme${i}n1)"
+ fi
done
echo # Insert newline
}
@@ -102,10 +112,20 @@ function search_isolinux {
echo "\nAttempting to parse iso/sys/extlinux config from '${1}' devices"
for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
- try_isolinux_config "(${1}${i},${part})"
+ if [ "${1}" != "nvme" ]; then
+ try_isolinux_config "(${1}${i},${part})"
+ else
+ # TODO: see above
+ try_isolinux_config "(nvme${i}n1,${part})"
+ fi
done
- # raw devices e.g. (usb0) instead of (usb0,1)
- try_isolinux_config "(${1}${i})"
+ if [ "${1}" != "nvme" ]; then
+ # raw devices e.g. (usb0) instead of (usb0,1)
+ try_isolinux_config "(${1}${i})"
+ else
+ # TODO: do we care about other namesapces
+ try_isolinux_config "(nvme${i}n1)"
+ fi
done
echo # Insert newline
}
@@ -125,6 +145,9 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
if [ "${grub_scan_disk}" != "ahci" ]; then
search_bootcfg ata
fi
+ if [ "${grub_scan_disk}" != "nvme" ]; then
+ search_bootcfg nvme
+ fi
# grub device enumeration is very slow, so checks are hardcoded
@@ -143,6 +166,7 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
unset ahcidev
unset atadev
+ unset nvmedev
for i in 11 10 9 8 7 6 5 4 3 2 1 0; do
for part in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1; do
if [ "${grub_scan_disk}" != "ata" ]; then
@@ -151,6 +175,10 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
if [ "${grub_scan_disk}" != "ahci" ]; then
atadev="(ata${i},${part}) ${atadev}"
fi
+ if [ "${grub_scan_disk}" != "nvme" ]; then
+ # TODO: do we care about other namesapces
+ nvmedev="(nvme${i}n1,${part}) ${nvmedev}"
+ fi
done
done
@@ -185,6 +213,9 @@ menuentry 'Search for GRUB/SYSLINUX/EXTLINUX/ISOLINUX on AHCI [a]' --hotkey='a'
menuentry 'Search for GRUB/SYSLINUX/EXTLINUX/ISOLINUX on ATA/IDE [d]' --hotkey='d' {
search_bootcfg ata
}
+menuentry 'Search for GRUB/SYSLINUX/EXTLINUX/ISOLINUX on NVMe [e]' --hotkey='e' {
+ search_bootcfg nvme
+}
if [ -f (cbfsdisk)/grubtest.cfg ]; then
menuentry 'Load test configuration (grubtest.cfg) inside of CBFS [t]' --hotkey='t' {
set root='(cbfsdisk)'
@@ -246,4 +277,4 @@ submenu 'Other [z]' --hotkey='z' {
menuentry 'Disable spkmodem [z]' --hotkey='z' {
terminal_output --remove spkmodem
}
-} \ No newline at end of file
+}