I think my question is related to udev and/or udisks, but I am really not sure at all what's going on here. To start with, my system works more or less fine. The less part is due to the fact that, after some upgrades to my Debian install, the /dev folder started acting weird, in relation to what I used to think I knew about unix drive management. To get to the point, here are two commands and their output:

$ ls /dev/h*
/dev/hidraw0  /dev/hidraw1  /dev/hidraw2  /dev/hpet

$ mount
/dev/hdb1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,size=5242880,mode=755,size=5242880,mode=755)

Now, notice that /dev/hdb1 is mounted (it really is!) but the corresponding file doesn't appear in the /dev directory? How can this be? If the file doesn't exist, where is it /dev/hdb1 listed as a link to the drive? More importantly, say I want to mount a CD. I put it in the drive, but /dev/scd0 doesn't appear, so I can't do mount /dev/scd0 /media/cdrom because it gives me back a File not found error. However, after lots of fiddling I found two ways of doing it:

$ mount /dev/disks/by-id/ata-HL-DT-ST_DVDRAM_GSA-4160B_K3H4A7E1256
$ udisks --mount /dev/scd0 /media/cdrom

Both of the commands above work. So, my question is, how does udisks know how to deal with a device file that doesn't actually exist and, possibly more importantly, why does mount think it mounted the file system at /dev/hdb1 while the file is not even there?

Finally, in case this has to do with a recent kernel upgrade:

$ uname -srv
Linux 3.1.0-1-686-pae #1 SMP Sun Dec 11 20:40:16 UTC 2011

1 Answer 1


Udisks uses its own device naming scheme. It follows the same naming rules that are normally followed by udev (the program that manages entries in /dev), but it has its own implementation of these rules, it doesn't rely on the entries in /dev.

The entry for the root filesystem shown by mount is not reliable, because the root filesystem is mounted by the kernel at boot time, and boot scripts later try to fill in /etc/mtab (the file read by the mount command) but cannot know the exact device name used by the kernel (indeed, it is technically possible, even if it does not normally happen, that the device containing root filesystem has no entry in /dev). Check the contents of /proc/mounts, which queries the kernel in real time; you may see a different device name for / (which might not exist on your system either).

It looks like your system is missing some udev rules. These rules are in the udev package, specifically in /lib/udev/rules.d/60-persistent-storage.rules. The first thing to do is make sure your udev package is up-to-date, as older versions of udev sometimes cope badly with newer kernels. And make sure that the rules file is there and undamaged.

  • Turns out the entry is in /dev/disk/by-uuid/22083dc6-fef3-4134-a60a-ea862385b0d5. All the rule files are there, last modified on Dec 4th. Deleted all the custom rules from /etc/udev/rules.d/ that seemed to have been automatically created by something and now the CD behaves normally. Thanks!
    – vlsd
    Commented Dec 30, 2011 at 0:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .