- Package:
- grub-common
- Source:
- grub2
- Description:
- GRand Unified Bootloader (common files)
- Submitter:
- nutzteil
- Date:
- 2021-04-11 04:33:27 UTC
- Severity:
- wishlist
- Tags:
Patch for /etc/grub.d/10_linux, so you can use LABEL beside UUID and devices. Activation in /etc/default/grub with: GRUB_DISABLE_LINUX_UUID=true GRUB_ENABLE_LINUX_LABEL=true Thanks christian
(Now there is grub-pc 1.98+20100804-2 in squeeze.) Corrected Version of my previous try: --------------------------------------------------------------------------------- --- 10_linux 2010-07-12 13:10:04.000000000 +0200 +++ 10_linux_+label 2010-08-18 09:17:33.816200799 +0200 @@ -49,6 +49,12 @@ LINUX_ROOT_DEVICE=${GRUB_DEVICE} else LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} + GRUB_DEVICE_LABEL="$(blkid -l -t UUID=${GRUB_DEVICE_UUID} -s LABEL -o value)" + . /etc/default/grub + if [ "x${GRUB_ENABLE_LINUX_LABEL}" = "xtrue" ] \ + && test -e "/dev/disk/by-label/${GRUB_DEVICE_LABEL}" ; then + LINUX_ROOT_DEVICE=LABEL=${GRUB_DEVICE_LABEL} + fi fi linux_entry () --------------------------------------------------------------------------------- - it moved after the setting of LINUX_ROOT_DEVICE=UUID=...., the previous was not correct. - it sources /etc/default/grub for reading the Value of my Variable GRUB_ENABLE_LINUX_LABEL, because that is no Variable in /usr/sbin/update-grub (maybe it will be?). Also 20_linux_xen can be patched with this.
(onesmore because Provider-Webmailer destroyed the format)
---------------------------------------------------------------------------------
--- 10_linux 2010-07-12 13:10:04.000000000 +0200
+++ 10_linux_+label 2010-08-18 09:17:33.816200799 +0200
@@ -49,6 +49,12 @@
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
+ GRUB_DEVICE_LABEL="$(blkid -l -t UUID=${GRUB_DEVICE_UUID} -s LABEL -o value)"
+ . /etc/default/grub
+ if [ "x${GRUB_ENABLE_LINUX_LABEL}" = "xtrue" ] \
+ && test -e "/dev/disk/by-label/${GRUB_DEVICE_LABEL}" ; then
+ LINUX_ROOT_DEVICE=LABEL=${GRUB_DEVICE_LABEL}
+ fi
fi
linux_entry ()
---------------------------------------------------------------------------------
- it moved after the setting of LINUX_ROOT_DEVICE=UUID=...., the previous was not correct.
- it sources /etc/default/grub for reading the Value of my Variable GRUB_ENABLE_LINUX_LABEL,
because that is no Variable in /usr/sbin/update-grub (maybe it will be?).
Also 20_linux_xen can be patched with this.
Activation in /etc/default/grub with:
#GRUB_DISABLE_LINUX_UUID=true (not disable the LINUX_UUID!)
GRUB_ENABLE_LINUX_LABEL=true
Thanks for the patch, it worked beautifully! Let's hope it gets included in the package. Best regards Torquil Sørensen
Is there a way to raise the priority of this patch from wishlist? I think it's a major usability bug likely to lead to an unbootable system if you happen to think ahead enough to use LABEL= in your /etc/fstab UUID's are great (if hidden) for most users, but my experience is it's a lot easier and less prone to error to recover something at 3am when you remember the label of the root filesystem you want. There's no way I'm going to ever remember, or even accurately write down the UUID.
Dear Customer, Your item has arrived at January 03, but our courier was not able to deliver the parcel. Postal label is enclosed to this e-mail. Please check the attachment! Your help is greatly appreciated, Nicholas Hooper, USPS Mail Delivery Manager.
Hi, I also think that this thing is really useful and needed. Is there someone that can update/complete/improve the patch and forward also upstream please?
Dear Maintainer, Might I ask this to be fixed, please? It's much more easy to use labels than tinkering around with UUID, which is both error-prone and, in some cases, when using mirrors of the same disk, problematic. Thanks. Best regards, Dario Susman