diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:29:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:29:52 +0000 |
commit | ca67b09c015d4af3ae3cce12aa72e60941dbb8b5 (patch) | |
tree | b7316d7b06c373e08dabb79a2c866c568e08f49e /debian/patches/mkconfig-nonexistent-loopback.patch | |
parent | Adding upstream version 2.06. (diff) | |
download | grub2-ca67b09c015d4af3ae3cce12aa72e60941dbb8b5.tar.xz grub2-ca67b09c015d4af3ae3cce12aa72e60941dbb8b5.zip |
Adding debian version 2.06-13+deb12u1.debian/2.06-13+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/mkconfig-nonexistent-loopback.patch')
-rw-r--r-- | debian/patches/mkconfig-nonexistent-loopback.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/patches/mkconfig-nonexistent-loopback.patch b/debian/patches/mkconfig-nonexistent-loopback.patch new file mode 100644 index 0000000..9c55c1d --- /dev/null +++ b/debian/patches/mkconfig-nonexistent-loopback.patch @@ -0,0 +1,55 @@ +From 989f83d664999deeb28d03a847e8f00a28639d7d Mon Sep 17 00:00:00 2001 +From: Colin Watson <cjwatson@ubuntu.com> +Date: Mon, 13 Jan 2014 12:13:08 +0000 +Subject: Avoid getting confused by inaccessible loop device backing paths + +Bug-Ubuntu: https://bugs.launchpad.net/bugs/938724 +Forwarded: no +Last-Update: 2021-09-24 + +Patch-Name: mkconfig-nonexistent-loopback.patch +--- + util/grub-mkconfig_lib.in | 2 +- + util/grub.d/30_os-prober.in | 9 +++++---- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in +index e62cfc22b..b6a1d7dec 100644 +--- a/util/grub-mkconfig_lib.in ++++ b/util/grub-mkconfig_lib.in +@@ -143,7 +143,7 @@ prepare_grub_to_access_device () + *) + loop_device="$1" + shift +- set -- `"${grub_probe}" --target=device "${loop_file}"` "$@" ++ set -- `"${grub_probe}" --target=device "${loop_file}"` "$@" || return 0 + ;; + esac + ;; +diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in +index 37d5f05b5..e2ec80eb9 100644 +--- a/util/grub.d/30_os-prober.in ++++ b/util/grub.d/30_os-prober.in +@@ -222,6 +222,11 @@ EOF + LINITRD="${LINITRD#/boot}" + fi + ++ if [ -z "${prepare_boot_cache}" ]; then ++ prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)" ++ [ "${prepare_boot_cache}" ] || continue ++ fi ++ + onstr="$(gettext_printf "(on %s)" "${DEVICE}")" + recovery_params="$(echo "${LPARAMS}" | grep 'single\|recovery')" || true + counter=1 +@@ -233,10 +238,6 @@ EOF + fi + used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'" + +- if [ -z "${prepare_boot_cache}" ]; then +- prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)" +- fi +- + # The GRUB_DISABLE_SUBMENU option used to be different than others since it was + # mentioned in the documentation that has to be set to 'y' instead of 'true' to + # enable it. This caused a lot of confusion to users that set the option to 'y', |