[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#341152: initrd-tools: unable to boot after replacing devfs with udev: kernel panic, unable to create null, no console



At 14:01 2005-11-28, Maximilian Attems wrote:
On Mon, Nov 28, 2005 at 12:59:34PM -0600, Moshe Yudkowsky wrote:
> I cannot get 2.6.12 or 2.6.12 to boot because of the transition from
> devfs to udev, and the problem seems to lie with initrd.
>

initrd-tools is phasing out, if you use testing and udev 0.74
pick initramfs-tools 0.40 from unstable.
if you use newer udev you need initramfs-tools 0.41 from debian mentors
-> http://mentors.debian.net/debian/pool/main/i/initramfs-tools/

Ok, the answer turns out to be quite simple: I didn't have the correct console and null files in my /dev directory.

IMO, this is a documentation problem, so let me document the fix. Here's how to transition from devfs to udev -- at least as far as booting.

Introduction: There's a difference between devfs and udev. Devfs makes the "console" and "null" files available by the time the files are needed during the boot. udev starts later, so you must supply your own copy of /dev/console and /dev/null.

Action: Therefore, before trying to boot using udev only, make certain you have a "console" and "null" file in /dev. Of course, if your system is running, you have these files now -- but the question is, were they part of the /dev directory, or did devfs put it there? Here's how to check.

* First, mount the root directory someplace other than /, so that the /dev directory can be examined as a standalone -- so it can be seen as it looks without stuff that devfs puts there. As root, issue the command:

# mount -o bind / /mnt

(where /mnt is some random mouting point).


* Next, look at /mnt/dev. You need to have two special files there, console and null:

crw------- root root 5, 1 Nov 28 16:50 console
crw-rw-rw- root root 1, 3 Nov 28 16:51 null

If you have them already, you're all set. On my system, I had "null" and it was *not* a "c" (special character) file; it was an ordinary file. I got rid of that file and issued the following commands to create console and null:

# mknod -m 660 console c 5 1
# mknod -m 660 null c 1 3

* Unmount the / file system:

# umount /mnt.

* Make certain you have udev! 2.6.14-2 requires udev to boot, but you are responsible for actually installing udev. * Once /dev/console and /dev/null exist, you can boot using udev only. (For example, on my system, a boot using udev only is done by removing the "devfs=mount" command from lilo.) There's other stuff to do to convert completely to udev, but this gets you started.


--
 Moshe Yudkowsky
 Disaggregate
 2952 W Fargo
 Chicago, IL 60645 USA

 www.Disaggregate.com
 www.PebbleAndAvalanche.com
 speech@pobox.com
 +1 773 764 8727



Reply to: