# reiserfs bad superblock [solved ... sort of]

## deanpence

This isn't quite as straightforward as it may seem.

All partitions seem to be mounted read-only, as evidenced when I try to touch a file. For example:

```
buttercup var # touch foo

touch: cannot touch `foo': Read-only file system
```

However, Linux seems to be confused as to how they are actually mounted:

```
# identical to /etc/mtab:

buttercup var # mount

/dev/sda3 on / type reiserfs (rw,noatime)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

udev on /dev type tmpfs (rw)

devpts on /dev/pts type devpts (rw)

/dev/sda4 on /var type reiserfs (rw,noatime)

none on /dev/shm type tmpfs (rw)

none on /proc/bus/usb type usbfs (rw)

buttercup var # cat /proc/mounts 

rootfs / rootfs rw 0 0

/dev/root / reiserfs ro,noatime 0 0

proc /proc proc rw,nodiratime 0 0

sysfs /sys sysfs rw 0 0

udev /dev tmpfs rw 0 0

devpts /dev/pts devpts rw 0 0

/dev/sda4 /var reiserfs ro,noatime 0 0

none /dev/shm tmpfs rw 0 0

none /proc/bus/usb usbfs rw 0 0
```

I've never seen this "rootfs" and "/dev/root" (a file that doesn't exist), in any case; I'm not sure what that means.

When I try to remount the FSs either ro or rw, I get this error:

```
buttercup var # mount -t reiserfs -o rw,remount /dev/sda3 /

mount: /dev/sda3: can't read superblock
```

But when I do fsck, it tells me the superblock is fine:

```
buttercup var # reiserfsck --rebuild-sb -r /dev/sda3

reiserfsck 3.6.19 (2003 www.namesys.com)

...

Reiserfs super block in block 16 on 0x803 of format 3.6 with standard journal

Count of blocks on the device: 2502112

Number of bitmaps: 77

Blocksize: 4096

Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 1972063

Root block: 32941

Filesystem is clean

Tree height: 4

Hash function used to sort names: "r5"

Objectid map size 4, max 972

Journal parameters:

        Device [0x0]

        Magic [0x72e1e7ec]

        Size 8193 blocks (including 1 for journal header) (first block 18)

        Max transaction length 1024 blocks

        Max batch size 900 blocks

        Max commit age 30

Blocks reserved by journal: 0

Fs state field: 0x0:

sb_version: 2

inode generation number: 1836

UUID: da1c4f86-7106-4e7b-9f63-c96f6c11ccd0

LABEL: 

Set flags in SB:

        ATTRIBUTES CLEAN

Super block seems to be correct
```

Any ideas?Last edited by deanpence on Mon Apr 11, 2005 8:18 pm; edited 1 time in total

----------

## deanpence

/etc/fstab:

```
/dev/sda1 /boot ext2     noauto,noatime 1 1

#/dev/sda2 none  swap     sw             0 0

/dev/sda3 /     reiserfs noatime        0 0

/dev/sda4 /var  reiserfs noatime        0 0

none /proc    proc  defaults 0 0

none /dev/shm tmpfs defaults 0 0
```

The mysterious /dev/boot:

```
buttercup var # ls -l /dev/boot

ls: /dev/boot: No such file or directory
```

----------

## deanpence

I solved it by rebooting, but I still don't know what happened. If anyone cares to speculate, I'm sure anyone with such a problem in the future would care to hear it.

----------

