# something bad happened to my reiser4 partition...

## teeler

Heeelp.  Please.

I don't know what happened, suddenly it just fails to mount. I get a crazy segfault:

```
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }

hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=507350069, high=30, low=4033589, sector=507350067

ide: failed opcode was: unknown

end_request: I/O error, dev hda, sector 507350067

Unable to handle kernel NULL pointer dereference at virtual address 00000000

 printing eip:

c01d0680

*pde = 00000000

Oops: 0000 [#1]

PREEMPT SMP

Modules linked in: sr_mod eth1394

CPU:    0

EIP:    0060:[<c01d0680>]    Not tainted VLI

EFLAGS: 00010206   (2.6.10-morph22)

EIP is at znodes_tree_done+0x30/0x210

eax: 00000000   ebx: ded9981c   ecx: 00000000   edx: ded9981c

esi: 00002000   edi: 00000000   ebp: ded99848   esp: de903d88

ds: 007b   es: 007b   ss: 0068

Process mount (pid: 6547, threadinfo=de902000 task=dfab0a80)

Stack: de903ddc ded9981c df374a00 de903ddc 00000000 c01d917b ded9981c ded9981c

       c01f5fb5 ded9981c 0000000c df374a00 c01f62cb df374a00 0000000d fffffffb

       c01f6346 df374a00 0000000c df713000 00000000 4b1b5d0b 00000001 00000000

Call Trace:

 [<c01d917b>] done_tree+0x1b/0x90

 [<c01f5fb5>] _done_formatted_fake+0x25/0x40

 [<c01f62cb>] done_super+0x1b/0x30

 [<c01f6346>] reiser4_fill_super+0x66/0x80

 [<c0168779>] get_sb_bdev+0xe9/0x160

 [<c016f3c0>] do_lookup+0x30/0xb0

 [<c017e0bc>] alloc_vfsmnt+0x9c/0xe0

 [<c01efe70>] reiser4_get_sb+0x30/0x40

 [<c01f62e0>] reiser4_fill_super+0x0/0x80

 [<c0168a33>] do_kern_mount+0x63/0xf0

 [<c017f2ae>] do_new_mount+0x9e/0x100

 [<c017f99f>] do_mount+0x19f/0x1c0

 [<c017f7a3>] copy_mount_options+0x63/0xc0

 [<c017fd7f>] sys_mount+0x9f/0x100

 [<c0103211>] sysenter_past_esp+0x52/0x75

Code: ff 56 53 83 ec 04 8b 6c 24 18 83 c5 2c 8b 75 04 83 fe 00 76 22 8b 54 24 18 8b 4a 2c eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 90 <8b> 3c 81 85 ff 75 05 40 39 c6 77 f4 31 c0 85 ff 89 fa 74 0b 8b

```

Yay. So that's fun. 

Then there's this:

```
m0tivator ~ # fsck.reiser4 /dev/hda2

*******************************************************************

This is an EXPERIMENTAL version of fsck.reiser4. Read README first.

*******************************************************************

Fscking the /dev/hda2 block device.

Will check the consistency of the Reiser4 SuperBlock.

Will check the consistency of the Reiser4 FileSystem.

Continue?

(Yes/No): yes

***** fsck.reiser4 started at Sun Aug  7 11:18:12 2005

Error: Can't read bitmap block 45437568. Input/output error.

Error: Can't load ondisk bitmap.

Error: Can't initialize block allocator.

Fatal: Failed to open the block allocator.

Operational error occurred while fscking.

```

And that leaves me with absolutely no-clue-what-soever-and-my-home-directory-was-on-that-drive-and-i'm-fucked-because-i-didn't-back-it-up.

I'm trying to find my lxnay RR4 livecd to see if I can get at it with that, but i have a feeling its unlikely.

What's a brother to do?

----------

## Dlareh

That looks like it might be a hardware problem.  I'd run badblocks and stress test the drive.

But...

 *teeler wrote:*   

> I don't know what happened, suddenly it just fails to mount. I get a crazy segfault:
> 
> And that leaves me with absolutely no-clue-what-soever-and-my-home-directory-was-on-that-drive-and-i'm-fucked-because-i-didn't-back-it-up.

 

I am shocked! Shocked and appalled!  Shocked, I say!

 *teeler wrote:*   

> What's a brother to do?

 

Use a supported filesystem, or wait for a moderator to move this to the Unsupported Software section.

And pray.  Prayer is good for the soul.

----------

## teeler

I hadn't noticed before, but its only a single partition on the drive thats screwed. 

I've got it partitioned in half and one half is fine but the other gives me that problem.

I think i'm retarted..what do i do?

```

m0tivator usr # badblocks -b 1024 -v /dev/hda2

```

? I don't have a clue what my block size is and leaving it results in nothing.

Hell even putting it in results in nothing. 

It just hangs, I can't even kill the process.

----------

## Dlareh

Let it run overnight.  Two nights if necessary.  Don't bother manually adjusting the block size.

Badblocks will take a looooooooooooooong time when it actually finds bad blocks.

----------

## teeler

you're making me nervous.

 :Wink: 

Well....I could send Mr. Reiser $25. You know, I hadn't learned about Ransomware until yesterday but this dude would be in a serious position to deploy such maneuvers.

```

m0tivator ~ # reiserfsck /dev/hda2

.....

** If you would like advice on using this program, support **

** is available  for $25 at  www.namesys.com/support.html. **

.....

```

----------

## teeler

/helpless

```

m0tivator ~ # reiserfsck -B badblocks --rebuild-tree /dev/hda2

...

...

...

No reiserfs metadata found.  If you are sure that you had the reiserfs

on this partition,  then the start  of the partition  might be changed

or all data were wiped out. The start of the partition may get changed

by a partitioner  if you have used one.  Then you probably rebuilt the

superblock as there was no one.  Zero the block at 64K offset from the

start of the partition (a new super block you have just built) and try

to move the start of the partition a few cylinders aside  and check if

debugreiserfs /dev/xxx detects a reiserfs super block. If it does this

is likely to be the right super block version.

If this makes you nervous, try  www.namesys.com/support.html,  and for

$25 the author of fsck,  or a colleague  if he is out,  will  step you

through it all.

```

?

Should I just throw it out the window or what? Do i have any hope at all?  :Wink: 

----------

## Dlareh

fsck.reiser4 ?

----------

## teeler

 *teeler wrote:*   

> /helpless
> 
> ```
> 
> m0tivator ~ # reiserfsck -B badblocks --rebuild-tree /dev/hda2
> ...

 

tried that.

----------

## Dlareh

```
lare /sbin # equery f reiserfsprogs | grep bin/

/sbin/debugreiserfs

/sbin/fsck.reiserfs -> reiserfsck

/sbin/mkfs.reiserfs -> mkreiserfs

/sbin/mkreiserfs

/sbin/reiserfsck

/sbin/reiserfstune

/sbin/resize_reiserfs

lare /sbin # equery f reiser4progs | grep bin/

/sbin/debugfs.reiser4

/sbin/fsck.reiser4

/sbin/make_reiser4

/sbin/measurefs.reiser4

/sbin/mkfs.reiser4
```

----------

## teeler

Yeeea i know what the difference is between reiserfsck and reisr4fsck....

...no really, i do.

I swear!

Thanks man, I've managed to completely recover _everything_ and for this good deed I shall name my firstborn after you.

curtains up..

```

m0tivator ~ # fsck.reiser4 -B badblocks --build-sb /dev/hda2

...

m0tivator ~ # fsck.reiser4 -B badblocks --build-fs /dev/hda2

....

m0tivator ~ # fsck.reiser4 -B badblocks --fix /dev/hda2

...

m0tivator ~ # fsck.reiser4 /dev/hda2

Your hadrive is ready. You may relax now.

```

Like butter.

Thanks again!

----------

## Gentree

 *Quote:*   

> Well....I could send Mr. Reiser $25. You know, I hadn't learned about Ransomware until yesterday but this dude would be in a serious position to deploy such maneuvers.

 

well let's not be too scathing, the guy has produced a pretty impressive fs and I would guess that he'd rather continue working on it than answer questions for ppl that can't run the right version of fsck without outside help!  :Wink: 

The $25 is just a shield on his time , if not for which you (and a hundred others) would probably have sent him a support request. QED.

That said , it appears that your original problem was genuine. I was wondering if it was caused by the recent upgrade of reiser4progs to 1.05 . After a couple of reboots you would probably get a forced fsck that would use the new version if installed.

Have you , intentionally or otherwise , upgraded from an earlier version recently?

(emerge world without looking what was getting upgraded??)

I came to this forum to see if there were any posts of issues before I upgraded to 1.05 so if there are possible side effects it would be good to know before everyone starts flaming about R4 again.

TIA.  :Cool: 

----------

## teeler

In all truth, my rant about the $25 isn't really directed with any slant to Mr. Resiers creation. Indeed I do appreciate what he's done and I'm thankful for it, i'm more just being spiteful because I just don't have $25, being the broke ass college student that I am.  :Wink: 

No slant intended, and you are also quite correct, I have been slipping with my maintenence of my precious and do often carelessly upgrade such things without looking. There was a time in my life when I would gladly devote endless hours to the perfection of my endeavour, but recently i've been careless and I know it.

But I survived! And I've just learned my second lesson: Don't just emerge -uD world (although i DO look at emerge -puD world but rarely consider the implications - mostly because I have the genuine faith that everything will "Just Work") - But what doesn't hose my system and I can fix surely makes me a little more knowledgable and thats a fundamental experience. 

As for the uniqueness of my problem I wonder if upgrading had anything to do with it, I don't recall any forced fsck'ing and haven't been able to update my system for quite some time due to my greed in wanting certain things (gnome 2.12 which i still can't get my hands wrapped around), but your still probably right because i'm sure I missed something because I know i was careless.

----------

## Gentree

 *Quote:*   

>  I have the genuine faith that everything will "Just Work"

 

Ahh, such youthful naivety, how beautiful the world is!  :Wink: 

Well as you now appreciate, it wont. Esp if you take off the safeguards (~x86).

In fact Gentoo will often bite you in the arse even on "stable" if you're not fairly cautious. Get in the habit of checking the portage forum before updating stuff just to see if other users have been caught out already. (esp for basic packages like baselayout glibc and stuff.)

Try to have some idea what a package does before changing it. If it a biggy like kde use qpkg to safeguard you old version before emerging, that way you can get back quickly.

Anyhow, glad you survived and its a plus point for R4 that it kept everything sound.

I'd be interested in what version of reiser4progs and what kernel you are using at this stage. I was thinking of upgrading to 1.0.5 .

TIA.  :Cool: 

----------

## teeler

Right now I'm at 

reiser4progs-1.0.4, and my lovely kernel, 2.6.11-morph6. Now you've got me scared for 1.0.5..  :Wink: 

----------

