# System not booting because of devfsd

## Yacine_M

Hello everyone,

each time I start my Gentoo system, I get the following messages:

```
STEP 1: Command-line parsing

STEP 2: Module loading

... (module stuff)

STEP 3: Mounting necessary filesystems per boot options

mount: Mounting devfs on /dev failed: no such device

Error opening file: ".devfsd"   No such file or directory

STEP 4: Determining root device

Root block device unspecified or not detected.

Please specify a device to boot, or "shell" for a shell.

: _
```

Then when I type /dev/hda5, I shows the same error message again (Root block device unspecified or not detected, etc etc).   :Evil or Very Mad: 

I have a gentoo-dev-sources-2.6.5 kernel with the following configuration:

```
#

# Pseudo Filesystems

#

CONFIG_PROC_FS=y

CONFIG_PROC_KCORE=y

#CONFIG_DEVFS_FS is not set

#CONFIG_DEVPTS_FS_XATTR is not set

CONFIG_TMPFS=y

CONFIG_RAMFS=y
```

I have these kernel options in lilo.conf:

```
root=/dev/ram0 real_root=/dev/hda5 init=/linuxrc gentoo=nodevfs
```

I have baselayout-1.8.6.13-r1 with:

```
RC_DEVFSD_STARTUP="no"
```

and udev-024-r1, hotplug-20040401, hotplug-base-20040401, devfsd-1.3.25-r6, sysfsutils-0.4.0.

I have spent hours looking for a solution, read Decibel's UDEV primer 10 times... And still can't work it out...   :Embarassed: 

If you have a clue, could you please help me? Did I miss something?

Thanks.

----------

## agent_jdh

Have you added hotplug to the boot runlevel?

```
rc-update add hotplug boot
```

----------

## Yacine_M

 *agent_jdh wrote:*   

> Have you added hotplug to the boot runlevel?
> 
> ```
> rc-update add hotplug boot
> ```
> ...

 

I did (after updating hotplug & hotplug-base, a few days ago).

I have this bootup problem since I recompiled my kernel, this morning.

Before, everything seemed to work properly, but it showed step 3 & step 4 stuff anyway.

I just noticed I can't chroot from my old Gentoo 1.4 LiveCD:

```
FATAL: Kernel too old.
```

Oh... Sorry for the english mistakes...

----------

## agent_jdh

This leaves one of two possibilities

1.  You've missed something out of your kernel config (I don't use gentoo-dev-sources, so I don't know if there are options there you need to get udev to work e.g. sysfs support)

2.  Kernel bug

Go back to your old kernel just to check 100% it is the kernel that causes the problem.

Try development-sources kernel instead of gentoo-dev-sources - gentoo-dev-sources has extra patches which might be the cause of this problem.

I have development-sources-2.6.5 and udev with no problems.

----------

## pigah1

I'm having the same problem.  I'm using genkernel with gentoo-dev-sources and there doesn't seem to be an explicit SYSFS option in the configuration.  I just recompiled after updating the sources to 2.6.5.  So bummed.

----------

## agent_jdh

 *pigah1 wrote:*   

> I'm having the same problem.  I'm using genkernel with gentoo-dev-sources and there doesn't seem to be an explicit SYSFS option in the configuration.  I just recompiled after updating the sources to 2.6.5.  So bummed.

 

I was just using sysfs as an example of something that might be different between gentoo-dev-sources and development-sources.

Do you mean you've tried development-sources as well?

----------

## pigah1

 *Quote:*   

> Do you mean you've tried development-sources as well?

 

No, only gentoo-dev-sources, but I guess other options must compile sysfs

Anyway, I added devfs support back into the kernel and it worked.  I think this means I'm not using udev, but it is working for now.  I don't think I will mess with it for a bit.

----------

## Yacine_M

Thanks, I'll try adding devfs support to the kernel from a LiveCD. By the way, which LiveCD can I use? I've downloaded the 2004.0 minimal LiveCD, and I get the "FATAL: Kernel too old" error when I try to chroot.

----------

## pigah1

I'm a total noob, but do you need to chroot in order to compile the kernel?  Couldn't you just manually make it and then copy it to /boot?

i.e.

```
cd mnt/gentoo/usr/src/linux

make menuconfig

cp arch/arch/i386/boot/bzImage /mnt/gentoo/boot/

```

and then change your lilo.conf/grub.conf to match.

----------

## Yacine_M

 *pigah1 wrote:*   

> I'm a total noob, but do you need to chroot in order to compile the kernel?  Couldn't you just manually make it and then copy it to /boot?
> 
> i.e.
> 
> ```
> ...

 

I never managed to install a kernel without doing "chroot": /sbin/lilo creates files in /boot.

----------

## ett_gramse_nap

 *Yacine_M wrote:*   

> I never managed to install a kernel without doing "chroot": /sbin/lilo creates files in /boot.

 

I've compiled several kernels and never used chroot. Maybe that's a  lilo specific thing?

----------

## Yacine_M

I managed to compile a new mm-sources kernel from a LiveCD, with devfsd compiled-in.

I created a second mm-sources bzImage with no devfsd compiled-in, and I can't boot it.

I tried to unmerge devfsd, it does'nt solve the problem.

Weird...

----------

## agent_jdh

 *Yacine_M wrote:*   

> I managed to compile a new mm-sources kernel from a LiveCD, with devfsd compiled-in.
> 
> I created a second mm-sources bzImage with no devfsd compiled-in, and I can't boot it.
> 
> I tried to unmerge devfsd, it does'nt solve the problem.
> ...

 

Not really weird, Gentoo _needs_ devfs(d), unless you are using udev, which is a 100% userland replacement for devfs(d).

----------

## Yacine_M

I use udev... But can't get rid of devfs...

----------

## agent_jdh

 *Yacine_M wrote:*   

> I use udev... But can't get rid of devfs...

 

Doh!  Sorry, trying to follow too many threads at one team, completely forgot where I was there.

Still can't think of a solution to your problem though.

----------

## Decibels

```
root=/dev/ram0 real_root=/dev/hda5 init=/linuxrc 
```

Have you tried not using the genkernel? Udev is still experimental and there might be a timing issue. The /dev/ram0 might not be created  by the time it needs it with that line above.

After looking back again. I see you say your using the gentoo-dev-sources-2.6.5 kernel, then why are you using genkernel lilo.conf append lines? May be the source of the problem.

From Configuring the bootloader in Gentoo Install guide:

```
# For non-genkernel users

image=/boot/kernel-2.4.25-gentoo

  label=gentoo            # Name we give to this section

  read-only               # Start with a read-only root. Do not alter!

  root=/dev/hda3          # Location of the root filesystem

# For genkernel users

image=/boot/kernel-2.4.25-gentoo

  label=gentoo

  read-only

  root=/dev/ram0      <----notice, genkernel only.

  append="init=/linuxrc real_root=/dev/hda3"   <----notice genkernel only.

  initrd=/boot/initrd-2.4.25-gentoo

```

----------

## thomasmue

I have the same problem with genkernel / udev /gentoo-dev-sources 2.6.5-r1

IMHO this may be a genkernel problem, because:

```

VFS: Mounted root (ext2 filesystem) readonly

>>Loading modules  ...

 .

 .

 .

>> Mounting filesystems ...

     mount: Mounting devfs on /dev failed: no such device

     Error opening file ".devfsd" : no such file or directory

>> Determining root device...

>> Block device /dev/hda6 is not a valid root device

>> The root block device is unspecified or not detected

     Please specify a device to boot or "shell" for a shell:

     boot()::

```

I think that genkernel tries to use devfsd, which is not intended.

After entering the shell, creating the device manually, exiting and specifying the just created devicenode as boot device the boot process continues.

A moment later I get a message 

initrd.mount: bad superblock, device busy or to many mounted devices (or so)

can't move over the /dev tree (or so)

but startup continues, and then udev kicks in. 

Maybe editing the initrd could help, but I don't know how.

Best regards

Thomas

----------

## Yacine_M

Sorry I haven't had time to play around with gentoo for a few days but i'm back.

I finally managed to get love-sources running without devfsd support, by removing the initrd="..."  and "real_root=/dev/hda5 root=/dev/ram0 init=/linuxrc" options from /etc/lilo.conf.

Thanks everyone.

Apparently the initrd thing tried to use devfsd at startup (I don't get the "STEP x: ..." messages anymore), but i'm not so sure.

Does this mean no initial ram disk for udev users?  :Sad: 

Has anyone managed to get a working initrd on a udev-only system?

----------

