Package: grub-common
Version: 2.02~beta2-11
Severity: normal
Tags: patch
User: [email protected]
Usertags: integration


Hi,

in [1] we laid out the plan how we want to manage the transition to
systemd as the default init on Linux for Jessie.

One aspect of that transition plan, is to make sysvinit a transitional
package (step b/) which provides a fallback /lib/sysvinit/init binary.
So even if systemd is the default init and the /sbin/init binary is
provided by systemd-sysv one can use the init=/lib/sysvinit/init boot
parameter to boot using the old sysvinit system.

This is intended as a fallback mechanism in case the system fails to
boot with systemd so users have a simpler method to recover the system
and examine the failure.

To make this even more straightforward, we suggest that grub provides a
menu entry for that sysvinit fallback.

Attached is patch achieving that.

I think it would be reasonable to drop this feature again in jessie+1 or
jessie+2.


Once this patch has been applied to grub, I sysvinit would have to be
updated to call update-grub in postinst on install|upgrade and postrm
on remove to ensure the menu entry is up-to-date.
Do you have any suggestions regarding the the usage of update-grub?


Your feedback would be most welcome.

Michael


[1] https://lists.debian.org/debian-devel/2014/07/msg00611.html
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 79fa03a..e18ea1a 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -115,6 +115,9 @@ linux_entry ()
       case $type in
 	  recovery)
 	      title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")" ;;
+	  fallback)
+	      title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "sysvinit fallback")")" ;;
+
 	  *)
 	      title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
       esac
@@ -327,6 +330,11 @@ while [ "x$list" != "x" ] ; do
     linux_entry "${OS}" "${version}" simple \
     "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
 
+    if [ -x /lib/sysvinit/init ] && [ "$(readlink /sbin/init)" = /lib/systemd/systemd ]; then
+      linux_entry "${OS}" "${version}" fallback \
+      "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} init=/lib/sysvinit/init"
+    fi
+
     submenu_indentation="$grub_tab"
     
     if [ -z "$boot_device_id" ]; then
_______________________________________________
Pkg-systemd-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to