aboutsummaryrefslogtreecommitdiff
path: root/infra/corenix/modules/grub2/files/grub-scan.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'infra/corenix/modules/grub2/files/grub-scan.cfg')
-rw-r--r--infra/corenix/modules/grub2/files/grub-scan.cfg30
1 files changed, 30 insertions, 0 deletions
diff --git a/infra/corenix/modules/grub2/files/grub-scan.cfg b/infra/corenix/modules/grub2/files/grub-scan.cfg
new file mode 100644
index 000000000000..5aced43ebc3b
--- /dev/null
+++ b/infra/corenix/modules/grub2/files/grub-scan.cfg
@@ -0,0 +1,30 @@
+for x in (ahci*,*) (usb*,*) ; do
+ if [ -f "${x}/netbsd" ] ; then
+ menuentry "Load NetBSD from $x" $x {
+ root=$2
+ knetbsd /netbsd
+ }
+ fi
+ for path in '' /grub /grub2 /boot /boot/grub /boot/grub2 /efi/boot; do
+ if [ -f "${x}${path}/grub.cfg" ] ; then
+ menuentry "Load config from ${x}" $x $path {
+ root=$2
+ configfile "/${3}/grub.cfg"
+ }
+ fi
+ done
+ for path in '' /boot; do
+ if [ -f "${x}${path}/syslinux/syslinux.cfg" ] ; then
+ menuentry "Load syslinux config from ${x}" $x $path {
+ root=$2
+ syslinux_configfile -s "${3}/syslinux/syslinux.cfg"
+ }
+ fi
+ if [ -f "${x}${path}/isolinux/isolinux.cfg" ] ; then
+ menuentry "Load isolinux config from ${x}" $x $path {
+ root=$2
+ syslinux_configfile -i "${3}/isolinux/isolinux.cfg"
+ }
+ fi
+ done
+done