# udev/devfs boot error [SOLVED]

## willdev

[SOLVED]

The suggestions got me on the right track.

What didn't work: 

1.) remounting "/" or any filesystem form the default bash prompt.

     This didn't work because devices were not found.  I don't know if udev or devfs was the cause.

2.) Passing boot parameters from grub.

      No matter what option I used, (devfs=nomount or mount, etc) got me to the same default bash shell.

What did work:

1.) Boot using live cd

2.) mount / into /mnt/gentoo

3.) mount /boot into /mnt/gentoo/boot

4.) mount /usr, /var, /home, /usr/portage, /var/tmp/portage into respective mount points. (I have 2 hard drives with the partitions listed above.)

5.) mount proc into /mnt/gentoo/proc.

6.) chroot into my mounted gentoo system.

7.) Edit /etc/fstab, changing the /dev/hdX references to the udev style /dev/discs/discX/partY

8.) Re-emerged baselayout, binutils, coreutils.

           baselayout also did readline, sysvinit

I then rebooted and my wonderful gentoo system was back!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/b]

Hi All,

I have borked my system! And really need your help on this.

I have a toshiba 5205-s703.  I want to keep the system as is, lot's of kernel patching.....

Running gentoo-2.4.22-r12 kernel had udev working.

I don't know what I did to get to this state.....

When booting, acpi loads fine, partitions are found, but 1/2 of the way through the boot process, an "init-2.0#" command prompt comes up and the boot process stops.

My partitions are mounted as read-only.  My root "/" directory is mounted and has the correct folders underneath. But /usr is empty.  In fact any of my linux partions are mounted as empty.

When I run df -h, all partitions are shown as 27% free.  I know that this is not correct.

I have tried gentoo=nodevfs and gentoo=noudev to try and get to a working system.

I noticed that there was a new /etc/filesystems that was empty.  My original /etc/filesystem is now /etc/filesystem.OLD.  I didn't make this change.  Something else did.

I used livecd to boot the laptop, mounted my / partition and switched the /etc/filesystem files.  Didn't work.

John

----------

## GungHo

just a wild guess:

have you tried running an fsck on your filesystems ?

What kind of filesystems do you have ?

Do you have a backup ?

What are these lot's of kernel patches you are writing about ?

----------

## willdev

I am running with reiserfs.  I have run reiserfsck, they are fine.

I have back-ups so I wouldn't really lose any data.

The patches are for the 'legacy free' acpi system that this laptop is.  And some alsa patches, and power management patches and some pptp/mppoe patches.

Just was hoping that there would be any easy way to fix udev or go back to devfs.  And then I would not have to figure out again how to patch the kernel to get this beast of a laptop running again.

John

----------

## GungHo

Hi,

hmm, I had a similar issue with reiser, have a look at https://forums.gentoo.org/viewtopic-t-291227-highlight-.html

But I was able to recover almost all of the lost data.

----------

## wiktorw

 *willdev wrote:*   

> Just was hoping that there would be any easy way to fix udev or go back to devfs.  And then I would not have to figure out again how to patch the kernel to get this beast of a laptop running again.
> 
> 

 

Have you tried specifying boot parameters for kernel to turn on/off udev and/or devfs?

You can do it easily in grub, just press 'e' instead of [Enter] on grub main menu.

You will be effectively put into 'editing' mode of grub.conf file (though, the changes you

do this way won't be persistent). When you'll think that you've finished, just boot

the selected kernel by pressing 'b'. And read the on-screen instructions  :Smile: 

For example, you can put "devfs=nomount" or "devfs=mount" at the end of the "kernel" line.

Please note, that this works for self-built kernels (created without using genkernel).

Alternatively, if you created the kernel via genkernel (and so it uses the initrd), you can try

the following options: "devfs", "nodevfs", "udev", "noudev" on the very same "kernel" line.

However, if you use LILO, then you will have to specify all the options by hand.

Your success may also depend on whether you changed the /etc/conf.d/rc file or not.

Because this file also specifies some things for udev/devfs.

But if you want, you can always try the good, old method and specify "init=/bin/bash" on

the kernel line. Then you will be put immediately into the shell and you can repair your system

manually. E.g. remount the / in read-write, use the editor to change config files, etc.

Hope this helps a bit.

----------

## wiktorw

 *willdev wrote:*   

> What did work:
> 
> 7.) Edit /etc/fstab, changing the /dev/hdX references to the udev style /dev/discs/discX/partY
> 
> 8.) Re-emerged baselayout, binutils, coreutils.
> ...

 

I don't think you really need to change /etc/fstab the way you described.

I run my system on udev exclusively and I never need that (currently it's on 2.6.11-nitro2 kernel).

Do you have in your system a proper "hotplug" package?

If you don't, then udev requests may be going into nowhere, and no /dev/hdX devices will be created.

Read (once again?) The complete Gentoo Linux 2.6 migration guide to get a better overview of udev.

Depending on your needs you may also need "coldplug" package.

----------

## willdev

 *wiktorw wrote:*   

>  *willdev wrote:*   What did work:
> 
> 7.) Edit /etc/fstab, changing the /dev/hdX references to the udev style /dev/discs/discX/partY
> 
> 8.) Re-emerged baselayout, binutils, coreutils.
> ...

 

I didn't think so either, but I read in a post and a howto that that is the correct way to setup fstab for a udev only system.

 *wiktorw wrote:*   

> 
> 
> Do you have in your system a proper "hotplug" package?
> 
> If you don't, then udev requests may be going into nowhere, and no /dev/hdX devices will be created.
> ...

 

I have both cold and hot plug packages installed.

----------

