I've been a Debian user ever since Red Hat dropped their 7.3 release support. I've been using unstable (sid) with no problems, until lately. The fault seems to lie in udev.

I don't know how, but a few days ago one of my Debian servers lost its /dev directory completely. Linux could no longer boot with an empty /dev, so I had to fix it with a boot disk. And I don't like doing that, since my 8-port Belkin switchbox hasn't arrived yet.

Seems like this had something to do with upgrading or removing the udev package from the system. I recommend caution when doing anything with udev..

Even more problems now with installing new kernel images. I don't understand why, but when I install 2.6.8 or 2.6.10, I get zero-length initrd images like this:

-rw-r--r--  1 root root
0 Feb  9 19:20 /boot/initrd.img-2.6.10-1-686

Well, gotta dig into it now and see why it happens..

*****

Problem solved. The empty initrd images were being created by mkinitrd, which uses a special device called /dev/fd/3 for outputting the cramfs image. As it turns out, I had copied the /dev/fd directory off a bootdisk, causing /dev/fd/3 to become a regular file. In fact, /dev/fd should be a symlink to /proc/self/fd.

Wrong way:

crw-r--r--  1 root root    3, 0 Feb  9 20:43 /dev/fd/0
crw-r--r--  1 root root    3, 0 Feb  9 20:43 /dev/fd/1
crw-r--r--  1 root root    3, 0 Feb  9 20:43 /dev/fd/2
-rw-r--r--  1 root root 4493312 Feb 10 00:27 /dev/fd/3
crw-------  1 root root   29, 0 Feb  9 20:43 /dev/fd/4
crw-------  1 root root    4, 0 Feb  9 20:43 /dev/fd/5

Right way:

lrwxrwxrwx  1 root root 13 Feb 10 00:47 /dev/fd -> /proc/self/fd

So that's that. Just one of the joys of using Linux. (Of course, under Windows, in a case like this you would have no choice but to reinstall everything, but that's another story.)