View previous topic :: View next topic |
Author |
Message |
solarium_rider Tux's lil' helper
Joined: 23 Jun 2003 Posts: 88 Location: San Francisco
|
Posted: Thu Jul 07, 2005 5:37 am Post subject: [Solved] Init scripts not finding devfs or udev |
|
|
I've searched the forums and docs for the last 4-5 hours and can't find anything, so I'm resorting to posting.
I'm transitioning to udev from devfsd and running into some issues. The first init scripts say that I do not have support for devfs or udev, and tell me to look at the gentoo handbook for more information. I have emerged udev, set the kernel settings according to the migration to 2.6 guide and the udev guide (I have just removed devfs completely from the kernel.) I'm using the latest gentoo-sources-2.6.12-r4 kernel. I have unmerged devfs and set no_device_tarball option in the conf.d/rc. I have tried booting with gentoo=nodevfs gentoo=udev (and combinations of those). The only error I get during bootup is that hdparm tries to operate on disc4 which doesn't exist. As a side effect, I cannot use xterm or konsole. They don't do anything. To access a console i have to switch to ctrl-alt-1.
There are 3 . files in my /dev directory:
Code: | .devfsd
.keep
.udevdb/
|
Looks like it's still using devfs? I don't understand how. If you need to see my config files, let me know which ones to post.
Thanks
Last edited by solarium_rider on Thu Jul 07, 2005 7:41 am; edited 1 time in total |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Thu Jul 07, 2005 5:54 am Post subject: |
|
|
I use the device tarball, but this should not make a big difference.
When I went pure udev I just moved /dev to /dev_save and did mkdir /dev
At the next boot udev complained about /dev/console not there, but it created it and the system worked. Because I am using the tarball I never got this message again. Probably you will get it every time. |
|
Back to top |
|
|
solszew n00b
Joined: 04 Apr 2004 Posts: 43
|
Posted: Thu Jul 07, 2005 7:21 am Post subject: |
|
|
Hi there--
Have you had a look at the udev primer here:
http://webpages.charter.net/decibelshelp/LinuxHelp_UDEVPrimer.html
It is very detailed, and very good. If you have not read it yet, make a beeline.
Also, have you emerged the most recent baselayout and coldplug ebuild? Evidently, until recently, baselayout would try to load devfs no matter what setting you had in your /etc/conf.d/rc file. And, if you emerge baselayout-1.8.6.13-r1 or newer, you will only have to edit your /etc/conf.d/rc file, rather than both /etc/init.d/halt.sh and /sbin/rc, before having a workable system.
Regarding your console / xterm issues, if you create /dev/null and /dev/console statically with the commands, below, you will avoid some, if not all, of your boot errors.
Code: | cd /dev
mknod -m 660 console c 5 1
mknod -m 660 null c 1 3
|
I hope this helps.
Steve
EDIT: There is a new binary in the latest udev package, called 'udevstart'. According to the man page, "Udevstart walks through the sysfs device tree and calls udev to create
the nodes for every valid device found. It can be used to fill a empty device directory with nodes for all devices currently available on the system." FYI. |
|
Back to top |
|
|
solarium_rider Tux's lil' helper
Joined: 23 Jun 2003 Posts: 88 Location: San Francisco
|
Posted: Thu Jul 07, 2005 7:40 am Post subject: |
|
|
I followed fangorn's advice and renamed /dev and did a mkdir /dev. That seemed to fix my problems. There was a just a problem that occured that the init script told me to fix (basically mount bind / /mnt/fixit; cp /dev/* /mnt/fixit/dev/) and that seemed to fix all the issues on the next boot. I'm using baselayout 1.11.12-r4 and had coldplug installed. Seems like recreated the /dev was necessary?
Thanks |
|
Back to top |
|
|
mikers456 n00b
Joined: 07 Jul 2004 Posts: 36
|
Posted: Sat Jul 16, 2005 4:00 pm Post subject: |
|
|
Hello,
I realize this is solved, but the above solution didn't work for me ... They _almost_ worked. This issue to me screams bug/corner-case. It seems to occur when you are upgrading from an older kernel (in my case 2.6.9) to 2.6.12 and adding udev, removing devfs at the same time. The system can't make the jump to udev directly without some in-between state (both devfsd and udev around during boottime).
I had a very similar problem... My brand new shiny 2.6.12-r4 kernel when booting would refuse to use udev and insisted on devfs NO MATTER WHAT. I didn't even have devfs in the kernel, and the conf.d/rc file had udev options and dev_tarball set to no. When booting, my init scripts (prior to mounting / ) would always say "Activating devfs..." and then complain that they could not find .devfsd or /dev and that my /dev/hda5 was not a valid block device... blah blah blah
Versions of stuff:
* Genkernel 3.2.5
* Kernel 2.6.12-r4, gentoo-sources
* baselayout 1.11.12-r4 (most recent at the time)
* udev 058
* coldplug 20040920
* hotplug 20040923
* hotplug base 20040401
The following things didn't help/did nothing:
- "udev" in the kernel line in the grub.conf didn't help
- specifying --udev at genkernel didn't help (it is a default option with genkernel 3.2.5).
- "gentoo=nodevfs" at kernel line didn't help
- moving the /dev/ directory to something else in my root and mkdir /dev a brand new one (then rebooting) didn't help
- Removing the /dev/.devfsd didn't help
- My filesystem (reiserfs) for my root was already compiled (by default) into the kernel, not as a module.
- Adding coldplug to boot rc-update
- Adding hotplug to boot rc-update
I was changing so many things trying to get something to work... But what seemed to do it was to have both udev and devfs at the SAME TIME in the kernel (so using the default genkernel kernel config for 2.6.12-r4):
File Systems-> Pseudo Filesystems -> [*] /dev file system support (OBSELETE)
and my grub options were:
Code: |
title=Gentoo Linux 2.6.12-r4
kernel (hd0,1)/kernel-genkernel-x86-2.6.12-gentoo-r4 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda5 nodevfs udev devfs=nomount
initrd (hd0,1)/initrd-genkernel-x86-2.6.12-gentoo-r4
|
Then I finally got the /etc/issue thing like so (and init.rd didn't get mounted in that same boot -- don't know why yet):
Code: |
-----------------------------------------------------
Your system seems to be missing critical device files
in /dev ! Although you may be running udev or devfs,
the root partition is missing these required files !
To rectify this situation, please do the following:
mkdir /mnt/fixit
mount --bind / /mnt/fixit
cp -a /dev/* /mnt/fixit/dev/
umount /mnt/fixit
rmdir /mnt/fixit
You may refer to these instructions at /etc/issue.
If you previously had an issue file, it has been
backed up at /etc/issue.devfix.
Thanks for using Gentoo ! :)
http://bugs.gentoo.org/show_bug.cgi?id=40987
-----------------------------------------------------
|
Of course, doing the above didn't fix anything and the message reappeared after following the instructions and issuing a reboot. And my initrd doesn't mount properly at boot still. |
|
Back to top |
|
|
|
|
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
|
|