After upgrade to Lucid /dev/disk/by-uuid missing when booting with initramfs

Reported by flashydave on 2010-05-05
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Ubuntu
Undecided
Unassigned

Bug Description

Upgraded from Karmic to Lucid with root=UUID=xxxx set in grub and using UUID in /etc/fstab.
System fails to boot because the root device cannot be found.
From busybox shell determined /dev/disk/by-uuid missing.
Note behaviour is identical with grub and grub2
Further investigation suggests problem is with udev and initramfs interaction.

udev's 60-persistent-storage.rules amongst others contains the line
KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
with an explicit path for blkid
This is used to populate udev's db which the rule
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
uses to create the /dev/disk/by-uuid links,
However initramfs (in the file /usr/share/initramfs-tools/hooks/udev) copies /sbin/blkid from the host system to /lib/udev in the initramfs image. The net result is that it appears (at least from the busybox environment) that blkid cannot be found and hence does not run.

Several other posts (ubuntu forums) suggest various workarounds (e.g. going back to /dev/sda1 type root= lines in grub) but this is purely masking the problem not solving it.

All other program references in udev (eg.ata_id usb_id and I guess the old vol_id that preceded blkid) did not have an explicit path. Replacing the references to /sbin/blkid to simple blkid in udev rules and recreating initramfs via update-initramfs -u appears to fix the problem and the system boots OK. However I am concerned that there may be other reasons why the /sbin reference was included and hence if this was introduced as a patch may break some other aspect I am unaware of.

Current environment:
udev 151-12
kernel 2.6.32-22-generic
initramfs-tools 0.93.2~bpo50+2
initramfs-tools-bin 0.92bubuntu78
distro Ubuntu 10.04 LTS
grub-pc 1.98-1ubuntu6

I have just done an upgrade on a completely different server machine and run into the same problem.
As an additional thought - these machines were previously running versions as early as feisty and have been incrementally updated since.

xlyz (xlyz) wrote :

same problem here. upgraded from karmic

Upgrade to 10.04.1 server from 10.04 reinstates the broken behaviour. Again the fix to references to blkid in /lib/udev/rules.d and remaking the initramfs as decribed above fixes it for me,

Mark Haiman (mhaiman) wrote :

I ran into this out of the blue running 9.10 on a laptop with SATA hard drive, one primary ext3 and one swap parition, and no previous boot problems.
Boot failed, dropping to busybox shell showing no by-uuid entry for the primary partition (the swap partition was there). Possibly - I'm not certain - this was on first reboot after a system update.
Eventually rebooted successfully by giving root=/dev/sda4 on the grub command line. After that the problem vanished without my changing any configuration files (I still have root=UUID=xxxx in /boot/grub/menu.lst).
Perhaps there is more to this than the diagnosis suggested in the initial bug report, which doesn't seem to account for the problem resolving after reboot.

Fabio Marconi (fabiomarconi) wrote :

Hello
Is this problem present with the latest updates ?
Thanks
Fabio

Changed in ubuntu:
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for Ubuntu because there has been no activity for 60 days.]

Changed in ubuntu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers