no ssh login because of currupt /dev/null
2009-11-10 by , tagged as
After a reboot i could no more login via ssh to a hosted server.
The reason was /dev/null being an ordinary file instead of a character special device.
But who corrupted /dev/null at reboot? This was very, very hard to find. It took me almost 3 hours, because i had to watch the boot process with check statements.
It was /sbin/start_udev which creates /dev/null after /dev is mounted. But i had removed user "lp" because i have no need for printing, and the Virtuozzo virtual environment limits the number of usable uids.
So /dev/MAKEDEV stopped after creating devices, due to an error at parport0, because it could not assing user "lp" with it. /dev/null being after that entry in /etc/udev/makedev.d was not created.
The next statement with >/dev/null (there are lots of them in the startup scripts) creates /dev/null as an ordinary file and this prevents sshd from working.