wait-for-root has problems with mknod generated root-devices

Bug #576429 reported by H.-R. Oberhage
8
This bug affects 1 person
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
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
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

Revision history for this message
H.-R. Oberhage (oberhage) wrote :
Revision history for this message
Evan Broder (broder) wrote :

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?

Changed in initramfs-tools (Ubuntu):
assignee: nobody → H.-R. Oberhage (oberhage)
Revision history for this message
Evan Broder (broder) wrote :

Oh, and I, uh, hope this is obvious, but do please make sure you can still boot the system if things go catastrophically wrong.

Revision history for this message
H.-R. Oberhage (oberhage) wrote : Re: [Bug 576429] Re: wait-for-root has problems with mknod generated root-devices

Hello,

On Nov 27, Evan Broder wrote:
> Thanks for the great bug report. Your description of the problem made it
> really simple to track down the misbehavior.

you're welcome and ...

> [Description of possible solution.]

.. your patch/fix seems to work!

> 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?

I've installed the 'maverick' (10.10) version of the two packages (...tools
and ...tools-bin) and removed the 'rootdelay' setting in lilo.conf. It worked
flawlessly (and fast) for me!

Thanks for caring.

Best regards,
 Ruediger Oberhage

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.98.1ubuntu8

---------------
initramfs-tools (0.98.1ubuntu8) natty; urgency=low

  * If the root= argument is numeric, set ROOT to the appropriate
    /dev/block/N:N symlink instead of mknod'ing a /dev/root device. This
    makes wait-for-root able to detect those devices. (LP: #576429)
 -- Evan Broder <email address hidden> Fri, 26 Nov 2010 19:01:30 -0800

Changed in initramfs-tools (Ubuntu):
status: New → Fix Released
Changed in initramfs-tools (Debian):
status: Unknown → Fix Committed
Changed in initramfs-tools (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.