Support automatic findiso command and fixed gfxpayload handling. Thanks
authorUlrich Dangel <uli@spamt.net>
Fri, 2 Apr 2010 12:05:38 +0000 (14:05 +0200)
committerUlrich Dangel <uli@spamt.net>
Fri, 2 Apr 2010 12:16:46 +0000 (14:16 +0200)
to Jordan Uggla.

Set the variable iso_path in grub before loading grub.cfg to the the
corresponding grml.iso to automatically insert the findiso parameter.

templates/boot/grub/grub.cfg

index 7e115d6..31545bd 100644 (file)
@@ -20,9 +20,13 @@ else
   set menu_color_highlight=black/yellow
 fi
 
+if [ ${iso_path} ] ; then
+    set loopback="findiso=${iso_path}"
+fi
+
 menuentry "%GRML_NAME% - release %VERSION% (default)" {
     set gfxpayload=1024x768
-    linux   /boot/%SHORT_NAME%/linux26 apm=power-off quiet boot=live bootid=%BOOTID% nomce 
+    linux   /boot/%SHORT_NAME%/linux26 apm=power-off quiet boot=live bootid=%BOOTID% "${loopback}" nomce 
     initrd  /boot/%SHORT_NAME%/initrd.gz
 }
 
@@ -69,52 +73,55 @@ menuentry "Boot OS of first partition on first disk" {
 
 menuentry "%GRML_NAME% - enable persistent mode" {
     set gfxpayload=1024x768x16,1024x768
-    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet persistent 
+    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" quiet persistent 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }
 
 menuentry "%GRML_NAME% - copy Grml to RAM" {
     set gfxpayload=1024x768
-    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet toram=%GRML_NAME%.squashfs 
+    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" quiet toram=%GRML_NAME%.squashfs 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }
 
 menuentry "%GRML_NAME% - copy whole medium to RAM" {
     set gfxpayload=1024x768
-    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet toram
+    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" quiet toram 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }
 
 menuentry "%GRML_NAME% - start X by default" {
     set gfxpayload=1024x768
-    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet startx=wm-ng 
+    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" quiet startx=wm-ng 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }
 
 menuentry "%GRML_NAME% - disable framebuffer" {
-    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet vga=normal video=ofonly 
+    set gfxpayload=text
+    linux  /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" quietvideo=ofonly 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }
 
 menuentry "%GRML_NAME% - forensic mode" {
     set gfxpayload=1024x768
-    linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce readonly quiet nofstab noraid nolvm noautoconfig noswap raid=noautodetect 
+    linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" readonly quiet nofstab noraid nolvm noautoconfig noswap raid=noautodetect 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }
 
 menuentry "%GRML_NAME% - failsafe mode" {
-    linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet vga=normal noautoconfig atapicd noapic noacpi acpi=off nomodules nofirewire noudev nousb nohotplug noapm nopcmcia nosmp maxcpus=0 noscsi noagp nodma ide=nodma noswap nofstab nosound nogpm nosyslog nodhcp nocpu nodisc nomodem xmodule=vesa noraid nolvm noresume selinux=0 edd=off 
+    set gfxpayload=text
+    linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" quiet noautoconfig atapicd noapic noacpi acpi=off nomodules nofirewire noudev nousb nohotplug noapm nopcmcia nosmp maxcpus=0 noscsi noagp nodma ide=nodma noswap nofstab nosound nogpm nosyslog nodhcp nocpu nodisc nomodem xmodule=vesa noraid nolvm noresume selinux=0 edd=off 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }
 
 menuentry "%GRML_NAME% - debug mode" {
     set gfxpayload=1024x768
-    linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce initcall verbose debug=vc
+    linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" initcall verbose debug=vc 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }
 
 menuentry "%GRML_NAME% - serial mode" {
-    linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet vga=normal video=vesafb:off console=tty1 console=ttyS0,9600n8 
+    set gfxpayload=text
+    linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce "${loopback}" quiet video=vesafb:off console=tty1 console=ttyS0,9600n8 
     initrd /boot/%SHORT_NAME%/initrd.gz
 }