diff options
author | Joerg Schirottke <master@kanotix.com> | 2017-03-19 10:59:58 +0100 |
---|---|---|
committer | Holger Paradies <retabell@gmx.de> | 2017-11-02 21:27:49 +0100 |
commit | 6cf6a6fa203d2bbb9bb51fbe58ab7d4914dd2c45 (patch) | |
tree | 59c0cc00721381847390945ac92b24187162cc82 | |
parent | eae9ad825a87a5cb8a6843ccf8bce40808b0019a (diff) | |
download | kanotix-6cf6a6fa203d2bbb9bb51fbe58ab7d4914dd2c45.zip kanotix-6cf6a6fa203d2bbb9bb51fbe58ab7d4914dd2c45.tar.gz |
grub: add search iso in grub.cfg
-rw-r--r-- | config/binary_grub/grub.cfg | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/config/binary_grub/grub.cfg b/config/binary_grub/grub.cfg index ead8e6c..d3b55ba 100644 --- a/config/binary_grub/grub.cfg +++ b/config/binary_grub/grub.cfg @@ -4,6 +4,8 @@ set timeout=8 set boot_en='boot=live config utc=yes locales=en_US.UTF-8' set boot_de='boot=live config utc=no timezone=Europe/Berlin locales=de_DE.UTF-8,en_US.UTF-8 keyboard-layouts=de keyboard-variants=nodeadkeys' +set search_file='kanotix*.iso' +set isofile='' if loadfont /boot/grub/unicode.pf2 ; then set gfxmode=800x600 @@ -96,6 +98,40 @@ menuentry 'Start Kanotix EN (failsafe)' { initrd /live/initrd.img } +insmod regexp + +menuentry "Suche Kanotix DE ISO" { +for isofile in (*)/*/ISO/$search_file (*)/ISO/$search_file (*)/*/Downloads/$search_file (*)/Downloads/$search_file (*)/$search_file; do + if [ -e "$isofile" ]; then + regexp --set=device '(\(.*\))' "$isofile" + regexp --set=image '\(.*\)/(.*)' "$isofile" + menuentry "Boot $isofile" "$device" "$image" { + set root="$2" + set image="$3" + loopback iso /$image + linux (iso)/live/vmlinuz findiso=$image $boot_de quiet gfx=auto + initrd (iso)/live/initrd.img + } + fi +done +} + +menuentry "Search Kanotix EN ISO" { +for isofile in (*)/*/ISO/$search_file (*)/ISO/$search_file (*)/*/Downloads/$search_file (*)/Downloads/$search_file (*)/$search_file; do + if [ -e "$isofile" ]; then + regexp --set=device '(\(.*\))' "$isofile" + regexp --set=image '\(.*\)/(.*)' "$isofile" + menuentry "Boot $isofile" "$device" "$image" { + set root="$2" + set image="$3" + loopback iso /$image + linux (iso)/live/vmlinuz findiso=$image $boot_en quiet gfx=auto + initrd (iso)/live/initrd.img + } + fi +done +} + ##### if [ $efi != 1 ] ; then @@ -142,4 +178,3 @@ else fi done fi - |