# Very Scary Harddrive (reiserfs??) problem

## gnac

I experienced a chilling problem yesterday when I got home from work.  I turned on my monitor and did not get any dispay.  My keyboard was also locked up (no nunlock/caplocks etc).  I did not think to log into a shell via my laptop to try to reboot over ssh, and instead powered off (pause for the sound of collective gasps).

Upon the first reboot, I got an error saying that there was an error in the init.d/xfs script and it would not run.  However the system got no further.  This time I tried to ssh in, with no luck.  again I re-cycled the power (more gasps).  This time, shortly after the bios info a bunch of garbage displayed (no boot screen even) and the system froze.   One more time with the recycling and this time when the bios post finished I got the error 

```
Inwalid [sic] Partition Table
```

Note: I did not mispell it, thats what it said; "InWalid".  Well this of course scared the shit out of me so the next time I rebooted I entered the bios to see if the drive (hda) was still autodetecting, which it was.  Then I tried to boot again with the same "Inwalid" error.  Then I fired up my trusty Gentoo install disk, and tried to fdisk to /dev/hda with no luck. Listing the hd devices 

```
ls /dev/hd*
```

 showed my c and d devices, but no hda.  Then I rebooted again, entered the bios and tried re-autodetecting again, and again the drive showed.  Finally, I exited the bios and tried to boot and THANK GOD, the boot selection screen showed up.

I have no Idea of what the problem is., but here is how my system is configured.  

