# Help Badly Needed: Bad Superblock Root, Can't Boot [SOLVED]

## sog

second time in two weeks i can't boot. this problem is not related to the prior problem i had (described here https://forums.gentoo.org/viewtopic.php?t=228119&highlight=) AFAIK.

that problem was fixed and my new enlargened partition was working just fine. until tonight. only thing out of the ordinary i did was ACCEPT_KEYWORDS="~x86" (to get the 2.6 compatible version) emerge tpctl and thinkpad along with a normal emerge of configure-thinkpad. that's it.

they emerged properly, returning no errors. i was going to configure them but didn't have time, so after everything was complete, i shut the machine down and planned on configuring it later. i received no warnings or indications that this would be a problem.

now, however, when i boot  i get something like the following (posting from my Win partition so i don't have the error in front of me):

```
Config error: bad when in *^thinkpad...etc

If you haven't changed the partition table or fstab, you have a corrupt superblock. You need to run this with the option of --rebuild.sh

fsck.reiserfs returned a signal code of 6

disk cannot be fixed
```

anyone - any help? i did a search on superblocks and didn't turn up anything. how do i repair the superblock so at least i can get in and remove tpctl in case that's causing the problem?

any thoughts, suggestions, problems greatly appreciated. i still have a backup from last week's issues, but i'd lose a bunch of stuff if i can't fix this.

TIA. 

Edit: I'm really hoping no one tells me I'm boned.

----------

## TheCarNinja

Well, I don't know honestly one way or the other. If I were you i would break out the livecds or knoppix cds and get into the system that way. Ought to work.

----------

## sog

thx for the reply.

i'll be doing that later today, but i suspect that if the drive can't be mounted during boot, it can't be mounted from a live CD. 

what i'm concerned about is this config error, but i don't know what config it's talking about. apparently tpctl changed my confiig, but i don't know where/how.

not that it means a whole lot - but acronis parition in my windows partition shows nothing changed partition-wise, and checking the reiserfs system for errors it found nothing. 

still at a loss here.

----------

## sog

here's the config bit of tpctl - i think it's related:

```
Configuration

Your modules.conf file should contain the following lines:

   keep

   path[thinkpad]=/lib/modules/`uname -r`/thinkpad

If you are not using devfs you also need the following line:

   alias char-major-10-170 thinkpad

whereas if you are using devfs, you also need the following line:

   alias /dev/thinkpad thinkpad

   alias /dev/thinkpad/thinkpad thinkpad

   alias /dev/thinkpad/smapi smapi

   alias /dev/thinkpad/superio superio

   alias /dev/thinkpad/rtcmosram rtcmosram

   alias /dev/thinkpad/thinkpadpm thinkpadpm

and you also should have a file /etc/devfs/conf.d/thinkpad containing something like the following:

   REGISTER ^thinkpad/.*$ PERMISSIONS root.thinkpad 0664

Here I assume that you have already created a "thinkpad" group which will comprise all the users who will be permitted to use tpctl to change laptop settings.  If you don't create such a group, then use the line:

   REGISTER ^thinkpad/.*$ PERMISSIONS root.root 0664
```

would that i had know i had to do this before shutdown.

----------

## sog

and here's the actual error i'm getting - typing this from a second machine at the office. 

```
* starting devfsd...

Started device management daemon v1.3.25 for /dev

bad WHEN in config line: "* REGISTER ^thinkpad/.*$    PERMISSIONS root.thinkpad 0664"

exiting [!!]

* Activating (possible) swap... [ok]

* Remounting root filesystem read-only (if necessary)... [ok]

* Checking root filesystem...

Failed to open the filesystem.

If the partition table has not been changed, and the partition is valid and it really contains a resierfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb.

Warning... fsck.reiserfs for device /dev/hda6 exited with signal 6.

* Filesystem couldn't be fixed :(  [!!]

Give root password for maintenance...etc etc etc
```

here's what i've done thus far:

1. booted from liveCD

2. mounted partitions (reiser partition gives warnings, but does mount)

3. chrooted into system

4. emerge -C'd tpctl, thinkpad and configure-thinkpad

5. rebooted - got the same error

so clearly the ebuild of thinkpad affected some config file that devfs uses, but no idea which one.

anyone?

----------

## andyknownasabu

 *sog wrote:*   

> 
> 
> ...
> 
> so clearly the ebuild of thinkpad affected some config file that devfs uses, but no idea which one.
> ...

 

Perhaps /etc/devfsd.conf?

The error message looks as if it was this file...Last edited by andyknownasabu on Sat Oct 02, 2004 4:39 pm; edited 1 time in total

----------

## TheCarNinja

Its so weird that the thinkpad ebuild started all of this. I'm using it on my thinkpad right now, and although my laptop is definitely not 100% because of my gcc woes, it uses tcptl fine..   :Confused: 

Think maybe your hard drive is starting to go? 

Sorry I've got nuthin. Hopefully someone else has some answer.

----------

## andyknownasabu

 *TheCarNinja wrote:*   

> Think maybe your hard drive is starting to go?

 

I would also assume that rather a defect hard drive is the reason for this problem than the thinkpad ebuild... Perhaps try to search for bad blocks on your drive?

----------

## sog

thx for the continuing attention TheCarNinja - good news: fixed it. i'm back and in full effect. 

after hunting through the actual ebuilds, i found this little tidbit in the thinkpad-5.7 ebuild:

```

thinkpad

   dodir /etc/devfs.d

   einfo 'REGISTER ^thinkpad/.*$    PERMISSIONS root.thinkpad  0664' \

      > ${D}/etc/devfs.d/thinkpad

   doman man/*.4

}

pkg_postinst() {

   [ "${ROOT}" == "/" ] && /usr/sbin/update-modules

   if ! grep -q '^ *INCLUDE.*devfs\.d' /etc/devfsd.conf; then

      ewarn 'Your /etc/devfsd.conf is missing the include for'

      ewarn '/etc/devfs.d/! Please fix this by adding'

      ewarn 'INCLUDE /etc/devfs.d'

      ewarn 'to your /etc/devfs.conf'

   fi

   if grep -q thinkpad /etc/devfsd.conf; then

      ewarn 'The thinkpad devfsd entry has moved to'

      ewarn '/etc/devfs.d/thinkpad, so you can remove it from'

      ewarn '/etc/devfsd.conf if you like.'

   fi
```

now why the script is INCLUDEing /etc/devfs.d into devfs.conf rather than the actual devfsd.conf is beyond me.

but simply doing a 

```
mv /etc/devfs.d/thinkpad /home/sog/backup
```

 and rebooting turned the trick.

devfsd didn't like something in there clearly. if it's working for you maybe it's the new ebuild (i think it came out yesterday) - or maybe it's that i didn't hand modify my modules.conf file previously. i'm not sure. 

either way, i think this should be flagged for the Gentoo devs. if the ebuild requires you to modify files prior to a reboot or your system won't boot, that should be flagged. IMHO, of course. 

if it's just my box (thinkpad X23 - the tpctl.sourceforge.net site reported that it worked for an X22), ok, but i'd hate for this to happen to someone else.

----------

## sog

here's the contents of that thinkpad file, BTW:

```
^[32;01m*^ [0m REGISTER ^thinkpad/.*$    PERMISSIONS root.thinkpad  0664
```

----------

## TheCarNinja

Great, congrats   :Smile: 

Think maybe you can help me with my gcc problem?  :Very Happy: 

----------

