Skip to contentSkip to conversation

bug: reiserfsck reports "neither new nor old reiserfs format found"

DISCUSSION Moritz Franosch 3 participants 4 messages Oct 25, 2002 – Oct 26, 2002

lore
Share & tools
lore
#0 lore raw

Hello,

I think I've just lost a reiserfs partition and reiserfsck did not work. Here is my bugreport, as the man page of reiserfsck says.

The system is Intel 486, 66 MHz, 16 MB RAM.
/dev/hda1 boot partition with ext2
/dev/hda2 root partition with reiserfs

I've installed the system with Suse 8.0, the system booted (many times), then hang and I switched off.

The next boot, the kernel paniced with the message

read_super_block: can't find a reiserfs filesystem on (dev 03:02, block 64, size 1024)

Thus I've downloaded reiserfsprogs-3.6.3.tar.gz and did

tar -xzf reiserfsprogs-3.6.3.tar.gz
cd reiserfsprogs-3.6.3
./configure
make
cd fsck
gcc --static -g -O2 -Wall -o reiserfsck main.o pass0.o pass1.o pass2.o semantic_check.o semantic_rebuild.o pass4.o lost+found.o ubitmap.o uobjectid.o ustree.o ufile.o check.o check_tree.o info.o super.o ../lib/libmisc.a ../reiserfscore/libcore.a

