Skip to content

Instantly share code, notes, and snippets.

@julian-klode
Created January 15, 2024 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julian-klode/9e64ded494d208f3597cab498177f533 to your computer and use it in GitHub Desktop.
Save julian-klode/9e64ded494d208f3597cab498177f533 to your computer and use it in GitHub Desktop.
From 258fafeb3fb0317ab3b65b01737291d858487441 Mon Sep 17 00:00:00 2001
From: Julian Andres Klode <julian.klode@canonical.com>
Date: Mon, 15 Jan 2024 11:48:04 +0100
Subject: [PATCH] recovery fixup
---
util/grub.d/10_linux.in | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 36171bf3c..a29f70577 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -60,7 +60,11 @@ case ${GRUB_DEVICE} in
;;
esac
-: ${GRUB_CMDLINE_LINUX_RECOVERY:=single}
+if [ -x /lib/recovery-mode/recovery-menu ]; then
+ : ${GRUB_CMDLINE_LINUX_RECOVERY:=recovery}
+else
+ : ${GRUB_CMDLINE_LINUX_RECOVERY:=single}
+fi
# Default to disabling partition uuid support to maintian compatibility with
# older kernels.
@@ -98,11 +102,6 @@ esac
title_correction_code=
-if [ -x /lib/recovery-mode/recovery-menu ]; then
- GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} recovery"
-else
- GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} single"
-fi
if [ "$ubuntu_recovery" = 1 ]; then
GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY nomodeset"
fi
--
2.43.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment