udev doesn't run blkid on cdroms with one session
A line in 60-persistent-storage.rules states:
KERNEL="sr*", ENV{ID_CDROM_MEDIA}="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
It seems to assume that ID_CDROM_MEDIA_SESSION_LAST_OFFSET is always set, since otherwise blkid fails:
maxim@maxim-laptop:~$ /sbin/blkid -o udev -p -u noraid -O /dev/sr0 The low-probe option requires a device maxim@maxim-laptop:~$ /sbin/blkid -o udev -p -u noraid /dev/sr0 ID_FS_LABELÍROM ID_FS_LABEL_ENCÍROM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 ID_FS_VERSION=Joliet\x20Extension ID_FS_TYPE=iso9660 ID_FS_USAGE=filesystem maxim@maxim-laptop:~$ /sbin/blkid -o udev -p -u noraid -O 0 /dev/sr0 ID_FS_LABELÍROM ID_FS_LABEL_ENCÍROM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 ID_FS_VERSION=Joliet\x20Extension ID_FS_TYPE=iso9660 ID_FS_USAGE=filesystem maxim@maxim-laptop:~$
Maybe this is a change in blkid
(btw, you notice obvious bug, the label is 'padded' with spaces, I will report that to util-linux package maintainers)
Now, ether the rule has to be split in two, or cdrom_id changed.
Currently in cdrom_id:
if (cd_media_session_last_offset > 0)
printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset);Now, it is impossible to use any disks, since without blkid environment, devicekit doesn't recognize the cdrom at all.
Best regards,
Maxim Levitsky
Quoted 9 lines · Maxim Levitsky
A line in 60-persistent-storage.rules states:
KERNEL="sr*", ENV{ID_CDROM_MEDIA}="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
It seems to assume that
ID_CDROM_MEDIA_SESSION_LAST_OFFSETis always set, since otherwise blkid fails:maxim@maxim-laptop:~$ /sbin/blkid -o udev -p -u noraid -O Â /dev/sr0 The low-probe option requires a device
In vol_id it was an optional parameter, and worked fine with an empty option, at least when long options are used:
{ "offset", optional_argument, NULL, 'o' },
We could also make cdrom_id print the "0", that might be the simplest.
Quoted 10 lines
maxim@maxim-laptop:~$ /sbin/blkid -o udev -p -u noraid  /dev/sr0 ID_FS_LABELÍROM ID_FS_LABEL_ENCÍROM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 ID_FS_VERSION=Joliet\x20Extension ID_FS_TYPE=iso9660 ID_FS_USAGE=filesystemMaybe this is a change in blkid
(btw, you notice obvious bug, the label is 'padded' with spaces, I will report that to util-linux package maintainers)
Maybe this is expected in the *_ENC version of the string, I'm not sure.
Kay
Quoted 8 lines · Kay Sievers
Quoted 7 lines · Maxim Levitsky
A line in 60-persistent-storage.rules states:
KERNEL="sr*", ENV{ID_CDROM_MEDIA}="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
It seems to assume that
ID_CDROM_MEDIA_SESSION_LAST_OFFSETis always set, since otherwise blkid fails:
Quoted 8 lines
Quoted 2 lines
maxim@maxim-laptop:~$ /sbin/blkid -o udev -p -u noraid -O /dev/sr0 The low-probe option requires a deviceIn
vol_idit was an optional parameter, and worked fine with an empty option, at least when long options are used:{ "offset", optional_argument, NULL, 'o' },We could also make
cdrom_idprint the "0", that might be the simplest.
Indeed,
I have reported this bug at
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/431055
Martin Pitt, has commited now a fix for this problem by splitting the rule in two according to value existence of ID_CDROM_MEDIA_SESSION_LAST_OFFSET
Quoted 8 lines
Quoted 8 lines
maxim@maxim-laptop:~$ /sbin/blkid -o udev -p -u noraid /dev/sr0 ID_FS_LABELÍROM ID_FS_LABEL_ENCÍROM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 ID_FS_VERSION=Joliet\x20Extension ID_FS_TYPE=iso9660 ID_FS_USAGE=filesystem
Quoted 6 lines
Quoted 3 lines
Maybe this is a change in blkid
(btw, you notice obvious bug, the label is 'padded' with spaces, I will report that to util-linux package maintainers)Maybe this is expected in the
*_ENCversion of the string, I'm not sure.
Do you know where to report the util-linux bugs?
There was a fork, util-linux-ng, but ubuntu seems to use util-linux naming, but it seems to be based on -ng.
As usual, filling a lanchpad bug didn't really help.
I think that _ENC means that non printable chars are printed as \xNNN, and indeed, here I see the long row of spaces after the volume name.
I am sure this is trivial to fix, but I want to know where to report that (launchpad sadly doesn't count...)
Best regards,
Maxim Levitsky