Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with initramfs and udev
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
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Mon Dec 05, 2005 7:25 pm    Post subject: Problem with initramfs and udev Reply with quote

Over the week-end, I reinstalled my system from scratch but my problem is not going away.

Description:
I am using evms (with raid1 and lvm), hence I have made my kernel via genkernel, using the --evms2 option. Consequence, I have an initramfs generated and use that one when booting.

During the boot process (but long before syslog-ng is started hence the messages are rapidly scrolling over my system), I got something like this:

Booting (initramfs) cannot umount /dev: device busy
Failed to unmount the initrd /dev


Once booted, when inserting a usb device, the necessary nodes are not made in the /dev directory. However, when I issue the udevstart command with the device attached, the nodes are created (they do not go away when I remove the device).

I am using ~x86 for everything, have Gnome 2.12 installed but inserted usb devices are not automatically mounted and there are no icons placed on my desktop (looking to the forum and the bugreports, lots of people have problems with that but as long as my device nodes are not correctly created it is of no use to start looking into this).

Help please. If I need to post more information, just tell me.
Back to top
View user's profile Send private message
cpu
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2003
Posts: 122
Location: POLAND/ZG

PostPosted: Tue Dec 06, 2005 11:30 am    Post subject: Re: Problem with initramfs and udev Reply with quote

kdvgent wrote:
Over the week-end, I reinstalled my system from scratch but my problem is not going away.

Description:
I am using evms (with raid1 and lvm), hence I have made my kernel via genkernel, using the --evms2 option. Consequence, I have an initramfs generated and use that one when booting.

During the boot process (but long before syslog-ng is started hence the messages are rapidly scrolling over my system), I got something like this:

Booting (initramfs) cannot umount /dev: device busy
Failed to unmount the initrd /dev


Once booted, when inserting a usb device, the necessary nodes are not made in the /dev directory. However, when I issue the udevstart command with the device attached, the nodes are created (they do not go away when I remove the device).

I am using ~x86 for everything, have Gnome 2.12 installed but inserted usb devices are not automatically mounted and there are no icons placed on my desktop (looking to the forum and the bugreports, lots of people have problems with that but as long as my device nodes are not correctly created it is of no use to start looking into this).

Help please. If I need to post more information, just tell me.


Exactly same situation on my system by I don't use evms just pure gentoo with SATA drive and while I'm plugging iRiver H320 (USB HDD) udev don't create necessary nodes in /dev but when I run udevstart everything is fine...

I also get this warning while booting kernel
Booting (initramfs) cannot umount /dev: device busy
Failed to unmount the initrd /dev
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Dec 06, 2005 1:24 pm    Post subject: Reply with quote

In kernels pre 2.6.13 still was devfs as an option and there was an option to mount devfs automatically ab boot.

Check if you have activated this option. This will prevent udev from working.
Back to top
View user's profile Send private message
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Tue Dec 06, 2005 8:45 pm    Post subject: Thanks for the suggestion Reply with quote

But that option is no longer available in the kernelconfiguration (genkernel --menuconfig --evms2 all), hence I certainly have not enable it.
Back to top
View user's profile Send private message
coffie
n00b
n00b


Joined: 16 Apr 2003
Posts: 11
Location: Corvallis, OR

PostPosted: Tue Dec 06, 2005 10:38 pm    Post subject: Reply with quote

Same issues, Seems to have something to do with genkernel 3.3.8. Tried compiling using the following flags:

Code:
genkernel --menuconfig --gensplash=GoGentooGo --no-devfs all


No avail.

***UPDATE***

I'm going to file a bug for genkernel, please update your comments there also.

This looks to be the same bug: https://bugs.gentoo.org/show_bug.cgi?id=110492
Back to top
View user's profile Send private message
prosario_2000
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 105
Location: San Juan, Puerto Rico

PostPosted: Wed Dec 07, 2005 8:21 pm    Post subject: Reply with quote

I think the most recent version of genkernel is responsible here, but I'm not sure.
Back to top
View user's profile Send private message
fiercely
n00b
n00b


Joined: 15 Nov 2005
Posts: 19
Location: Ottawa, ON, Canada

PostPosted: Wed Dec 07, 2005 11:56 pm    Post subject: genkernel 3.3.8 Reply with quote

i am not sure exactly how or why and i have not checked bugzilla if this issue has already been noticed or addressed, but i downgraded to genkernel 3.3.6 and tried to reinstall my kernel with initramfs and it worked fine. i do believe these problems might have something to do with genkernel.

so a quick solution is to simply: "emerge =sys-kernel/genkernel-3.3.6" to downgrade and then use genkernel to recompile your kernel.
Back to top
View user's profile Send private message
fschinagl
n00b
n00b


Joined: 02 Dec 2005
Posts: 5

PostPosted: Thu Dec 08, 2005 12:55 am    Post subject: Reply with quote

Hi everyone,

Perhaps you will find the following helpful - I haven't tried implementing these ideas yet.

The cause(s) for the described problem may have roots in in a combination of udev, evms, and the fact that you have to use an initial ram disk. A severe form of chicken and egg problem.

As you know your initrd (initial ram disk) script(s) must activate a minimum number of /dev entries in a (usually) temporary fashion to be able to bootstrap the system (including an instance of evms) before it can tell the kernel about the location of the root fs provided through evms and instruct the kernel to pivot the root file system.

Have a look at the /linuxrc script in your initrd file that your machine loads to preinitialize the kernel. Perhaps try to modify /linuxrc to intialize a pure udev system and have /linuxrc MOVE /dev to your real root file system after pivot root rather than trying to deactivate the temporary /dev and rebuilding a new /dev on the root fs that evms provides.

Allegedly one can "mount --move" a file system such as /dev. If it's possible to FULLY move /dev from within /linuxrc than it seems to me that it would no longer be necessary to start and stop or restart udev which can cause all sorts of problems with persistent devices such as the ones evms requires.
Back to top
View user's profile Send private message
cpu
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2003
Posts: 122
Location: POLAND/ZG

PostPosted: Thu Dec 08, 2005 9:04 am    Post subject: Reply with quote

fschinagl wrote:
Hi everyone,

Perhaps you will find the following helpful - I haven't tried implementing these ideas yet.

The cause(s) for the described problem may have roots in in a combination of udev, evms, and the fact that you have to use an initial ram disk. A severe form of chicken and egg problem.

As you know your initrd (initial ram disk) script(s) must activate a minimum number of /dev entries in a (usually) temporary fashion to be able to bootstrap the system (including an instance of evms) before it can tell the kernel about the location of the root fs provided through evms and instruct the kernel to pivot the root file system.

Have a look at the /linuxrc script in your initrd file that your machine loads to preinitialize the kernel. Perhaps try to modify /linuxrc to intialize a pure udev system and have /linuxrc MOVE /dev to your real root file system after pivot root rather than trying to deactivate the temporary /dev and rebuilding a new /dev on the root fs that evms provides.

Allegedly one can "mount --move" a file system such as /dev. If it's possible to FULLY move /dev from within /linuxrc than it seems to me that it would no longer be necessary to start and stop or restart udev which can cause all sorts of problems with persistent devices such as the ones evms requires.


But I get this error too and I don't have evms...
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Thu Dec 08, 2005 5:34 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Kernel & Hardware.
Postinstallation problem, looks kernel/hardware related
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
fschinagl
n00b
n00b


Joined: 02 Dec 2005
Posts: 5

PostPosted: Thu Dec 08, 2005 7:41 pm    Post subject: Reply with quote

If you don't use evms, think of the "evms" references in my earlier message as place holders for other services (for example some usb specific kernel/user space tools) that rely upon certain devices in such a way that the respective device nodes cannot be removed because, for example, the system requires access to one of the devices.

Let's try an analysis first:

Your previous message indicates two issues:

A) /dev cannot be unmounted (that's the one within the initial ramdisk environment - look for /initrd/dev in your real root fs, that's where most initial ram disk scripts put it after they pivot root - see /linuxrc in the inird.gz or whatever name you gave it).
B) At least certain USB devices are not automatically generated (those within the real root fs).

Re A) Check your /initrd/dev file system for REQUIRED device nodes (those that point at devices that the scripts in your initial ramdisk e.g. /linuxrc cannot deactivate because they ARE BEING USED) which prohibit your machine from unmounting /dev. This can be tricky as your initial ramdisk may (additionally) use "persistent" regular file-type like device nodes that exist in the file system and can mix with with the ones created by udev or devfs - try to not use devfs in your inital ramdisk.

Check if there are USB device nodes in /initrd/dev that seem to refer to your USB HDD.

Re B) Besides A), which could be the cause your "problem", try to find out why, as you describe, when you invoke udevstart (as I understand after you physically attach your USB HDD to your computer - do you turn on your USB HDD before or after you attach it to your computer?) creates the device nodes you need. It could be that your machine does not run properly activate udev after pivot root. Do you run hotplug?

Further reading:

Research more details about hotplug (e); The following is a more remote option but I think that despite hotplug being able to handle USB devices there might be another user space tool that could be more specifically intended for automatic USB device (dis-)connect handling.

Please familiarize yourself with the functionality of udev - see http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
Back to top
View user's profile Send private message
cpu
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2003
Posts: 122
Location: POLAND/ZG

PostPosted: Fri Dec 09, 2005 4:22 pm    Post subject: Reply with quote

Downprgade genkernel to 3.3.6 resolves this problem so it's genkernel related
Back to top
View user's profile Send private message
coffie
n00b
n00b


Joined: 16 Apr 2003
Posts: 11
Location: Corvallis, OR

PostPosted: Mon Dec 19, 2005 6:56 pm    Post subject: Updates Reply with quote

Anyone know of the status for this bug?
Back to top
View user's profile Send private message
vla_do
Apprentice
Apprentice


Joined: 13 Mar 2004
Posts: 165

PostPosted: Tue Dec 20, 2005 10:17 am    Post subject: Reply with quote

Check bug #113684
Quote:
Fixed in 3.3.9; the solution was to upgrade udev to 077 if you're interested.
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