From 247c1e253bc2e5ae05bf0b3899d7700b18d50631 Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Thu, 13 Aug 2009 14:43:42 +0000 Subject: [PATCH] Fix going back to GNU GRUB from ldbsd.com via alternative boot method; while here, add the grml release info to the appropriate file Signed-off-by: Thorsten Glaser --- debian/changelog | 6 ++++-- grml-live | 19 ++++++++++++++----- templates/boot/addons/bsd4grml/boot.6 | 5 +++-- templates/boot/grub/grub.cfg | 2 ++ templates/boot/grub/menu.lst | 2 ++ 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index ccead66..bfb6039 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 - 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 Mon, 17 Aug 2009 01:10:02 +0200 + -- Michael Prokop Mon, 17 Aug 2009 01:27:06 +0200 grml-live (0.9.20) unstable; urgency=low diff --git a/grml-live b/grml-live index cb0c0f9..6198546 100755 --- a/grml-live +++ b/grml-live @@ -744,17 +744,17 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then 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/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 \ @@ -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 "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: diff --git a/templates/boot/addons/bsd4grml/boot.6 b/templates/boot/addons/bsd4grml/boot.6 index 65904c6..344befc 100644 --- a/templates/boot/addons/bsd4grml/boot.6 +++ b/templates/boot/addons/bsd4grml/boot.6 @@ -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 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 diff --git a/templates/boot/grub/grub.cfg b/templates/boot/grub/grub.cfg index 47dbb1c..4602c1a 100644 --- a/templates/boot/grub/grub.cfg +++ b/templates/boot/grub/grub.cfg @@ -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/grub/%GRUB_LEGACY% + module /boot/grub/core.img } menuentry "Boot OS of first partition on first disk" { diff --git a/templates/boot/grub/menu.lst b/templates/boot/grub/menu.lst index cf8902c..3729964 100644 --- a/templates/boot/grub/menu.lst +++ b/templates/boot/grub/menu.lst @@ -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/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" -- 2.1.4