Fix going back to GNU GRUB from ldbsd.com via alternative boot method; while here...
authorThorsten Glaser <tg@mirbsd.org>
Thu, 13 Aug 2009 14:43:42 +0000 (14:43 +0000)
committerMichael Prokop <mika@grml.org>
Sun, 16 Aug 2009 23:28:01 +0000 (01:28 +0200)
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
debian/changelog
grml-live
templates/boot/addons/bsd4grml/boot.6
templates/boot/grub/grub.cfg
templates/boot/grub/menu.lst

index ccead66..bfb6039 100644 (file)
@@ -56,9 +56,11 @@ grml-live (0.9.21) UNRELEASED; urgency=low
   [ Thorsten Glaser ]
   * Update MirOS bsd4grml to 20090812 and sync menu.lst, grub.cfg,
     isolinux.cfg, syslinux.cfg with each other; provide a fallback
   [ Thorsten Glaser ]
   * Update MirOS bsd4grml to 20090812 and sync menu.lst, grub.cfg,
     isolinux.cfg, syslinux.cfg with each other; provide a fallback
-    way to boot MirOS bsd4grml from both GRUB versions using modules
+    way to boot MirOS bsd4grml from both GRUB versions using modules.
+  * Fix going back to GNU GRUB from ldbsd.com via alternative boot method;
+    while here, add the grml release info to the appropriate file.
 
 
- -- Michael Prokop <mika@grml.org>  Mon, 17 Aug 2009 01:10:02 +0200
+ -- Michael Prokop <mika@grml.org>  Mon, 17 Aug 2009 01:27:06 +0200
 
 grml-live (0.9.20) unstable; urgency=low
 
 
 grml-live (0.9.20) unstable; urgency=low
 
index cb0c0f9..6198546 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -744,17 +744,17 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
       fi
 
       # jump back to grub from bsd4grml:
       fi
 
       # jump back to grub from bsd4grml:
+      if [ -e "$BUILD_OUTPUT"/boot/grub/stage2 ]; then
+         GRUB_LEGACY=stage2
+      else
+         GRUB_LEGACY=stage2_eltorito
+      fi
       if [ -e "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 ]; then
          if [ -e "$BUILD_OUTPUT"/boot/grub/core.img ]; then
             GRUB_VERSION=2
          else
             GRUB_VERSION=1
          fi
       if [ -e "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 ]; then
          if [ -e "$BUILD_OUTPUT"/boot/grub/core.img ]; then
             GRUB_VERSION=2
          else
             GRUB_VERSION=1
          fi
-         if [ -e "$BUILD_OUTPUT"/boot/grub/stage2 ]; then
-            GRUB_LEGACY=stage2
-         else
-            GRUB_LEGACY=stage2_eltorito
-         fi
 
          # why not ed(1)?
          for file in "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 \
 
          # why not ed(1)?
          for file in "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 \
@@ -762,6 +762,15 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
              sed -i -e "s!%GRUB_VERSION%!$GRUB_VERSION!g" \
                     -e "s!%GRUB_LEGACY%!$GRUB_LEGACY!g" "$file"
          done
              sed -i -e "s!%GRUB_VERSION%!$GRUB_VERSION!g" \
                     -e "s!%GRUB_LEGACY%!$GRUB_LEGACY!g" "$file"
          done
+
+         sed -i "s/%RELEASE_INFO%/$GRML_NAME $VERSION - $RELEASENAME/" "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6
+      fi
+      if [ -e "$BUILD_OUTPUT"/boot/grub/$GRUB_LEGACY ]; then
+         sed -i "s/%GRUB_LEGACY%/$GRUB_LEGACY/g" "$BUILD_OUTPUT"/boot/grub/menu.lst
+         sed -i "s/%GRUB_LEGACY%/$GRUB_LEGACY/g" "$BUILD_OUTPUT"/boot/grub/grub.cfg
+      else
+         sed -i "/%GRUB_LEGACY%/d" "$BUILD_OUTPUT"/boot/grub/menu.lst
+         sed -i "/%GRUB_LEGACY%/d" "$BUILD_OUTPUT"/boot/grub/grub.cfg
       fi
 
       # autostart for Windows:
       fi
 
       # autostart for Windows:
index 65904c6..344befc 100644 (file)
@@ -1,7 +1,8 @@
-# $MirOS: src/distrib/common/grml/boot.6,v 1.2 2009/06/29 18:19:00 tg Exp $
+# $MirOS: src/distrib/common/grml/boot.6,v 1.3 2009/08/13 14:34:01 tg Exp $
 #
 echo
 #
 echo
-echo Switching to GNU GRUB %GRUB_VERSION%
+echo Switching to GNU GRUB %GRUB_VERSION% for booting
+echo into %RELEASE_INFO%
 echo
 macro grub1 machine exec grub /boot/grub/%GRUB_LEGACY%
 macro grub2 machine exec grub /boot/grub/core.img
 echo
 macro grub1 machine exec grub /boot/grub/%GRUB_LEGACY%
 macro grub2 machine exec grub /boot/grub/core.img
index 47dbb1c..4602c1a 100644 (file)
@@ -51,6 +51,8 @@ menuentry "MirOS bsd4grml (fallback method)" {
     module      /boot/addons/bsd4grml/boot.5
     module      /boot/addons/bsd4grml/boot.6
     module      /boot/addons/bsd4grml/boot.cfg
     module      /boot/addons/bsd4grml/boot.5
     module      /boot/addons/bsd4grml/boot.6
     module      /boot/addons/bsd4grml/boot.cfg
+    module      /boot/grub/%GRUB_LEGACY%
+    module      /boot/grub/core.img
 }
 
 menuentry "Boot OS of first partition on first disk" {
 }
 
 menuentry "Boot OS of first partition on first disk" {
index cf8902c..3729964 100644 (file)
@@ -75,6 +75,8 @@ module /boot/addons/bsd4grml/boot.4
 module /boot/addons/bsd4grml/boot.5
 module /boot/addons/bsd4grml/boot.6
 module /boot/addons/bsd4grml/boot.cfg
 module /boot/addons/bsd4grml/boot.5
 module /boot/addons/bsd4grml/boot.6
 module /boot/addons/bsd4grml/boot.cfg
+module /boot/grub/%GRUB_LEGACY%
+module /boot/grub/core.img
 
 # title %GRML_NAME% %VERSION% - old boot method
 # kernel /boot/%GRML_NAME%/linux26 ramdisk_size=100000 init=/etc/init apm=power-off lang=us vga=791 nomce quiet grml_dir="live" grml_name="grml.squashfs"
 
 # title %GRML_NAME% %VERSION% - old boot method
 # kernel /boot/%GRML_NAME%/linux26 ramdisk_size=100000 init=/etc/init apm=power-off lang=us vga=791 nomce quiet grml_dir="live" grml_name="grml.squashfs"