# Gentoo suddenly doesn't boot anymore [no solution but done]

## neonknight

I have a Gentoo-workstation at work. I shut it down regularly last friday, today it didn't boot anymore. Knoppix boots fine without any trouble.

These are Gentoo's boot messages:

```
mounting proc at /proc [ok]

mounting sysfs at /sys [ok]

mounting /dev for udev [ok]

configuring system to use udev

populating /dev with device nodes

setting /sbin/udevsend as hotplug agent [ok]

mounting /devpts at /dev/pts

activating (possibly) swap

skipping root filesystem check (fstabs passno == 0) [ok]

remounting root filesystem read/write

setting hostname to irc-python

checking all filesystems

mounting local filesystems... [ok]

mount: special device /dev/hda6 does not exist

mount: special device /dev/hda7 does not exist

some local file systems failed to mount [!!]

mounting usb device filesystem (usbfs) [ok]

activating (possibly) more swap

swapon: cannot stat /dev/hda1: no such device or directory [!!]

setting system clock to hardware clock [local time]

/sbin/functions.sh: line 332: rc_splash: command not found

/sbin/functions.sh: line 332: rc_splash: command not fount [ok]
```

So, this looks as if it can't find the harddisk anymore. Well, Knoppix does without any problem. I can mount them, fsck them, look at them in fdisk-tools... Knoppix even uses the swap-partition!

You may have noticed this line:

```
skipping root filesystem check (fstabs passno == 0) [ok]
```

if set to passno == 1, Gentoo boots until this point and then says:

```
checking root filesystem

failed to open /dev/hda5: no such file or directory

filesystem couldn't be fixed :(

/sbin/functions.sh line 332: rc_splash: command not found

/dev/tty1: no such file or directory

Give root password for maintenance

(or type Control-D to continue):
```

Typing ctrl+d causes a reboot. Entering the root-password brings me to singleuser-runlevel. I looked at /dev, hda, hda1, hda5-8 do not exist. but hda2-4 and hda9-20 do!

```
# mount

/dev/hda5 on / type reiserfs (rw,noatime,acl)

[...]

```

The filesystem is readonly anyway...

OK, the usual question: What did I change?

The usual answer: nothing at all! I tried to recall and undo any changes I made the last few days. I even tried to boot with an old kernel - no change in behaviour.

I'm clueless...

Because: If it can't mount /dev/hda5 to /, why can it find init and continue to boot the runlevels after the kernel has been inialized? If /dev/hda5 really didn't exist, I should get a kernel panic!

If I mount /dev/hda5 in Knoppix, I can see that there are many hdaX-device-nodes in /mnt/hda5/dev (which is /dev for Gentoo). They should also be created by udev or copied from the device-tarball

And after all: It is exactly the same system as on friday - the only things I changed were samba/ldap/apache/mysql configuration and stored data - there's nothing that should affect the kernel, the init-process or even the hardware.

What could have happened?

What can I do to repair this system?Last edited by neonknight on Wed Sep 28, 2005 8:48 am; edited 2 times in total

----------

## fvant

Sounds like you have this issue:

Missing device node files at boot

If you can't boot successfully because you get an error about /dev/null not found, or because the initial console is missing, the problem is that you lack some device files that must be available before /dev is mounted and handled by udev. This is common on Gentoo machines installed from old media. 

See this guide for the full story http://www.gentoo.org/doc/en/udev-guide.xml

----------

## davidgurvich

Start up from CD and check your /etc/fstab.  There is a chance it got overwritten.

----------

## neonknight

@davidgurvich:

Wrong guess  :Wink:  /etc/fstab is allright. There are devices missing!!!

@fvant:

I worked through the udev-guide, but it didn't help. I'm not missing /dev/null or /dev/console but /dev/hda and its partitions.

If I log in in singleuser-mode, I can go to /dev and run 

```
MAKEDEV hda
```

then all my missing devices (hda, hda1, hda5, hda6, hda7 and hda8) will be created. Of course after a reboot they're gone again...

----------

## neonknight

As I am not paid to play around I am going to repair it the Windows-way: Reinstallation.

Consider this problem as "solved"

----------

## Po0ky

I'm having the same problem right now but reinstalling aint an option over here. I'm quit time-bound.

And with this problems comes another one, Portage does nothing anymore... Trying to get it to update udev. But the poor thing doesn't do sh..t.

Anybody still with some inside thoughts?

----------

## PaulBredbury

 *Po0ky wrote:*   

> Anybody still with some inside thoughts?

 

Your error report is kinda lacking in detail - elaborate on "emerge udev", and what you have emerged since the last successful reboot ("genlop -l")...

----------

## Po0ky

There is not much more to say...  :Smile: 

I got the same problem (failing to find /dev/hd?X)

So I booted with a livecd to try n fix it. But, all merge command's fail. 

I'm also unable to extract sth with tar and ls doesn't seem to work neither...

So I decided to follow the same path as neonknight

----------

## PaulBredbury

If portage dies, read /usr/portage/sys-apps/portage/files/README.RESCUE (so you know for next time).

----------

## Po0ky

I will

But one remark: tar failed to. That makes using the portage-resque impossible  :Wink: 

----------

## PaulBredbury

 *Po0ky wrote:*   

> That makes using the portage-resque impossible 

 

You could use tar from the LiveCD.

----------

## vampares

need console=tty1

```
title kern.2612mmr2.4

root (hd0,0)

kernel /kern.2612mmr2.4 console=tty1  md=2,/dev/sda2,/dev/sdb2  root=/dev/md2 
```

----------

## Po0ky

console=tty1 didn't resolve the problem.

I'm havin the same problem after the whole re-install btw.. *grmbl*

Doesn't appear to be a kernel problem.

All devices are done like they should exept for the /dev/hda1 /dev/hda2 /dev/hda3. These are missing.

(Could it have something to do with the chipset? or with pnp configuration ? (acpi/isa))

[EDIT]

OK, found out what is wrong... apparently it is a problem with udev and nss_ldap.

rebooting now, hopin it will work  :Wink: 

----------

## Enderson

 *Quote:*   

> OK, found out what is wrong... apparently it is a problem with udev and nss_ldap.
> 
> rebooting now, hopin it will work 

 

What did you do ? I'm having the same problem and still didn't solved it.

[UPDATED]

I did a reboot with gentoo=noudev kernel parameter, and it booter with a message that I need UDEV or DEVFS support on kernel, but started OK.

after that, i starts wihout the gentoo=noudev parameter, it finds the hda but don't find the /dev/vg LVM device.

Even with this parcialy working, the "Populating /dev ..." message take too long, about 20-30s.

----------

## MEW

Do the devices exist in your device tarball (probably /lib/udev-state/devices.tar.bz2)? I had a similar problem where I accidentally overwrote /dev/null, and the overwritten version was put in the tarball.

----------

## Enderson

 *MEW wrote:*   

> Do the devices exist in your device tarball (probably /lib/udev-state/devices.tar.bz2)? I had a similar problem where I accidentally overwrote /dev/null, and the overwritten version was put in the tarball.

 

The vg device doesn't exist on the /lib/udev-state/devices.tar.bz2 .

So i recreated the devices.tar.bz2 with tar, and it rebooted OK with udev, but the 

"Populating /dev " still takes too long, it's more than 30s, I think 1min dunno.

but now it works with /dev/vg, but I can't get some /dev/file created when I get some modules loaded.

Like zaptel, the udevrules are OK, but the /dev/zap don't get created.

I don't know where's the problem anymore.

[EDIT]

I solved the problem of boot hanging on Populating /dev commenting a line 

```

#KERNEL=="tpm*",   NAME="%k", OWNER="tss", GROUP="tss", MODE="0600"

```

I found this on this bug sys-fs/udev hangs when running udevstart at boot, due to non-existant groups and nss_ldap search timeouts

----------

## Po0ky

You just have to alter your nsswitch.conf. Disable ldap with hosts

```

passwd:     files ldap

group:      files ldap

shadow:     files ldap

#

hosts:      files dns wins

#

```

----------

## georgemj

 *Po0ky wrote:*   

> You just have to alter your nsswitch.conf. Disable ldap with hosts
> 
> ```
> 
> passwd:     files ldap
> ...

 

I also just discovered the same thing yesterday afternoon.  I have ldap enabled for users and groups, that's no problem.  But for hosts (as the last option) udev is rendered broken.

Why is that?

do udev rules look for hosts?

----------