to get a statically liked version of reiserfsck (unser Suse Linux 8.0, gcc 2.95.3, Suse's default 2.4.18-4GB kernel).

I copied reiserfsck via floppies to the ext2 filesystem on /dev/hda1 (using a rescue system, Suse's did not work because of too few memory).

I booted the Suse bootdisk (Suse kernel 2.4.18-4GB), loaded the reiserfs module, went to the console, mounted /dev/hda1 and executed reiserfsck as

reiserfsck --check --logfile check.log /dev/hda2

It reported (I've to type from the screen):

reiserfs_open: neither new nor old reiserfs format found on /dev/hda2
reiserfsck: could not open filesystem on "/dev/hda2"

"echo $?" reported 0 as exit status, check.log has size 0.

According to the man page, reportig 0 as an exit status in this case is a bug:
man reiserfsck says:
2. Run reiserfsck --check --logfile check.log /dev/hda1. If reiserfsck --check exits with status 0 it means no errors were discovered.

reiserfsck --rebuild-tree --logfile rebuild.log /dev/hda2

reiserfs_open: neither new nor old reiserfs format found on /dev/hda2
reiserfsck: could not open filesystem on "/dev/hda2"

rebuild.log has size 0.

Trying to mount /dev/hda2 with

mount /dev/hda2 /mnt2

gives the following kernel messages on the console:

...
VFS: Can't find ext2 filesystem on dev ide0(3,2)
read_super_block: can't find a reiserfs filesystem on (dev 03:02, block 64, size 1024)
read_super_block: can't find a reiserfs filesystem on (dev 03:02, block 8, size 1024)
...

I think reiserfsck should do _something_.
man reiserfsck says:
6. If the --rebuild-tree step fails or does not recover what you expected, please submit this as a bug report. Try to provide as much information as possible and we will try to help solve the problem.

The --rebuild-tree step failed and did recover absoulutely nothing, so I report this as a bug.

I suspect the magic number of the reiserfs filesystem is overwritten and reiserfsck gives up. But there really _is_ a reiserfs filesystem on that partition. I'll save the first 1.4 MB of /dev/hda2 on a floppy for further analysis, if required.

Please CC me, as I'm not on the [email protected].

Thank you,

Moritz

Signature · 2 lines
Dipl.-Phys. Moritz Franosch
http://Franosch.org
#1 lore raw

Hi,

Quoted 9 lines

I've installed the system with Suse 8.0, the system booted (many times), then hang and I switched off.

The next boot, the kernel paniced with the message

read_super_block: can't find a reiserfs filesystem on (dev 03:02, block 64, size 1024)

Thus I've downloaded reiserfsprogs-3.6.3.tar.gz and did

Please take the last 3.6.4 version of reiserfsprogs.

Quoted 6 lines

reiserfsck --check --logfile check.log /dev/hda2

It reported (I've to type from the screen):

reiserfs_open: neither new nor old reiserfs format found on /dev/hda2
reiserfsck: could not open filesystem on "/dev/hda2"

Your super block got corrupted somehow or you have your partition table changed so that the blocknumber of the superblock was changed.

To rebuild the corrupted superblock you can use reiserfsck --rebuild-sb.

Quoted 8 lines

"echo $?" reported 0 as exit status, check.log has size 0.

According to the man page, reportig 0 as an exit status in this case is a bug:
man reiserfsck says:
2. Run reiserfsck --check --logfile check.log /dev/hda1. If reiserfsck --check exits with status 0 it means no errors were discovered.

We decided to not provide a special exit code for corrupted super block to avoid an automation of super block recovery. This is a difficult case and should be done manually.

Quoted 4 lines

Thank you,

Moritz

Signature · 2 lines
Thanks,
Vitaly Fertman
#2 lore raw
Quoted 3 lines · Vitaly Fertman
Quoted 1 line

Thus I've downloaded reiserfsprogs-3.6.3.tar.gz and did

Please take the last 3.6.4 version of reiserfsprogs.

I've the new version now.

Quoted 11 lines
Quoted 6 lines

reiserfsck --check --logfile check.log /dev/hda2

It reported (I've to type from the screen):

reiserfs_open: neither new nor old reiserfs format found on /dev/hda2
reiserfsck: could not open filesystem on "/dev/hda2"

Your super block got corrupted somehow or you have your partition table changed so that the blocknumber of the superblock was changed.

To rebuild the corrupted superblock you can use reiserfsck --rebuild-sb.

Thank you very much for that hint. It's documented in 'man reiserfsck', but I've overlooked it. I've tried --rebuild-sb but it reported that it couldn't find the journal. Then I've done

reiserfstune --make-journal-standard

and also experimented with --no-journal-available in various combinations with --rebuild-sb and --rebuild-tree but I've had no success.

Thank you very much for your quick reply.

I've never had a single problem I could blame reiserfs for, the only partition under Linux I've lost so far was an ext2.

But I've the feeling that e2fsck is much simpler: Just execute it and answer everything with "yes", you don't understand it anyway. Then your filesystem is either gone or still there and you can look in lost+found for important data. No need to experiment with --do-this-and-that --without-doing-that.

Thank you very much again,

Moritz

Signature · 2 lines
Dipl.-Phys. Moritz Franosch
http://Franosch.org
#3 lore raw
In reply to Vitaly Fertman
Quoted 46 lines · Vitaly Fertman

Hi,

Quoted 11 lines

I've installed the system with Suse 8.0, the system booted (many times), then hang and I switched off.

The next boot, the kernel paniced with the message

read_super_block: can't find a reiserfs filesystem on (dev 03:02, block 64, size 1024)

Thus I've downloaded reiserfsprogs-3.6.3.tar.gz and did

Please take the last 3.6.4 version of reiserfsprogs.

Quoted 8 lines

reiserfsck --check --logfile check.log /dev/hda2

It reported (I've to type from the screen):

reiserfs_open: neither new nor old reiserfs format found on /dev/hda2
reiserfsck: could not open filesystem on "/dev/hda2"

Your super block got corrupted somehow or you have your partition table changed so that the blocknumber of the superblock was changed.

To rebuild the corrupted superblock you can use reiserfsck --rebuild-sb.

Quoted 10 lines

"echo $?" reported 0 as exit status, check.log has size 0.

According to the man page, reportig 0 as an exit status in this case is a bug:
man reiserfsck says:
2. Run reiserfsck --check --logfile check.log /dev/hda1. If reiserfsck --check exits with status 0 it means no errors were discovered.

Quoted 3 lines

We decided to not provide a special exit code for corrupted super block
to avoid an automation of super block recovery. This is a difficult case and should be done manually.

Tell users that when fsck runs and finds a bad super.

Quoted 11 lines
Quoted 8 lines

Thank you,

Moritz