LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   reiserfs kernel panic (https://www.linuxquestions.org/questions/slackware-14/reiserfs-kernel-panic-332819/)

ncf 06-12-2005 02:58 PM

reiserfs kernel panic
 
Situation: I tried installing XPSP2 onto a secondary partition, hda2, when my Slack install was on hda1. Well, Windows XP decided that it was superior to my Linux installation, and that it knew a lot more about partition tables, so it altered my partition table so horribly that my system wouldn't boot at all. I'd see the BIOS boot screen and it'd go to a black screen (from which it usually boots from the HD) and then reboot.

My Actions: I reset the partition table to exactly what it once was--it still didn't work. Then I booted off the slackware CD using the bare.i root=/dev/hda1noinitrd ro boot string. The slackware install disk told me that it could not boot off hda1 because...(Error details follow)

Technical Information (may or may not be useful for this matter):
Kernel Messages:
FAT: bogus logical sector size 33807
UMSDOS: msdos_read_super failed, mount aborted
FAT: bogus logical sector size 33807
FAT: bogus logical sector size 33807
sh-2012: resierfs_read_super: can not find reiserfs on ide0(3,1)
Kernel panic: VFS: Unable to mount root fs on 03:01

fdisk -l /dev/hda1:
Disk /dev/hda: 120.0 Gb, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
1 * 1 7235 58115106 83 Linux
2 7236 14532 58613152+ b W32 FAT
3 14533 14593 489982+ 5 Extended
5 14533 14593 489951 82 Linux Swap

fdisk /dev/hda1--commands: 'x','p' (On this area, especially, I may have mistyped a value):
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size Id
1 80 1 1 0 254 63 1623 63 1162320212 83
2 00 254 63 1023 254 63 1023 116230275 117226305 0b
3 00 254 63 1023 256 63 1023 235456580 422965 05
4 00 0 0 0 0 0 0 0 0 0
5 00 214 63 1023 254 63 1023 63 979202 82

Alas, my question:
1) How can I get some key folders (/home, etc.) back? (I've got a bunch of code that I wasn't intelligent enough to backup my drive before screwing around with XPSP2 install)

Many thanks in advance,
-Wes

egag 06-12-2005 03:07 PM

first thing to try would be setting the bootflag to the windows partition.
( otherwise win won't start )

...and did you try " root=/dev/hda2" to boot Slackware ?

egag

ncf 06-12-2005 03:25 PM

I set the boot flag on both, but the BIOS (or whatever) was failing to load anything off the HD as it was.

One thing I forgot to note about it is that the HD partition tables were well beyond messed up after XPSP2 install, as they were trying to register bytes well beyond what the HD had. Before I reset the HD's partition table to what it was originally (hda partition approximates: 1=>size/2-500Mb , 2=>size/2 , 5=>500Mb), ``fdisk -l /dev/hda1'' was telling me that there was some oddball error for each partition that was registered (sorry, but I can't remember what it was right now :( ).

I can't say that I've felt this much like a newbie since when I started with linux 9 months ago. I feel like an uber-newb right now.

-Wes

egag 06-12-2005 03:41 PM

well...if you cannot get that linux partition to mount...
lilo makes a copy of the bootsector ( incl. the partition table )
in /boot/boot.0300.

maybe, if you just boot from the cd ( just type " bare.i " at the prompt ),
you can manage to mount the hda1 or hda2 ?

and, in your first post you said you reset the part. table to what it was.
how did you do that ?

edit: you can have only *one* bootflag !

egag

ncf 06-13-2005 01:41 AM

A) I am currently unable to even mount the partition.
B) I recorded what percentages of the allocation and the filesystem types when I originally setup the drive. Based off this information, I used fdisk (as originally done) to reset the values from invalid values back to what the partitions once were.
C) I just would like to note that I said "feel like", not "am." I'm rather experianced with computers in all aspects, but this issue just has me stumped and I don't want to lose my data. :\

Thanks :)
-Wes

egag 06-13-2005 08:00 AM

Re: reiserfs kernel panic
 
Quote:

Originally posted by ncf



fdisk /dev/hda1--commands: 'x','p' (On this area, especially, I may have mistyped a value):
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size Id
1 80 1 1 0 254 63 1623 63 1162320212 83
2 00 254 63 1023 254 63 1023 116230275 117226305 0b
3 00 254 63 1023 256 63 1023 235456580 422965 05
4 00 0 0 0 0 0 0 0 0 0
5 00 214 63 1023 254 63 1023 63 979202 82


well...lets look at those figures a little closer...

Code:

Nr  AF  Hd  Sec  Cyl      Hd  Sec    Cyl        Start            Size    Id
1  80    1    1      0    254    63  1623            63    1162320212    83
2  00  254  63  1023    254    63  1023  116230275    117226305    0b
3  00  254  63  1023    256    63  1023  235456580        422965    05
4  00    0    0      0      0      0      0                0                0    0
5  00  214  63  1023    254    63  1023              63        979202  82


-first thing that's wrong is the bootflag (AF) ; "80" should be on partition 2 (win) .

-2. : column 3 (Hd), row 2 sais " 254 " ; should be " 0 ".

-3 : column 3 (Hd), row 5 sais " 214 " ; should be " 254 ".

-4 : column 6 (Hd), row 3 sais " 256 " ; should be " 254 ".

-5 : column 8 (Cyl), row 1 sais " 1623 " ; should be " 1023 ".

-6 : row1 ( start + size ) = row2 ( start ) does not go in your table
i think 1162320212 has one digit to many ?

-7 : row2 ( start + size ) = row3 ( start ) does not go in your table

-8 : size of logical part. ( row 5 ) is more than 2 times the size of the ext'd part ( row 3 )
logical partitions should all fit in the extended partition.

now what is a typo, and what is a real error ?
check these figures with the fdisk-output.

the one important thing should be just to get the figures of the first row ( the " / " part )
right, so the partition can be found and mounted.

btw.: i hope you didn't give up by now, i think it can be fixed but we need the right figures
from the fdisk output.

egag

ncf 06-13-2005 01:11 PM

Re: Re: reiserfs kernel panic
 
Quote:

-first thing that's wrong is the bootflag (AF) ; "80" should be on partition 2 (win) .
I'm having it boot from my Linux partition as I prefer Lilo as the boot manager.

Quote:

-2. : column 3 (Hd), row 2 sais " 254 " ; should be " 0 ".

-3 : column 3 (Hd), row 5 sais " 214 " ; should be " 254 ".

-4 : column 6 (Hd), row 3 sais " 256 " ; should be " 254 ".

-5 : column 8 (Cyl), row 1 sais " 1623 " ; should be " 1023 ".
Very odd. I can only fathom how much Sh!tdows screwed stuff up. :|

Quote:

-6 : row1 ( start + size ) = row2 ( start ) does not go in your table
i think 1162320212 has one digit to many ?
This is a possibility. I will go and verify all of the figures, and then edit this post once I find out the correct value.

Quote:

-7 : row2 ( start + size ) = row3 ( start ) does not go in your table
Sorry, But I think I'm missing what you mean right here

Quote:

-8 : size of logical part. ( row 5 ) is more than 2 times the size of the ext'd part ( row 3 )
logical partitions should all fit in the extended partition.

now what is a typo, and what is a real error ?
check these figures with the fdisk-output.
Mmmk. As I wrote above, I'll go back and get the figures again, then dump them up here. Hopefully, this time, I'll think and just reroute the output to a file using the ``>'' bash operator. ::slaps self for not doing this the first time::

Quote:

the one important thing should be just to get the figures of the first row ( the " / " part )
right, so the partition can be found and mounted.
Thank you sooo much for your help. Hopefully, with your help and patience, (I|we)'ll have this up and running again.

Quote:

btw.: i hope you didn't give up by now, i think it can be fixed but we need the right figures
from the fdisk output.
No, I can't really give up on this. 20Gb of music from various CDs around the house, some of which are scratched. Tons of source code that I did in my free time as learning projects and such. I'm hoping to all heavens that it's possible to get it back.



Yup. Many, many thanks for all of your help. I'm going to go get the correct values from the system and then I'll post a new post or, probably perferrably, edit this post.

THANKS SOO MUCH FOR ALL OF YOUR HELP THUS FAR!!!
-Wes



Edit::Inserted results of fdisk
Code:

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        7235    58115106  83  Linux
/dev/hda2            7236      14532    58613152+  b  W95 FAT32
/dev/hda3          14533      14593      489982+  5  Extended
/dev/hda5          14533      14593      489951  82  Linux swap

========================

Command (m for help): x
Expert command (m for help): p
Disk /dev/hda: 255 heads, 63 sectors, 14593 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl    Start      Size ID
 1 80  1  1    0 254  63 1023        63  116230212 83
 2 00 254  63 1023 254  63 1023  116230275  117226305 0b
 3 00 254  63 1023 254  63 1023  233456580    979965 05
 4 00  0  0    0  0  0    0          0          0 00
 5 00 254  63 1023 254  63 1023        63    979902 82

Expert command (m for help): q


egag 06-13-2005 03:05 PM

well..that looks better.
i guess you used windos to make that second partition and not
linux' fdisk. correct ?

in that case the partition table looks ok.

then this could be a clue :

