[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SRM] proposed stable update grub-installer



Hi,

I don't have a bug number for this, but a friend of mine (CCed) is
running into this as a problem for Debian users at his colo facility:
they're using Xen and their PV-GRUB is set up to read from
/boot/grub/menu.lst, so they need to install GRUB Legacy when installing
the guests.  Unfortunately, the ability to force the use of GRUB Legacy
with preseeding was removed just before the release of squeeze,
apparently by mistake as the purpose of the change in question was to
remove a warning message in expert mode.

The following patch restores this.  I've just uploaded a matching patch
to unstable, and would like to upload this to stable-proposed-updates.

diff --git a/debian/changelog b/debian/changelog
index 8df62c7..733f14a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+grub-installer (1.60+squeeze3) UNRELEASED; urgency=low
+
+  * Restore the ability to choose to install GRUB Legacy by preseeding
+    (grub-installer/grub2_instead_of_grub_legacy=false), removed in 1.60 as
+    a side-effect of removing a warning message.  This is still useful e.g.
+    when installing inside Xen.
+
+ -- Colin Watson <cjwatson@debian.org>  Fri, 23 Sep 2011 10:10:46 +0100
+
 grub-installer (1.60+squeeze2) squeeze; urgency=low
 
   * Upload to drop .git from source tarball
diff --git a/debian/grub-installer.templates b/debian/grub-installer.templates
index e8c73e7..db467a4 100644
--- a/debian/grub-installer.templates
+++ b/debian/grub-installer.templates
@@ -142,6 +142,12 @@ _Description: Unable to configure GRUB
  .
  This is a fatal error.
 
+Template: grub-installer/grub2_instead_of_grub_legacy
+Type: boolean
+Default: true
+Description: for internal use; can be preseeded
+ Set this to false to install GRUB Legacy rather than GRUB 2, if possible.
+
 Template: grub-installer/grub_not_mature_on_this_platform
 Type: boolean
 Default: false
diff --git a/grub-installer b/grub-installer
index 11486f9..b3183b1 100755
--- a/grub-installer
+++ b/grub-installer
@@ -319,9 +319,16 @@ case "$frtype:$bootfstype:$bootfslabel:$grub_package" in
 		grub_package="grub-pc"
 	fi
 	;;
-    *:*:*:grub)
+    *:ext4:*:grub)
+	# We boot from ext4, requires grub2
 	grub_package="grub-pc"
 	;;
+    *:*:*:grub)
+	db_get grub-installer/grub2_instead_of_grub_legacy
+	if [ "$RET" = true ]; then
+		grub_package="grub-pc"
+	fi
+	;;
     *:ufs:*:*)
 	# Booting from UFS requires grub2
 	grub_package="grub-pc"

Thanks,

-- 
Colin Watson                                       [cjwatson@debian.org]


Reply to: