wait-for-root has problems with mknod generated root-devices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Debian) |
Fix Released
|
Unknown
|
|||
initramfs-tools (Ubuntu) |
Fix Released
|
Undecided
|
H.-R. Oberhage |
Bug Description
Binary package hint: initramfs-tools
Hello!
There's a long startup delay (until 'rootdelay' has passwd), when a (root-)device is set up in the /dev-tree only.
This is (e.g.) the case, when the machine is started by 'lilo' and the root-device given as device numbers like 0806 or whatever. 'parse_numeric' from scripts/functions then 'mknod's a "/dev/root" device with the respective major and minor numbers.
When /dev/root is then passed to 'wait-for-root' this times out, probably because there is no counterpart in sysfs or procfs and thus the udev 'database'. So it always times out, before the boot process continues.
It doesn't happen, when the same(!) computer is booted by GRUB with a reference to /dev/sda6 (or so).
This behaviour is new with 'lucid' ( - as is wait-for-root) and it is a real nuissance. if something can be done, other than setting a shorter 'rootdelay', this should be fixed, please. Thanks.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: initramfs-tools-bin 0.92bubuntu78
ProcVersionSign
Uname: Linux 2.6.32-21-generic i686
Architecture: i386
Date: Thu May 6 16:10:44 2010
LiveMediaBuild: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: initramfs-tools
Related branches
- Ubuntu Development Team: Pending requested
-
Diff: 40 lines (+11/-4)2 files modifieddebian/changelog (+8/-0)
scripts/functions (+3/-4)
Changed in initramfs-tools (Debian): | |
status: | Unknown → Fix Committed |
Changed in initramfs-tools (Debian): | |
status: | Fix Committed → Fix Released |
Thanks for the great bug report. Your description of the problem made it really simple to track down the misbehavior.
I think we can fix this by changing how parse_numeric deals with numeric root devices. udev creates symlinks in /dev/block/ for every block device it creates. For instance, I have a /dev/block/8:1 that's a symlink to /dev/sda1
So instead of mknod'ing /dev/root with an appropriate major/minor numbers, we can just change ROOT to the appropriate /dev/block/ major:minor symlink, and wait-for-root should handle that case gracefully.
I've pushed a patch to lp:~broder/ubuntu/natty/initramfs-tools/fix-576429, but before I ask for sponsorship, I'd like to get some verification that it works as desired.
I've uploaded versions of initramfs-tools with this patch for lucid, maverick, and natty to my PPA (https:/ /launchpad. net/~broder/ +archive/ ubuntu- tests). Could you please test whichever version is most convenient and let me know if the patch works?