the error from your first post:
-----------------
FAT: bogus logical sector size 33807
UMSDOS: msdos_read_super failed, mount aborted
FAT: bogus logical sector size 33807
FAT: bogus logical sector size 33807
sh-2012: resierfs_read_super: can not find reiserfs on ide0(3,1)
Kernel panic: VFS: Unable to mount root fs on 03:01
------------

and this from "man reiserfsck :
------------
--rebuild-sb
This option recovers the superblock on a Reiserfs partition. Nor_
mally you only need this option if mount reports "read_super_block:
can't find a reiserfs file system" and you are sure that a Reiserfs
file system is there. But remember that if you have used some parti_
tion editor program and now you cannot find a filesystem, probably
something has gone wrong while repartitioning and the start of the
partition has been changed. If so, instead of rebuilding the super
block on a wrong place you should find the correct start of the par_
tition first.
-------------

it could be that the superblock is overwritten by windos, and in that case it's repairable
however, if more than that was overwritten....?

do you know if ( or can you check if ) reiserfsck is available
on the bootcd ?
probably more chance to use the second cd from Slack 10.0 or another live cd.

anyway i think " reiserfsck " is what you need.
from "man reiserfsck " :
---------
AN EXAMPLE OF USING reiserfsck
1. You think something may be wrong with a reiserfs partition on /dev/hda1
or you would just like to perform a periodic disk check.

2. Run reiserfsck --check --logfile check.log /dev/hda1. If reiserfsck
--check exits with status 0 it means no errors were discovered.

3. If reiserfsck --check exits with status 1 (and reports about fixable
corruptions) it means that you should run reiserfsck --fix-fixable --log_
file fixable.log /dev/hda1.

4. If reiserfsck --check exits with status 2 (and reports about fatal cor_
ruptions) it means that you need to run reiserfsck --rebuild-tree. If
reiserfsck --check fails in some way you should also run reiserfsck
--rebuild-tree, but we also encourage you to submit this as a bug report.

5. Before running reiserfsck --rebuild-tree, please make a backup of the
whole partition before proceeding. Then run reiserfsck --rebuild-tree
--logfile rebuild.log /dev/hda1.
------------
( step 2 will not write to the disk, only check )
only thing you need is a boot-cd that has reiserfsck, or plug-in
the drive at another linux-pc

btw.: that first partition is 59.5 GB large according to the data above . correct ?

egag

ncf 06-13-2005 05:34 PM

Ok, I did a rebuild-sb and then checked it again, but there was still supposedly an error. http://ncf.kicks-ass.net/rebuild.log and http://ncf.kicks-ass.net/checklog.log

If I must end up doing a --rebuild-tree, do you have any ideas on how to back up all of the partition? Will Power Quest Drive Image 7.0 backup every bit? Or will it just backup bits assoicated with files?

-Wes

egag 06-13-2005 05:51 PM

the only point of doubt would be that the start of the partition was displaced.
since it is hda1 ( and also was before the ms-thing came in )
i'm quite sure the start is ok.

to backup, you'll need a free partition of the same size or larger.
the most simple and reliable would be to use "dd".

like:

dd if=/dev/hda1 of=/dev/hd<free-part>

and then do a "rebuild-tree" on the copy
( at least, that's advised and sounds logical...)

oh, and my two Q.'s, is that part. 59.5 GB and did you make that second partition with win. and not with linux' fdisk ?

egag

egag 06-13-2005 05:55 PM

oh, i forgot, the log sais to rebuild the header of the journal.
after that i guess you can try to mount it.

egag

ncf 06-13-2005 06:00 PM

Sorry, forgot to say that I did tell it to rebuild the journal header, and the check results were from after the rebuild of the header. Sorry about that :)

Oh, as for the questions. Partition was created with cfdisk. Formatted with XPSP2 setup. And yes, 59.5Gb is correct. The .5Gb that's off from 60 is for the Linux Swap.

egag 06-13-2005 06:12 PM

did you allready try to mount it ?
can you post errors on that ( if any )...?

if still nogo, then if you have some space somewhere, i think it's best
to make a copy before you go on.

egag

ncf 06-13-2005 06:34 PM

Code:

#!/usr/bin/python2.4
for x in xrange(0xFFFF):print 'OMG no...',
print '\n'

Fudgenuts! OMG. Slax Live Linux mounted /dev/hda1 as vfat...I took a look in, and there was the windows installation. :\ I think it friggin overwrote my FS and files. :|

ncf 06-13-2005 06:55 PM

Ok, more information gathered using ``echo "$(dmesg |tail)" > dmsg.txt''

http://ncf.kicks-ass.net/dmsg.txt


All times are GMT -5. The time now is 09:18 AM.