# [SOLVED] Kernel Panic: can't open '/dev/console'

## d3x73r

I'm just runing a fresh install of Gentoo and when I first reboot, get this message:

```
your real /dev is missing files required to boot (console and null)

switch_root: can't open '/dev/console': No such file or directory.
```

I don't know what I'm missing here... I aways could do a fresh install and now i got this message :/

I'm about to start over...  :Sad: Last edited by d3x73r on Mon May 30, 2011 11:10 pm; edited 1 time in total

----------

## NeddySeagoon

d3x73r,

There is a problem with current stage3 files.  You need /dev/null, dev/zero and /dev/console.

boot your CD, moount your root at /mnt/gentoo, do not chroot. and look in /mnt/gentoo/dev

Check the files that are there are dev special files 

```
crw-rw-rw- 1 root root 1, 3 May 27 19:35 /dev/null

crw-rw-rw- 1 root root 1, 5 May 27 19:35 /dev/zero

crw------- 1 root root 5, 1 May 27 19:36 /dev/console
```

Use mknod to make them, then fix the owner, group and permissions.

Reinstalling won't help

----------

## krinn

NeddySeagoon : i have download stage3-amd64-20110526.tar.bz2

here's how it is now.

- /dev only have null device

- /etc/runlevels/sysinit only have dmesg & devfs (edit: fix path)

ok, so it lack some devices and it lack udev at sysinit, but it have openrc, so i suppose it have baselayout2/openrc, and the issue is /dev & missing udev in sysinit.

but all needed /dev are create by udev-mount

and udev-mount is a dependency requiere by udev.

To resume: it seems the only problem is missing udev at sysinit runlevel, as udev will call itself udev-mount that will create the missing /dev (shm, pts, null, console)

So the fix might just be as easy as adding udev to sysinit and let it do the work (or calling /etc/init.d/udev-mount by hands to let it create the missing /dev entries, i was thinking the stage was using baselayout1 and so the udev-mount cannot work on it, but it seems it's openrc/bl2 already in it)

I didn't test it, but this should works

d3x73r: can you just test that and gave result (it might still doesn't work, but report if error remain the same or not) ?

rc-update add udev sysinit

----------

## NeddySeagoon

krinn,

I'll be testing for myself later today, I have a new toy to install.

----------

## d3x73r

too late... I've aready formated my HD with no luck  :Sad: 

indeed, the current stage3 has only null in his /dev.

before try NeddySeagoon solution I tried krinn's with no luck too. I added udev to sysinit, as he says but got the same message. Even I tried /etc/init.d/udev-moun manualy on chroot. It created a few files but when I reboot has the same error. I loaded Live-CD again and mounted system partition and when I did ld -al /dev, only null was there.   :Question: 

I realy don't know what to do... This isn't my first gentoo installation, but I've never seen this before!

So I did created the files manualy and the sytem was able to boot as usual. Anyone else tryed?

----------

## NeddySeagoon

d3x73r,

You can install from an April stage3 file, which will have baselaout1 and will match the handbook. However your will have to follow the baselaout upgrade guide.  I suggest you do that explicity with 

```
emerge -1 baselayout
```

so that you know only baselayout has changed, rather than have it lost in an emerge -uDNav

You can also use the current stage3 and follow this post which I'm in the process of writing as I do a new install. My raid5 is still syncing, so I'm 5 hours away from a reboot.  I don't know if its complete yet.

If you stay with the current stage3, I would like feedback on that post.

----------