hda1 is my windows partition (and master boot block).  (haven't booted to windows in months)

hda5 is my boot partition (ext2)

hda6 is my swap.

hda7 is my root partition (reiserfs)

hda8 is my /home partition (reiserfs) (I have other folders symlinked in here too)

When my system boots, I am presented with the windows bootloader which gives me the option of Gentoo (default) or win2k. (Note, the "Inwalid" error appeared before this step)  When Gentoo is selected the grub screen comes up next with my choice of kernels.

I am concerned it might be something to do with reiserfs and not shutting down properly, but I am perplexed at how the bios recognized the drive, but the system would not even identify the windows boot sector.  My PC is out of the way and I haven't fiddled with it which leads me to discount a poorly connected ide cable, but I will check it nevertheless.

I am emerging cd burning tools so I can store my backups on cd.  (note to self: storing backups of a partition onto a separate partition on the same physical drives protects SQUAT).

Any Ideas?

----------

## UberLord

Sounds like you need to fix the partition table

http://www.linuxhq.com/ldp/howto/LILO-crash-rescue-HOWTO/disk_partition_rescue.html

GL  :Smile: 

----------

## Larry0815

Hi,

it could be also your harddrive.

I had some month ago a IBM harddisk which had a production error.  :Crying or Very sad:  After to month of use sometimes the drive did a clack-clack sound. And everything freezed...

Perhaps that's a hardware problem...if your harddisk sound different you should   rescue your data as fast as possible!!   :Wink: 

Greets Xarrax

PS I dont think it's a reiserfs problem!

----------

## gnac

Okay,

Well I checked my cabling, and everything appeared to be okay.  I am able to boot up into the gdm (login managager at least), but when I log in to gnome (my default) I get the "less than 10 seconds" error dialog.  Viewing the log doesn't tell me anything usefull, (no error information).  I am however able to log into fluxbox.  I tried to start a gnome-terminal from the right-click menu and nothing happened.  I was finally able to start a regualr xterm.  From here I tried to start a gnome-terminal and I got an error saying it could't read the gnome folder in the users home dir (eg /home/gnac/.gnome).  I did an ls on my home directory and got a number of read errors, permissioned denied on several folders and files in that directory.  I logged in as root and got the same errors.  I rebooted into the liveCD and ran reiserfsck --check on the /home partition (/dev/hda8).  This came up with several errors saying I needed to run the --rebuild-tree option.

Okay, so now I search the forums for rebuild-tree and I'm not liking what I see.  If I understand it right, I need to back up my entire partition before proceeding.  Hmm, 20G partition.  Okay, even if I were to find/buy 20+G of spare partition space, I've seen recomendations on using dd to tar to you name it.  What I guess I need are recommendations/lessons before proceeding.  I'm relatively new to linux, but I do have a CE degree, so I'm not hopeless.  If I can't back up the entire partition, can I back up my necessary directories somehow.  What is the worst that can happen upon --rebuild-tree?  What is all this I am hearing about bad blocks?  Will the rebuild-sb option work?  Is this destructive?

Here's what I have on the hda8 partition.  Other than my home/ folder, I don't think anything is system critical, am I wrong?:

/home (eg /mnt/hda8/home)

/opt

/tmp

/var

/usr/portage

/usr/local

What should ABSOLUTELY be backed up?  What good will backing up the partition do is it is fsked up anyway?

Thanks

----------

## BradN

Save all your personal info off the drive - your installation is probably toast by now.  Whatever you can get out of your home dir. would be good, and backing up /etc/ would maybe save some configuring time later.

I wouldn't trust any involved parts of that system anymore (motherboard, hard drive, cabling...) unless you can demonstrate conclusively what is or isn't causing problems.  I had weird hard drive problems that I traced to the hard drive cable - it would work fine once it booted, but the BIOS would lock up sometimes; it was really strange.

Good luck

----------

## gnac

NOTE: I have reposted this message here: https://forums.gentoo.org/viewtopic.php?t=102838&highlight=

Okay,  I went and bought a 160Gb hardrive on sale from circuit city in order to back up my partitions before screwing around with reiserfsck --rebuild-tree.

However I am having some issues partitioning the drive.  I upgraded the bios on my Asus A7N8X Deluxe (probably not nesseccary) and I can see in the Bios that it recognizes all 160 GBs of the hardrive.

However when I boot to the live CD (rc3 I believe) I can't partition any more than what appears to be the first 20 GB.  I tried using the first three partitions and then the extended, but whenever I try to create a partition greater than "20000M"  I get a "not enough blocks" error.  I don't recal having this problem with my 80G hardrives, although I did use something to create windows partitions on them.  I tried doing a 

```
dd if=/dev/hda of=/dev/hdb bs=8192
```

 which copied the contents and partition table of my 80GB successfully to my 160 GB, but I was unable to mount any of the partitions on the new drive.  I also tried creating a single partion on the new drive of max size and then 

```
dd if=/dev/hda8 of=/dev/hdb1
```

 with no luck.

Is there something special I have to use to partition a drive over 137GB?

NOTE: I have reposted this message here: https://forums.gentoo.org/viewtopic.php?t=102838&highlight=

----------

## gnac

REISERFS SCREWED ME

Sorry, had to get that out.  I finally got all of my partitions backedup on my shiny new $90 160gb drive. Then I ran reiserfsck --rebuild-tree on the bad partition.  I'm not sure why it tells you to back up the data when it is planning to remove all of your folders anyway.  Okay, it did not remove all of my folders, but I lost several websites to the oblivion in addition to many other files and folders.  At least I have a perfect copy of an unusable partition to keep the papers on my desk from blowing around.

What I need to know is if there is anything that can recover the missing data from the backed-up partition?  Tiramisu was awesome at this for windows partions.  I've seen data recovered from disks that had been re-formated.  

My second question is, what fs should I use that wont corrupt if it gets a hard power down?  I understand that that is something you generally don't want to do, and I can understand files being currently accessed getting corrupted if it did happen, but I lost tons of irreplaceable content (I know, backup more often).  The point is I want to avoid this trouble in the future if say a powersupply were to fail, or the power to the computer should be suddenly stopped for some reason.

I've seen mention of XFS and EXT3 as two formidable oponents, but I saw the same information on reiserfs which led me use it in the first place.  I don't need rock solid secure, but I expect some resiliancy of data.

Thanks

----------

## digitalsy

I wouldn't be surprised if it was your ibm hard drive. IBM doesn't even make they're hard drives, they're just Hitachi hdd's with an IBM label...and they suck. I had a deskstar for not even 3 months and it developed a bad sector....ridiculous. do yourself a favor and never buy IBM(HITACHI) drives....stick with WD. never a prob with WD.

-digi

----------

## gnac

I don't know where you got the idea that its an IBM hard drive.  Perhaps you read Larry0815's post above and thought it was me.  

This system has two 80 GB WD's on this, one of which has the corrupted partition, and of course the brand new 160 GB WD.

I'd really like to know if there is a recovery tool available (ala Tiramisu (ontrack)) for Linux/reiserfs.

----------

