[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Use GRUB_ENABLE_LINUX_LABEL=true instead of GRUB_DISABLE_LIN
From: |
darkpenguin |
Subject: |
[PATCH 2/2] Use GRUB_ENABLE_LINUX_LABEL=true instead of GRUB_DISABLE_LINUX_UUID=LABEL |
Date: |
Wed, 27 Sep 2023 11:13:35 +0000 |
---
util/grub-mkconfig.in | 1 +
util/grub-mkconfig_lib.in | 2 +-
util/grub.d/10_linux.in | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 32c480dae..fb5000d3f 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -244,6 +244,7 @@ export GRUB_DEFAULT \
GRUB_DISABLE_UUID \
GRUB_DISABLE_LINUX_UUID \
GRUB_DISABLE_LINUX_PARTUUID \
+ GRUB_ENABLE_LINUX_LABEL \
GRUB_DISABLE_RECOVERY \
GRUB_VIDEO_BACKEND \
GRUB_GFXMODE \
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index bd43bc01d..dd726c4b3 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -159,7 +159,7 @@ prepare_grub_to_access_device ()
if [ "x${GRUB_DISABLE_UUID}" != "xtrue" ] && fs_uuid="`"${grub_probe}"
--device $@ --target=fs_uuid 2> /dev/null`" ; then
hints="`"${grub_probe}" --device $@ --target=hints_string 2> /dev/null`"
|| hints=
- if [ "x${GRUB_DISABLE_LINUX_UUID}" = "xLABEL" ] \
+ if [ "x${GRUB_ENABLE_LINUX_LABEL}" = "xtrue" ] \
&& [ -b "/dev/disk/by-label/$(blkid -l -t UUID=${fs_uuid} -s LABEL -o
value)" ]; then
device="--label $(blkid -l -t UUID=${fs_uuid} -s LABEL -o value)"
else
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index d29a004e3..04b973fe7 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -61,7 +61,7 @@ if ( [ "x${GRUB_DEVICE_UUID}" = "x" ] && [
"x${GRUB_DEVICE_PARTUUID}" = "x" ] )
elif [ "x${GRUB_DEVICE_UUID}" = "x" ] \
|| [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ]; then
LINUX_ROOT_DEVICE=PARTUUID=${GRUB_DEVICE_PARTUUID}
-elif [ "x${GRUB_DISABLE_LINUX_UUID}" = "xLABEL" ] \
+elif [ "x${GRUB_ENABLE_LINUX_LABEL}" = "xtrue" ] \
&& [ -b "/dev/disk/by-label/$(blkid -l -t UUID=${GRUB_DEVICE_UUID} -s
LABEL -o value)" ]; then
LINUX_ROOT_DEVICE=LABEL="$(blkid -l -t UUID=${GRUB_DEVICE_UUID} -s LABEL -o
value)"
else
--
2.30.2
- [PATCH 0/2] Add support for specifying the boot device by label, darkpenguin, 2023/09/27
- [PATCH 1/2] Allow specifying the boot device by its label instead of UUID, darkpenguin, 2023/09/27
- Re: [PATCH 1/2] Allow specifying the boot device by its label instead of UUID, Vladimir 'phcoder' Serbinenko, 2023/09/27
- Re: [PATCH 1/2] Allow specifying the boot device by its label instead of UUID, darkpenguin, 2023/09/27
- Re: [PATCH 1/2] Allow specifying the boot device by its label instead of UUID, Heinrich Schuchardt, 2023/09/27
- [PATCH] Allow specifying the boot device by its label instead of UUID, darkpenguin, 2023/09/27
- Re: [PATCH] Allow specifying the boot device by its label instead of UUID, Vladimir 'phcoder' Serbinenko, 2023/09/27
- Re: [PATCH] Allow specifying the boot device by its label instead of UUID, Oskari Pirhonen, 2023/09/28
- Re: [PATCH] Allow specifying the boot device by its label instead of UUID, darkpenguin, 2023/09/28
[PATCH 2/2] Use GRUB_ENABLE_LINUX_LABEL=true instead of GRUB_DISABLE_LINUX_UUID=LABEL,
darkpenguin <=