]> git.ipfire.org Git - thirdparty/grub.git/commit
templates: Add GRUB_CMDLINE_LINUX_RECOVERY
authorChris Vogel <chris@z9.de>
Wed, 15 Sep 2021 15:42:29 +0000 (17:42 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 20 Sep 2021 11:52:55 +0000 (13:52 +0200)
commit0e5889b98ac202e0aadf04f4115a810304578219
treea63954fb1cbd649bbab68a15a5e7f34dbb383eeb
parentd307db1e7587aa448d843eb1e76cca5bc0e6ee69
templates: Add GRUB_CMDLINE_LINUX_RECOVERY

When generating grub.cfg using grub-mkconfig and the scripts 10_linux and
20_linux_xen there is no way to add kernel command line parameters _only_ to
the recovery entries generated.

This is needed to e.g. start a debug shell in installations using systemd
using the kernel command line parameter "systemd.debug-shell" or to recover
in a system with encrypted root in situations where the decryption of the
root filesystem per crypttab in the intiramfs image is broken and the recovery
entry should contain information how to decrypt the rootfs (cryptopts=).

This patch does not change the default behaviour of the GRUB if
GRUB_CMDLINE_LINUX_RECOVERY is not set.

If GRUB_CMDLINE_LINUX_RECOVERY is set and the generated recovery entry should
include the kernel parameter "single" the parameter must be explicitly included
in GRUB_CMDLINE_LINUX_RECOVERY.

As far as I know all credits for the idea and the initial implementation go to
Kyle Ranking of Purism.

Signed-off-by: Kyle Rankin <kyle.rankin@puri.sm>
Signed-off-by: Chris Vogel <chris@z9.de>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
docs/grub.texi
util/grub-mkconfig.in
util/grub.d/10_linux.in
util/grub.d/20_linux_xen.in