udev and initramfs

Tom H tomh0665 at gmail.com
Thu Dec 9 10:19:45 UTC 2010


On Thu, Dec 9, 2010 at 5:17 AM, Tom H <tomh0665 at gmail.com> wrote:
> On Thu, Dec 9, 2010 at 3:52 AM, Loïc Grenié <loic.grenie at gmail.com> wrote:
>>
>>    I have a problem and I do not understand why... From udev (lucid: 151-12.2)
>>  I have in file /lib/udev/rules.d/60-persistent-storage.rules:
>>
>> [snip]
>> # probe filesystem metadata of optical drives which have a media inserted
>> KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*",
>> ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*",
>> IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O
>> $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
>> # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
>> KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*",
>> ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="",
>> IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
>>
>> # probe filesystem metadata of disks
>> KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
>> [snip]
>>
>>  and in file /usr/share/initramfs-tools/hooks/udev:
>>
>> [snip]
>> copy_exec /sbin/blkid /lib/udev
>> [snip]
>>
>>   Thus blkid ends in /lib/udev on the initramfs. The consequence I have
>>  is that the system won't reboot because blkid is not executed (because
>>  udev will look for it in /sbin and it's not there) and I thus do not have the
>>  links created in /dev/disk/by-uuid.
>>
>>    What I'd love to understand is why I seem to be the *only one* with
>>  that problem. Are there somehow
>>  /etc/udev/rules.d/60-persistent-storage.rules on "normal" systems
>>  with a different call to blkid ? Does anybody understand what I have
>>  modified to break my system ? How does your kernel command-line
>>  look like (cat /proc/cmdline) ?
>
> If you unpack your initrd, you'll find that "/sbin/blkid" exists.
>
> I'm not sure whether "/lib/udev/blkid" is used by the initrd scripts
> so I can only explain its existence as a historical twist because
> that's where vol_id used to be.

Although I think that vol_id was also in "/sbin" so ...




More information about the ubuntu-users mailing list