View previous topic :: View next topic |
Author |
Message |
widu Guru
Joined: 05 Jun 2004 Posts: 333 Location: Freiburg
|
Posted: Fri Jul 16, 2004 6:07 pm Post subject: cannot open initial console |
|
|
I just backuped my entire system with dar and tested it by cloning the system. Everything works fine, except the /dev directory.
On the cloned system there are less entries in /dev than on the original, and therfore I e.g cannot mount my usb harddisk. The entries for /dev/sdb just don't exist.
Two questions:
Why is the /dev in the backup different to the original one?
Is there a possibility to "repopulate" /dev on the cloned system?
edit:
I just simply removed everything on /dev (on the cloned system) and rebooted, and see. my usb-harddisk works again.
But on the other hand i cannot mount my logical volumes anymore. lvscan says, that they are all active.
edit 2
well, it isn't really a lvm problem, after looking at the boot messages I'd say "unable to open initial console" is it
edit 3
well, ähm, seems there's udev working and I didn't know that I' ve allways thought, udev sounds clever but I'll try that later. So I'm going to read the udev-primer now.
Last edited by widu on Sat Jul 17, 2004 8:47 am; edited 1 time in total |
|
Back to top |
|
|
MagnusBerg Guru
Joined: 07 Oct 2003 Posts: 370 Location: Burgsvik, Gotland, Sweden
|
Posted: Fri Jul 16, 2004 8:20 pm Post subject: |
|
|
You don't need to backup /dev, /proc, /sys and /tmp. The content will be there then you start up. But you may need to make the directories and give them the right owner and permissions or "unable to open initial console" will occur. |
|
Back to top |
|
|
widu Guru
Joined: 05 Jun 2004 Posts: 333 Location: Freiburg
|
Posted: Sat Jul 17, 2004 7:39 am Post subject: |
|
|
I allready excluded /proc, /sys and /tmp, now /dev is also excluded.
I gave it a try and cloned a new system but the failure remains:
unable to open initial console
I took a look at /dev and there's a lot of differences to the original system:
In the original system /dev/tty0 is a character device, whereas in the cloned one, /dev/tty0 is a link to /dev/vc/0, wich is the character device. (this is a general difference between the original and the cloned system, There's a lot of links instead of character devices or block devices)
But the permissions seem to fit:
Code: |
widu@gaylien widu $ ls -l /
...
drwxr-xr-x 1 root root 0 1. Jan 1970 dev
...
dr-xr-xr-x 93 root root 0 17. Jul 08:34 proc
...
drwxr-xr-x 9 root root 0 17. Jul 08:34 sys
...
drwxrwxrwt 10 root root 4096 17. Jul 08:36 tmp
...
widu@gaylien widu $ ls -l /dev
...
lr-xr-xr-x 1 root root 4 17. Jul 08:34 tty0 -> vc/0
...
drwxr-xr-x 1 root root 0 1. Jan 1970 vc
...
widu@gaylien widu $ ls -l /dev/vc
crw------- 1 root root 4, 0 1. Jan 1970 0
...
|
I can't really see what' wrong. |
|
Back to top |
|
|
widu Guru
Joined: 05 Jun 2004 Posts: 333 Location: Freiburg
|
Posted: Sat Jul 17, 2004 8:44 am Post subject: |
|
|
I've googled for about an hour searching for "initial console" but the only useful thing I found was:
Quote: | If this is a new install and configuring it for a Pure UDEV system, or you get an error when you finally reboot after installing udev and setting it correctly like this: WARNING: Unable to open an initial console. It is because there is no /dev/console and /dev/null. What is happening is that /dev/console is needed before udev is populating the /dev folder. You can try this by manually deleting all static devices in /dev folder from another system, then rebooting to the udev system. You will get the console error. You will also notice that it is faulting at a time before it normally loads udev. If you just make /dev/console though it will then fail for /dev/null. So it needs both of those static in /dev, at least for the time being. The fix for now is to manually create them in your /dev folder. |
But both devices exist:
Code: | gaylien root # ls -l /dev
...
crw------- 1 widu root 5, 1 1. Jan 1970 console
...
crw-rw-rw- 1 root root 1, 3 1. Jan 1970 null
... |
|
|
Back to top |
|
|
greg_g Retired Dev
Joined: 02 Mar 2003 Posts: 180
|
Posted: Sat Jul 17, 2004 9:48 am Post subject: |
|
|
There's a paragraph in the udev guide that can be useful: Missing device node files at boot. |
|
Back to top |
|
|
widu Guru
Joined: 05 Jun 2004 Posts: 333 Location: Freiburg
|
Posted: Sat Jul 17, 2004 10:35 am Post subject: |
|
|
I just found a workaround:
I unpacked the stage2 tarball, deleted everything but /dev and restored my system backup. Now everything works on the cloned system.
But I really don't konw where the fault is, because there were no missing devices. |
|
Back to top |
|
|
Cobron n00b
Joined: 01 Feb 2003 Posts: 45
|
Posted: Fri Aug 27, 2004 6:38 pm Post subject: |
|
|
Thank you, garbage. I just switched to reiser4 and got the 'warning: unable to open initial console' message whilst linux booted perfectly (although I didn't see the startup messages).
Following steps (from gentoo udev-guide) fixed it for me:
Quote: | To see which devices nodes are present before the /dev filesystem is mounted, run the following commands:
Code Listing 3.1: Listing device nodes available at boot
# mkdir test
# mount --bind / test
# cd test/dev
# ls
The devices needed for a successful boot are /dev/null and /dev/console. If they didn't show up in the previous test, you have to create them manually. Issue the following commands in the test/dev/ directory:
Code Listing 3.2: Creating necessary device node files
# mknod -m 660 console c 5 1
# mknod -m 660 null c 1 3
When you're finished, don't forget to unmount the test/ directory:
Code Listing 3.3: Unmounting the test/ directory
# cd ../..
# umount test
# rmdir test
|
(I intentionally upped this post because chances are regular users like myself will start switching to reiser4 and experience this problem too. Now all keywords should be in this thread if peeps start searching) |
|
Back to top |
|
|
Jowilly Guru
Joined: 22 Jun 2002 Posts: 319
|
Posted: Mon Aug 30, 2004 9:33 pm Post subject: |
|
|
Thanks a lot Cobron !
initial console wasn't working since I switched over to reiser4.
It finally works again ! |
|
Back to top |
|
|
pibelss Tux's lil' helper
Joined: 08 May 2004 Posts: 102 Location: Burgos,Castilla y Leon, Spain, Europe,...
|
Posted: Fri Nov 12, 2004 3:11 pm Post subject: |
|
|
Thank you. I had the same error |
|
Back to top |
|
|
|