package: src:grub2 severity: wishlist version: 2.00-22 Hi,
I've been working on a system that allows the user to easily make their own init system selection: http://packages.qa.debian.org/i/init-select.html I've just finished working on a patch for grub (see attached) to support init-select's /etc/default/init conffile. This changes util/grub.d/10_linux.in to put the selected init bootflag in GRUB_CMDLINE_LINUX_DEFAULT. If there is a better approach, please let me know, and I'll try to improve the patch. Best wishes, Mike
diff -Nru grub2-2.00/debian/changelog grub2-2.00/debian/changelog --- grub2-2.00/debian/changelog 2013-12-12 01:24:21.000000000 +0000 +++ grub2-2.00/debian/changelog 2014-01-07 02:13:20.000000000 +0000 @@ -1,3 +1,9 @@ +grub2 (2.00-22gilbert1) UNRELEASED; urgency=medium + + * Process /etc/default/init to set the init boot flag. + + -- Michael Gilbert <mgilb...@debian.org> Tue, 07 Jan 2014 01:35:14 +0000 + grub2 (2.00-22) unstable; urgency=low * Backport from upstream: diff -Nru grub2-2.00/debian/control grub2-2.00/debian/control --- grub2-2.00/debian/control 2013-12-04 15:16:14.000000000 +0000 +++ grub2-2.00/debian/control 2014-01-25 21:57:10.000000000 +0000 @@ -88,6 +88,7 @@ Priority: optional Architecture: any-i386 any-amd64 any-powerpc any-ppc64 any-sparc any-mipsel any-ia64 Depends: grub-common (= ${binary:Version}), dpkg (>= 1.15.4) | install-info, ${shlibs:Depends}, ${misc:Depends} +Recommends: init-select Replaces: grub, grub-legacy, grub-common (<< 1.99-1), grub-pc (<< 2.00-4), grub-ieee1275 (<< 2.00-4), grub-efi (<< 1.99-1), grub-coreboot (<< 2.00-4), grub-linuxbios (<< 1.99-1), grub-efi-ia32 (<< 2.00-4), grub-efi-amd64 (<< 2.00-4), grub-efi-ia64 (<< 2.00-4), grub-ieee1275 (<< 2.00-4), grub-yeeloong (<< 2.00-4) Conflicts: grub (<< 0.97-54), grub-legacy, ${legacy-doc-conflicts} Multi-Arch: foreign diff -Nru grub2-2.00/debian/patches/init-select.patch grub2-2.00/debian/patches/init-select.patch --- grub2-2.00/debian/patches/init-select.patch 1970-01-01 00:00:00.000000000 +0000 +++ grub2-2.00/debian/patches/init-select.patch 2014-01-26 00:13:17.000000000 +0000 @@ -0,0 +1,19 @@ +Description: Process /etc/default/init to set the init boot flag. +Author: Michael Gilbert <mgilb...@debian.org> + +--- a/util/grub.d/10_linux.in 2014-01-25 23:38:25.000000000 +0000 ++++ b/util/grub.d/10_linux.in 2014-01-26 00:12:44.499707086 +0000 +@@ -107,6 +107,13 @@ + done + fi + ++if test -e /sbin/read-init; then ++ GRUB_INIT="$(/sbin/read-init)" ++ if test ! -z "$GRUB_INIT"; then ++ GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT $GRUB_INIT" ++ fi ++fi ++ + linux_entry () + { + os="$1" diff -Nru grub2-2.00/debian/patches/series grub2-2.00/debian/patches/series --- grub2-2.00/debian/patches/series 2013-12-12 01:05:41.000000000 +0000 +++ grub2-2.00/debian/patches/series 2014-01-25 23:38:25.000000000 +0000 @@ -67,3 +67,4 @@ freetype_includes.patch sysfs_partition_start.patch disk_write_non_512_sectors.patch +init-select.patch