error booting gentoo linux: populating /dev with device nodes...

Translation of the original in Catalan. Read it in: CatalàCastellano

Since yesterday afternoon I've been mulling over a problem booting a gentoo that had been working without problems for months. The thing is that out of the blue it started giving a problem and wouldn't carry on booting. The last information that /sbin/rc gave was an error on line 24 and just before that it printed this information: populating /dev with device nodes.... The error was very strange, it said something like: /sbin/rc: line 24: cannot redirect standard input from /dev/null gentoo. That line of the /sbin/rc file says the following:

linia 23 - einfo " Populating /dev with device nodes..."
linia 24 - try tar -jxpf /lib/udev-state/devices.tar.bz2 -C /dev

In the end the solution was as simple as commenting out line 24, easy... but hard to find. I found the solution thanks to a really good page about how UDEV works: Computer Help for the New and Veteran User for Linux: UDEV Setup. I really highly recommend the page, it's excellent.

About my error I understand that the problem is that due to some filesystem inconsistency problem the inode that pointed to devices.tar.bz2, which is a copy of the files in /dev, had been lost. Then the tar on line 24 failed and of course it couldn't be decompressed. By commenting it out the boot continues perfectly and UDEV itself generates the /dev files dynamically as they are required.