Bug#568084: grub-common: Use of LABEL for 'root='

nutzteil nutzteil at web.de
Tue Feb 2 10:47:22 UTC 2010


Package: grub-common
Version: 1.98~20100115-1
Severity: wishlist
Tags: patch



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


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-common depends on:
ii  base-files              5.0.0            Debian base system miscellaneous f
ii  dpkg                    1.15.5.6         Debian package management system
ii  gettext-base            0.17-8           GNU Internationalization utilities
ii  install-info            4.13a.dfsg.1-5   Manage installed documentation in 
ii  libc6                   2.10.2-2         GNU C Library: Shared libraries
ii  libfreetype6            2.3.11-1         FreeType 2 font engine, shared lib
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages grub-common recommends:
pn  os-prober                     <none>     (no description available)

Versions of packages grub-common suggests:
pn  grub-emu                      <none>     (no description available)
pn  multiboot-doc                 <none>     (no description available)

-- no debconf information
-------------- next part --------------
--- 10_linux_0c	2010-01-15 23:34:32.000000000 +0100
+++ 10_linux	2010-01-26 07:57:13.000000000 +0100
@@ -44,6 +44,11 @@
     || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
     || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm"  ] ; then
   LINUX_ROOT_DEVICE=${GRUB_DEVICE}
+  GRUB_DEVICE_LABEL="$(blkid -l -t UUID=${GRUB_DEVICE_UUID} -s LABEL -o value)"
+    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
 else
   LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
 fi


More information about the Pkg-grub-devel mailing list