# failed system? fsck errors and others....

## jrks518

I don't know how this started, possibly after executing 

```
e2fsck -fp /dev/hda3 or hda1 
```

or possibly after executing and interrupting 

```
fsck /dev/hda1 or 3 
```

(I can't remember which).

Either way, I rebooted my computer and the following errors came up:

```
* Checking root filesystem

fsck: fsck.xfs: not found

fsck: error 2 while executing fsck.xfs for /dev/ROOT
```

Then...

```
* Checking all filesystems

fsck.ext2: No such file or directory while trying to open /dev/BOOT

/dev/BOOT

The superblock could not be read or does not describe a correct ext2 filesystem.  If the device is valid and really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:

      e2fsck -b 8193 <device>

* Fsck could not correct all errors, manual repair needed                                      [!!]

Give root password for maintenance (or type Control-D for normal startup)
```

When I ran "e2fsck -b 8193 /dev/hda3" as suggested, I got the same message:

```
The superblock could not be read or does not describe a correct ext2 filesystem.  If the device is valid and really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:

      e2fsck -b 8193 <device> 
```

When I type Control-D, as suggested, I get the following errors after several things load successfully:

```
*Bringing eth0 up (192.168.0.2)

SIOCSIFADDR: No such device

eth0: unknown interface: No such device

SIOCSIFBRADDR: No such device

eth0: unknown interface: No such device

SIOCSIFNETMASK: No such device
```

Then...

```
* Starting cupsd

* Setting DNS domainname to homenetwork

ERROR: Problem starting needed services

     "portmap" was not started

ERROR: Problem starting needed services

     "famd" was not started

ERROR: Problem starting needed services

     "netmount" was not started

* Starting vixie-cron

* Setting up xdm

* Starting local

/etc/host.conf: line 24: bad command 'mdns off'
```

And when I do ctrl-alt-del:

```
error stopping xdm
```

I tried changing 'mdns off' to 'mdns on', but I got the same error, only it said "bad command 'mdns on'".

I also ran e2fsck -fp on /dev/hda1 and it gave me errors about block counts, and I allowed e2fsck to fix those errors.  Nothing.

Finally, I found something that said to change /dev/BOOT in /etc/fstab to /dev/<device>, so I changed /dev/BOOT to /dev/hda1 and /dev/ROOT to /dev/hda3 and /dev/SWAP to /dev/hda2.  No results there either.

I think I have exhausted my list of things to try (and I think I've named all the things I have tried), and I now need to ask for help.

----------

## NeddySeagoon

jrks518,

It looks like your /etc/fstab does not actually reflect your filesystems.

From the error, /etc/fstab contains an entry /dev/ROOT. That needs to be replaced with your real root partition, possibly /dev/hda3 ?

You may have entries /dev/BOOT and /dev/SWAP. They need to be fixed too.

It looks like the filesystem entries in /etc/fstab are wrong too.

Nobody uses xfs, yet your system is looking for an xfs filesystem on root.

----------

## jrks518

 *NeddySeagoon wrote:*   

> From the error, /etc/fstab contains an entry /dev/ROOT. That needs to be replaced with your real root partition, possibly /dev/hda3 ? 
> 
> You may have entries /dev/BOOT and /dev/SWAP. They need to be fixed too. 
> 
> It looks like the filesystem entries in /etc/fstab are wrong too. 

 

Thank you, NeddySeagoon, you helped me before and you are helping me again. Gentoo got farther this time without errors; however, a couple errors still remain:

```
*Bringing eth0 up (192.168.0.2) 

SIOCSIFADDR: No such device 

eth0: unknown interface: No such device 

SIOCSIFBRADDR: No such device 

eth0: unknown interface: No such device 

SIOCSIFNETMASK: No such device

* Starting cupsd 

* Setting DNS domainname to homenetwork 

ERROR: Problem starting needed services 

     "portmap" was not started 

ERROR: Problem starting needed services 

     "famd" was not started 

ERROR: Problem starting needed services 

     "netmount" was not started 

* Starting vixie-cron 

* Setting up xdm 

* Starting local 

/etc/host.conf: line 24: bad command 'mdns off'
```

As a side note, instead of loading KDE, Gentoo is loading gnome, which I emerged a while ago but don't really use, so if anyone can tell me how to get back to KDE, that would be helpful.

----------

## gentoo_lan

You need to go back into your:

```
/etc/rc.conf
```

and change the session information to reflect what you use.

----------

## jrks518

 *gentoo_lan wrote:*   

> You need to go back into your:
> 
> ```
> /etc/rc.conf
> ```
> ...

 

Thank you, I did that and the KDE login screen loaded.

However, I still have a couple of other issues, one of which I mentioned in my last post.  At the end of the boot sequence, right before I get the login prompt in the console, I still get the following errors:

```
*Bringing eth0 up (192.168.0.2) 

SIOCSIFADDR: No such device 

eth0: unknown interface: No such device 

SIOCSIFBRADDR: No such device 

eth0: unknown interface: No such device 

SIOCSIFNETMASK: No such device 

* Starting cupsd 

* Setting DNS domainname to homenetwork 

ERROR: Problem starting needed services 

     "portmap" was not started 

ERROR: Problem starting needed services 

     "famd" was not started 

ERROR: Problem starting needed services 

     "netmount" was not started 

* Starting vixie-cron 

* Setting up xdm 

* Starting local 

/etc/host.conf: line 24: bad command 'mdns off'
```

And when I do a console login, I get the following errors:

```
tux-login: *my id*

Password:

PAM-env[6774]: Unknown PAM_ITEM: <DISPLAY>

login [6774] PAM pam_putenv: delete non-existend entry: DISPLAY

PAM-env[6774]: Unknown PAM_ITEM: <XAUTHORITY>

login [6774] PAM pam_putenv: delete non-existend entry: XAUTHORITY

login (pam_unix) [6774]: session opened for user *my id* by (uid=0)

Last login: Thu Dec 30 12:01:37 on vc/1
```

Logging out, similar errors:

```
PAM-env[6774]: Unknown PAM_ITEM: <DISPLAY>

*my id* [6774] PAM pam_putenv: delete non-existend entry: DISPLAY

PAM-env[6774]: Unknown PAM_ITEM: <XAUTHORITY>

*my id* [6774] PAM pam_putenv: delete non-existend entry: XAUTHORITY

*my id* (pam_unix) [6774]: session opened for user *my id* by (uid=0)

/etc/host.conf: line 24: bad command 'mdns off'
```

I assume that the latter two sets of errors refer to entries in a configuration file somewhere, but I don't know which one.  And I don't know what to do about the first set.

Thank you for any help you can give.

----------

## NeddySeagoon

jrks518,

```
*Bringing eth0 up (192.168.0.2)

SIOCSIFADDR: No such device

eth0: unknown interface: No such device 
```

Means the module for your network card is not loaded.

modprobe it and run 

```
/etc/init.d/net.eth0 start
```

to get networking up.

CUPS depends on networking, even on a single PC.

I'm not sure about PAM.

This thread 

https://forums.gentoo.org/viewtopic.php?t=269969&start=25 will show you how to determine your network module.

----------

## jrks518

I did the modprobe, found that the correct module was r8169; what is confusing to me is why this isn't loading automatically at boot.  You helped me set that up a long time ago, and it's been working fine since then.

I got r8169 to load, checked ifconfig, and it worked, but on restart I had to repeat the process.  And I still got the same errors (SIOCSIADDR etc., see above).

On the PAM front, I still need someone's help.

----------

## jrks518

I think I'm just going to back up my important files and reinstall Gentoo.  I don't trust my system in its current state.

----------

## NeddySeagoon

jrks518,

A reinstall is a bit extreme.

Have you changed your kernel freom 2.4 to 2.6?

There are seperate /etc/modules.autoload.d/ker... files for these series of kernels. If you have done the 2.4.x to 2.6.y update, you need to review the content of /etc/modules.autoload.d/

All the individual bits of your system will still be OK.

----------

## jrks518

 *NeddySeagoon wrote:*   

> All the individual bits of your system will still be OK.

 

Yes and no.  I've lost confidence in my current setup, whether or not it's rescuable.  And besides, I'm always looking for a fresh start; maybe this time I'll do things right, now that I have a little experience with Linux.  I have no problem with reinstalling, so why not reinstall?

Thanks once again for all your help.

----------

## jrks518

Thanks to you, NeddySeagoon, I changed my mind.  I started to go through the process of installing Genoo and I decided that I could risk feeling a little uncomfortable with my current setup. I guess I'm a little rash sometimes, so thank you for setting me straight.

I am running the 2.6.9 kernel.  I have in /etc/modules.autoload.d/kernel-2.6.9.  The contents of said file are:

```
libata

crc32

r8169
```

I assume these are in the correct file; my question now is why they are not loading now when they have loaded properly for the last several months.  And should I type in all of the modules lsmod lists when I run the LiveCD?

By the way, I was wrong when I said that modprobe fixed my problem.  I did run 

```
modprobe r8169
```

 for my ethernet adapter, and I did restart eth0, but all I get is 192.168.0.2, and I cannot connect to the internet.

So, there are still several unresolved problems (see earlier posts).

For the meantime, I'm running Knoppix.

----------

## NeddySeagoon

jrks518,

This is not correct 

```
/etc/modules.autoload.d/kernel-2.6.9
```

the file must be called 

```
/etc/modules.autoload.d/kernel-2.6
```

it is used by all versions of the 2.6 kernel.

What network address do you expect?

Is the 192.168.0 bit right?

Lets fix this first and see what happens. Often onlythe first error is relevant as the subsequent ones are caused by the firts one.

----------

## jrks518

 *Quote:*   

> Is the 192.168.0 bit right? 

 

I don't think so.  The typical address from my router begins with 192.168.1 .  This is the format the address followed before all of these problems (and still follows when I load Knoppix).  Additionally, I still cannot access the web through Gentoo.

Also, should I put all modules listed by lsmod on the LiveCD into the /etc/modules.autoload.d/kernel-2.6 file?

Finally, I can't access make menuconfig to deal with kernel modules and drivers.  I get some error about the target something, I can't remember exactly.

----------

## NeddySeagoon

jrks518,

You must have your /etc/conf.d/net file set up to allocate a static IP address which is in the wrong subnet. There are three version of this file in circulation now, so I'll refer you to the embedded comments or the net.example file.

You do not need to list everyting in  /etc/modules.autoload.d/kernel-2.6.

Some are loaded by scripts, some are loaded because the are depended upon by others.

I have my network card module, the hardware layer for my sound cards (I have 3), this allows me to cotrol the load order, scsi emulation modules and nvidia.

----------

## jrks518

All right, we're making significant progress here.  I followed your suggestions and all of the modules loaded properly, I got my eth0 allright, and the "SIOCSIFADDR...." errors are gone.  What remains, then?  The PAM errors, when I do a console login, as well as an error saying 

```
bad command 'mdns off'
```

 or 

```
bad command 'mdns on'
```

 whichever way I have it set in /etc/host.conf.  And, I've discovered, when logged in as my normal user I cannot su to gain root privileges; I get a message saying that permission was denied.

One more thing. I get an artsmessage from KDE when it loads:

```
Sound server informational message:

Error while initializing the sound driver.

device /dev/dsp can't be opened (No such file or directory)

The sound server will continue, using the null output device.
```

I post that last message not looking for help (because it obviously belongs in Desktop Environments) but in the hopes that it will clue us in to something that is connected to the kernel and configuration files.  I don't know.

----------

## NeddySeagoon

jrks518,

The easy one first - /dev/dsp. On gentoo this is a symbolic link to /dev/sound/dsp which is the real OSS dsp device file. The alsa OSS emulation layer shoud provide it. 

If /dev/sound/dsp exists you need to make the symbolic link, if not the Alsa OSS layer modules are either not loaded or not built (or both). The /etc//modules.d/alsa file should load them. 

You must be in the wheel group to be able to su to root.

What does 

```
groups
```

 say?

----------

## jrks518

1.  I had to emerge the alsa OSS emulation layer, as it did not appear to be installed.

2.  The files  /etc//modules.d/alsa and /dev/sound/dsp do not exist on my computer.

3.  

```
groups
```

 gives me 

```
users
```

  I don't know why this is, as my user was a member of several groups before.

----------

## NeddySeagoon

jrks518,

Groups is one of several files that gets reset to the defualts when you say yes to it in etc-update. Its a Bad Thing. You need to edit /etc/group to fix the damage. Has your /etc/fstab been reset too?

/etc//modules.d/alsa will load the modules to create the OSS emulation layer. You also need the script /etc/init.d/alsasound. Do you have that?

----------

## jrks518

 *NeddySeagoon wrote:*   

> You need to edit /etc/group to fix the damage.

 

Done.

 *Quote:*   

> Has your /etc/fstab been reset too? 

 

Probably.  Earlier in this thread, I had to change the values in that file from their defaults to what they should be, based on my setup.

 *Quote:*   

> /etc//modules.d/alsa will load the modules to create the OSS emulation layer. You also need the script /etc/init.d/alsasound. Do you have that?

 

I have neither.

----------

## jrks518

I should add that the swap partition is not loading.  It probably has to do with one of the files that was reset.  I searched around and couldn't find anything to help (I tried several suggestions but none worked).

----------

## NeddySeagoon

jrks518,

Swap is automatically started by the entry in /etc/fstab.

You may manually issue the 

```
swapon /dev....
```

just as you did in the inital install to start swap by hand.

----------

