udev does not initialize device nodes at boot time

Bug #20465 reported by Hidde Brugmans
20
Affects Status Importance Assigned to Milestone
Ubuntu
Fix Released
Critical
Jeff Bailey

Bug Description

I had no acces as an sudoer admin user part of the cdrom group.

sudo chown :cdrom `readlink -f /dev/cdrom' fixed the problem.

Revision history for this message
Martin Pitt (pitti) wrote :

Do you use Hoary or Breezy? Which udev version? Can you please check that you
have a symbolic link

  /etc/udev/rules.d/020_permissions.rules -> ../permissions.rules

?

Revision history for this message
Hidde Brugmans (hcbrugmans-deactivatedaccount) wrote :

(In reply to comment #1)
> Do you use Hoary or Breezy? Which udev version? Can you please check that you
> have a symbolic link
>
> /etc/udev/rules.d/020_permissions.rules -> ../permissions.rules
>
> ?
Breezy > installed colony3, last dist-upgrade was sunday.
Got the same behavior from a 27aug Daily (i386)

hidde@system:~$ /etc/udev/rules.d/020_permissions.rule
bash: /etc/udev/rules.d/020_permissions.rule: No such file or directory

hidde@system:~$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 3 2005-08-29 14:50 /dev/cdrom -> hdc

lrwxrwxrwx 1 root root 3 2005-08-29 14:50 /dev/cdrom1 -> hdd

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #2)
> (In reply to comment #1)
> > Do you use Hoary or Breezy? Which udev version? Can you please check that you
> > have a symbolic link
> >
> > /etc/udev/rules.d/020_permissions.rules -> ../permissions.rules
> >
> > ?
> Breezy > installed colony3, last dist-upgrade was sunday.
> Got the same behavior from a 27aug Daily (i386)
>
> hidde@system:~$ /etc/udev/rules.d/020_permissions.rule
> bash: /etc/udev/rules.d/020_permissions.rule: No such file or directory

rule*s* :-)

Revision history for this message
Martin Pitt (pitti) wrote :

OK, sorted out in IRC. The symlink is fine, just the file is not actually used.
I can replicate it, looking at it now.

Revision history for this message
Martin Pitt (pitti) wrote :

I debugged this for some time now. For the record, this is not an udev
regression, I rather suspect a bad interaction with initramfs. This works
perfectly on all udev starts but the initial one.

Jeff, initramfs already starts udev, right? Is it properly stopped and /dev
unmounted after initramfs has finished? At start, there is no message "Creating
initial device nodes...", and TMPFS_MOUNTED is true in the udev init script.
This looks wrong...

Revision history for this message
Martin Pitt (pitti) wrote :

This probably breaks half a dozen other things, thus raising severity.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I believe that initramfs now moves /dev from the initramfs over to the installed
system, which means that udev will skip its initialization.

  start)
    if [ -e "$udev_root/.udevdb" ]; then
      if mountpoint -q /dev/; then
        log_failure_msg "FATAL: udev is already active on $udev_root."
        exit 1
      else
        log_warning_msg "WARNING: .udevdb already exists on the old $udev_root!"
     fi
    fi
    mount -n -o size=$tmpfs_size,mode=0755 -t tmpfs tmpfs $udev_root
    log_begin_msg "Creating initial device nodes..."
    udevstart
    log_end_msg $?

initramfs seems to create a file /dev/.initramfs-tools. Probably udev should
check for that, and if it exists, run udevstart (but not the mount).

Revision history for this message
Jeff Bailey (jbailey) wrote :

Should be fixed, waiting for feedback before I close this.

Revision history for this message
Martin Pitt (pitti) wrote :

*** Bug 20559 has been marked as a duplicate of this bug. ***

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

*** Bug 19171 has been marked as a duplicate of this bug. ***

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Note that #12915 (which was the same bug) has a comment saying someone's still
having problems with the new udev :-/

Revision history for this message
Stefan Glasenhardt (glasen) wrote :

I just made an dist-upgrade. Now everything works normally :

udev-0.060-1ubntu10
linux-image-2.6.12-7-k7
initscripts-2.86.ds1-1.1ubuntu3
initramfs-tools-0.24

Revision history for this message
Matt Zimmerman (mdz) wrote :

Recently I've been having an issue where no device node is created for my USB CD
writer. Running udevstart causes it to be created, but it is missed during
boot. Is this consistent with this bug, or something different?

Revision history for this message
Allison Karlitskaya (desrt) wrote :

FWIW, running "udevstart" here causes my /dev/input/mice to appear properly.

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #13)
> Recently I've been having an issue where no device node is created for my USB CD
> writer. Running udevstart causes it to be created, but it is missed during
> boot. Is this consistent with this bug, or something different?

Plausible, at least. The USB drivers might not have been loaded yet in the init
ram disk. In the previous broken version, /dev/ was not touched at all during
/etc/init.d/udev start time, so nothing actually had the chance to create the
device. So it does work now?

It works perfectly for me now, so I guess we can close this. Jeff?

Revision history for this message
David Sedeño Fernandez (david-alderia) wrote :

Sorry but for me isn't working.

udev-0.060-1ubuntu10
linux-image-2.6.12-7-386

X doesn't start if I don't do: sudo ln -s /dev/.static/dev/input/mice
/dev/input/mice from the console.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

david: if you do

  dpkg-reconfigure linux-image-`uname -r`

and reboot, do you get /dev/input/mice then?

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #15)
> (In reply to comment #13)
> > Recently I've been having an issue where no device node is created for my USB CD
> > writer. Running udevstart causes it to be created, but it is missed during
> > boot. Is this consistent with this bug, or something different?
>
> Plausible, at least. The USB drivers might not have been loaded yet in the init
> ram disk. In the previous broken version, /dev/ was not touched at all during
> /etc/init.d/udev start time, so nothing actually had the chance to create the
> device. So it does work now?

I've rebooted a few times and have been unable to reproduce the behaviour with
the latest packages.

> It works perfectly for me now, so I guess we can close this. Jeff?

Agreed, pending confirmation from the original submitter.

Revision history for this message
David Sedeño Fernandez (david-alderia) wrote :

(In reply to comment #17)
> david: if you do
>
> dpkg-reconfigure linux-image-`uname -r`
>
> and reboot, do you get /dev/input/mice then?

No :(

I have applied the command and rebooted with no luck... still have to do the
link manually.

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #19)
> (In reply to comment #17)
> > david: if you do
> >
> > dpkg-reconfigure linux-image-`uname -r`
> >
> > and reboot, do you get /dev/input/mice then?
>
> No :(
>
> I have applied the command and rebooted with no luck... still have to do the
> link manually.
>

Did you try "udevstart" before creating the link manually?

Revision history for this message
David Sedeño Fernandez (david-alderia) wrote :

(In reply to comment #20)

>
> Did you try "udevstart" before creating the link manually?

If I run "udevstart" the file /dev/input/mice appears, but after reboot the file
it's gone and have to run the command again from console.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Please attach a copy of /etc/init.d/udev from your system

Revision history for this message
David Sedeño Fernandez (david-alderia) wrote :

Created an attachment (id=3461)
File requested

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #23)
> Created an attachment (id=3461) [edit]
> File requested
>

It sounds like you are experiencing a different bug from the rest of us, and no
one is able to reproduce it.

Revision history for this message
Allison Karlitskaya (desrt) wrote :

I have exactly the same symptoms as David, which I originally filed as bug
#19171
. Bug #19171 was then closed as a DUP of this bug. If it is indeed a
separate issue, perhaps it should be reopened?

Revision history for this message
Matt Zimmerman (mdz) wrote :

bug #19171 has been reopened now, so this one can be closed.

Revision history for this message
Hidde Brugmans (hcbrugmans-deactivatedaccount) wrote :

This is marked fixed, but I still have the problem that my cd's do not automount
due to being owned by group root instead of :cdrom

hidde@system:~$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 3 2005-09-08 15:30 /dev/cdrom -> hdc

Revision history for this message
Jeff Bailey (jbailey) wrote :

(In reply to comment #27)
> This is marked fixed, but I still have the problem that my cd's do not automount
> due to being owned by group root instead of :cdrom
>
> hidde@system:~$ ls -l /dev/cdrom
> lrwxrwxrwx 1 root root 3 2005-09-08 15:30 /dev/cdrom -> hdc

Can you do ls -l /dev/hdc? Symlinks don't show the final permissions/access
bits that will be used.

Tks,
Jeff Bailey

Revision history for this message
Hidde Brugmans (hcbrugmans-deactivatedaccount) wrote :

hidde@system:~$ ls -l /dev/hdc
brw-rw---- 1 root cdrom 22, 0 2005-09-08 15:30 /dev/hdc

right, so it's not a permission problem
My discs are still not mounting unless I give a manual mount command tho.

hidde@system:~$ mount /dev/hdc
mount: block device /dev/hdc is write-protected, mounting read-only

Should I file another bug?

Revision history for this message
Martin Pitt (pitti) wrote :

> hidde@system:~$ mount /dev/hdc
> mount: block device /dev/hdc is write-protected, mounting read-only
>
>
> Should I file another bug?

Yes, please.

Please also include some debugging information as described at
http://wiki.ubuntu.com/DebuggingRemovableDevices.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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