LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-08-2003, 10:42 PM   #1
bobsmith
LQ Newbie
 
Registered: Jan 2003
Posts: 7

Rep: Reputation: 0
help recovering HD


Running Red Hat 7.3 on an HP pavilion 7935 (1 year old). It is a normal/typical install and on the internet, running apache. I've been keeping up on the security patches. Also, I recently installed samba so I could temporarily save off some data from a windows machine while I reformatted it. Unfortunately, it seems that the HP's HD has crashed. It will boot up until it goes to mount some part of the FS and wants to do a fsck, but fails a read and the kernel panics. I used Tom's rtbt floppy to run e2fsck and to try to mount the partitions. Of the 7 partitions, only the first one (the boot one) passes the e2fsck and mount test. The rest fail on at least the e2fsck with a bad read of a sector and block (even if I provide alternate superblock locations). The bad blocks are consistently reported, though they are different ones for each partition.

Also, it seems that the partition table is messed up:

device boot start end blocks ID
/dev/hda1 * 1 7 52888+ 83
/dev/hda2 8 2912 21961800 83
/dev/hda3 2913 5182 17161200 83
/dev/hda4 5183 5295 854280 f
/dev/hda5 5183 5234 393088+ 83
/dev/hda6 5235 5269 264568+ 83
/dev/hda7 5270 5295 196528+ 82

Notice how partitions 4, 5, and 6 seem to overlap? Also note that partition 4 is set as a WIN95 Ext'd (LBA) partition. I never set it that way. I didn't save of the original partition table (I know... I wish I knew to do that before).

Can I dd the data from the bad drive to a new drive? I don't know how that works, especially if the partition table is bad? I tried to run dumpe2fs and it fails reading the drive. I have another HD that I could install and move data, but I don't know how I can if I can't mount the partitions.

Basically, I'm looking for advice on how I can recover the data off this drive and to see if the drive is bad.

Thanks,
Bob
 
Old 01-09-2003, 03:07 AM   #2
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Can you post the e2fsck command and error messages?

The 4,5,6,7 partitions should overlap, partition 4 is an extended
partition that just houses the other partitions. You can't have
more than 4 partitions on your drive (still!) without using extended
partitions, this has to have been set up in the past, and is not an
error in the partition table. Unfortunately, the linux disk/filesystem
community is still using this archaic partitioning.
The partition table (from here) looks fine to me. Post the
commands and their error messages. . .
 
Old 01-09-2003, 04:18 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
diskrecovery.links

Yeah, post your error messages.

Undelete HOWTO's:
Recovering a Lost Partition Table,
Linux Partition HOWTO,
How to recover lost partitions,
Linux Ext2fs Undeletion mini-HOWTO,
Linux Partition Rescue mini-HOWTO.

Rescue tools for partition table/ext2fs:
Gpart,
Testdisk,
Parted,
Recover (app + info),
R-Linux (never tried this one),
Unrm (never tried this one),
TCT, The Coroners Toolkit* ,
tomsrtbt.
Also mc (the Midnight Commander) can undelete stuff.
* Don't use unless you're desperate w/o options left. Don't use until you have some experience with this as it's used in forensics, is a tool set and not a GUI click-n-go tool and damn slow. Make sure you are willing to make a serious investment (your time) and be prepared to still not get usefull stuff returned...

Partition imaging:
Partimage.
* For more rescue tools check Freshmeat.net, metalab.unc.edu or other depots for a /Linux/system/recovery/ dir.
 
Old 01-09-2003, 08:51 PM   #4
bobsmith
LQ Newbie
 
Registered: Jan 2003
Posts: 7

Original Poster
Rep: Reputation: 0
I don't think this is a "partition" problem. When I did this:

e2fsck -nv /dev/hda2 > file 2>&1

I get this output:

*** hda2
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Error reading block 65541 (Attempt to read block from filesystem resulted in short read) while doing inode scan. Ignore error? no

Error while scanning inodes (32704): Can't read next inode
***

(This is only stdout. I can't seem to get stderr to show up in the file?)

Likewise other errors for other partitions:

*** hda3
e2fsck 1.27 (8-Mar-2002)
e2fsck: Attempt to read block from filesystem resulted in short read while checking ext3 journal for /usr

*** hda4
e2fsck 1.27 (8-Mar-2002)
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/hda4
Could this be a zero-length partition?

*** hda5
e2fsck 1.27 (8-Mar-2002)
/: Attempt to read block from filesystem resulted in short read while reading block 275
/: Attempt to read block from filesystem resulted in short read reading journal superblock
e2fsck: Attempt to read block from filesystem resulted in short read while checking ext3 journal for /

Any ideas?
Bob
 
Old 01-09-2003, 11:27 PM   #5
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Have you tried e2fsck -py /dev/hdax? This will attempt to fix any
errors, and assume an answer of "yes" to any questions. It's not
necessarily what you want, but you may have to answer "y" to a
lot of inode errors.
hda3 and hda5 both look like there are errors on the journal (at
least, there may be more elsewhere), have you tried mounting
them as ext2? mount /dev/hda3 /usr -t ext2
 
Old 01-10-2003, 09:43 AM   #6
bobsmith
LQ Newbie
 
Registered: Jan 2003
Posts: 7

Original Poster
Rep: Reputation: 0
I will certainly try that, however, the error messages I'm getting are indicative of a more serious problem. I wish I could find a way to get stderr in to a file, so I could post them here. On several of the runs, e2fsck has a segmentation fault. That's not a confidence booster (for my HD *or* e2fsck).

Bob
 
Old 01-11-2003, 12:47 AM   #7
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
man bash for the redirection syntax ( search for redirection)

You could also try this:
Code:
script
e2fsck blah blah blah
exit
This'll start up a log of everthing that goes to the terminal, so if
stderr is sent to the screen, it'll show up there. It'll create a file
called "typescript".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
recovering files krunal Linux - General 2 06-17-2005 05:38 AM
Help Recovering Files? ArenaKen Linux - General 3 06-14-2005 08:42 AM
Help Recovering Files? ArenaKen Linux - Newbie 1 06-13-2005 08:28 PM
Recovering eggoz Linux - Newbie 1 06-13-2003 11:38 AM
recovering files nocturnal Linux - General 3 04-19-2003 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration