Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Kernel Panic: can't open '/dev/console'
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
d3x73r
n00b
n00b


Joined: 16 Apr 2010
Posts: 53
Location: Bahia/Brazil

PostPosted: Fri May 27, 2011 6:33 pm    Post subject: [SOLVED] Kernel Panic: can't open '/dev/console' Reply with quote

I'm just runing a fresh install of Gentoo and when I first reboot, get this message:
Code:
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... :(


Last edited by d3x73r on Mon May 30, 2011 11:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32331
Location: 56N 3W

PostPosted: Fri May 27, 2011 10:55 pm    Post subject: Reply with quote

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
Code:
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
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4402

PostPosted: Fri May 27, 2011 11:58 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32331
Location: 56N 3W

PostPosted: Sat May 28, 2011 10:16 am    Post subject: Reply with quote

krinn,

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

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
d3x73r
n00b
n00b


Joined: 16 Apr 2010
Posts: 53
Location: Bahia/Brazil

PostPosted: Sat May 28, 2011 12:39 pm    Post subject: Reply with quote

too late... I've aready formated my HD with no luck :(
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. :?:

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?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32331
Location: 56N 3W

PostPosted: Sat May 28, 2011 5:29 pm    Post subject: Reply with quote

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
Code:
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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum