[Pkg-systemd-maintainers] About a problem with GRUB2 rescue images and /dev/disk/by-label

Thomas Schmitt scdbackup at gmx.net
Thu Nov 21 11:13:45 GMT 2013


Hi,

maybe slightly off topic, i want to ask for advise about
getting an udev rule bug fixed upstream.

My newest Debian is still version 6. So i see few use in posting
a bug report for that one. But i verified that the problem is
still present in sid's udev_204-5_amd64.deb.

GRUB2 script grub-mkrescue produces ISO images with additional MBR
for booting from USB stick. The MBR partition sdb1 starts at LBA 1
for reasons which are deemed important by GRUB2 developers.
So /dev/sbd1 is not mountable.
Nevertheless it shows up as link target in
  /dev/disk/by-label
under the filesystem ID of the mountable device file /dev/sdb.

The reason is that the filesystem ID gets propagated from parent
device sdb to partition device sdb1 and is not overwritten by
the run of /sbin/blkid.
In file
  udev_204-5_amd64_deb/lib/udev/rules.d/60-persistent-storage.rules
there is
  # for partitions import parent information
  ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
  ...
  # probe filesystem metadata of disks
  KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
  ...
  ENV{ID_FS_LABEL_ENC}=="?*",     ENV{ID_FS_USAGE}=="filesystem|other", \
           SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"

Obviously, the variables ID_FS_LABEL_ENC and ID_FS_USAGE should
not be copied from parent device to partition device, but only
be set by /sbin/blkid.
The problem vanished after i did
  # for partitions import parent information
  ENV{DEVTYPE}=="partition",              IMPORT{parent}="ID_*", \
        ENV{ID_FS_LABEL}="" , ENV{ID_FS_LABEL_ENC}="" , \
        ENV{ID_FS_TYPE}="" , ENV{ID_FS_USAGE}=""

(names learned from output of: /sbin/blkid -o udev -p /dev/sdb )


A cross-post (not by me) from grub-devel list to linux-hotplug
list did not yield any reaction:
  http://www.spinics.net/lists/hotplug/msg05813.html
although i tried to explain the background in a follow-up:
  http://www.spinics.net/lists/hotplug/msg05814.html
(2 weeks ago)

Now i ponder how to motivate udev rule developers to look into
this issue and hopefully fix it.


I myself am involved by my program xorriso, which packs up the
grub-mkrescue ISO images. Although i am not to blame for the
misery, it has to be expected that half-educated users will
accuse grub-mkrescue or xorriso.


Have a nice day :)

Thomas





More information about the Pkg-systemd-maintainers mailing list