LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Saving an injured IDE HardDrive (https://www.linuxquestions.org/questions/linux-hardware-18/saving-an-injured-ide-harddrive-614147/)

Beaud 01-16-2008 10:58 PM

Saving an injured IDE HardDrive
 
Hi, I installed FC6 on my box, though it was the best idea to restore data from a ~80gb IDE HardDrive. I ran badblocks with nearly 100% badblocks after 10mins, canceled. I'm currently running gpart and I'm having read errors EIO near sectors(...) every 64 "sectors". As an additionnal information, I tried to mount the hard drive from the FC Rescue Mode. No result. fdisk can't find any valid partition. What's left to do now?
I guess I could afford losing some data if there is no choice but that.

Regards, Beaud.

Simon Bridge 01-16-2008 11:11 PM

You could frame it as art?

Technically you could just bitdump the contents and run an eyeball along it... got a free month or six?

Naturally, this is where you are glad of your rigorous and methodical backup policy.

kromberg 01-17-2008 08:02 AM

The term 'SOL' is coming to mind.

Keith

Simon Bridge 01-17-2008 10:24 AM

Roughly third to half of the official expansions of the abbreviation are relevant - yes. The one you mean is not listed, but I think we get the gist.
http://acronyms.thefreedictionary.com/SOL
SOL Sadly Outta Luck (polite form)
SOL Satellite Of Love
SOL Seafarer's Open Learning System
SOL Service Opportunities in Leadership
SOL Shazzam - Outta Luck (Gomer Pyle polite form)
SOL Shoot-Out Loss
SOL Short on Luck
SOL Simply Out of Luck (polite form)
SOL Sobbing Out Loud
SOL Society for Organizational Learning
SOL Somewhat Out of Luck
SOL Sorta Outta Luck
SOL Space-Occupying Lesion (medical)
SOL Standards Of Learning
SOL Statement of Liability
SOL Stuff Outta Luck (polite form)
SOL System Off Line

Emerson 01-17-2008 10:58 AM

:D http://www.acronymattic.com/results.aspx?q=SOL

tredegar 01-17-2008 12:04 PM

Beaud,
Looks like that disk is bad.
Very bad.
Sorry.

There's a linux utility called photorec that may be able to recover something. Worth a try?
Please google for it.

& Welcome to LQ :) !

Beaud 01-17-2008 12:15 PM

Code:

Fedora Core release 6 (Zod)
Kernel 2.6.12-1.2798.fc6 on an i686

localhost login: hdd: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error}
hdd: task_in_intr: error=0x01 { AddrMarkNotFound }, LBAsect=1600866520, sector=160086520
ide: failed opcode was: unknown
hdd: task_in_intr: status=0x59 { DriveReady SeekComplete DatRequest Error }
hdd: task_in_intr: error=0x01 { AddrMarkNotFound }, LBAsect=160086520, sector=160086520
ide: failed opcode was: unknown
hdd: task_in_intr: status=0x59 { DriveReady SeekComplete DatRequest Error }
hdd: task_in_intr: error=0x40 { UncorrectableError }, LBAsect=160086520, sector=160086520
ide: failed opcode was: unknown
end_request: I/O, dev hdd, sector 160086520
Buffer I/O error on device hdd, logical block 20010815

I got that error from fdisk as well.

fdisk output:
Code:

Disk /dev/hdd: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096

As for the table, it is empty.

Code:

160086527 unallocated sectors
Out of luck at mounting:
Code:

[root@localhost ~]# mount -t ntfs /dev/hdd /mnt
mount: unknown filesystem type 'ntfs'
[root@localhost ~]# mount -t vfat /dev/hdd /mnt
FAT: bogus number of reserved sectors
mount: wrong fs type, bad option, bad superblock /dev/hdd
      missing codepage or other error
      In some cases useful into is found in syslog...

Nothing useful using dmesg...
Code:

[root@localhost ~]# mount /dev/hdd /mnt
hfs: unable to find HFS+ superblock
mount: you must specify the filesystem type

In Rescue Mode...
Code:

Running anaconda, the Fedora Core rescue mode - please wait...
ERROR: asr: reading /dev/hdd[Input/output error]
ERROR: ddf1: reading /dev/hdd[Input/output error]
ERROR: hptx45: reading /dev/hdd[Input/output error]
ERROR: isw: reading /dev/hdd[Input/output error]
ERROR: jmicron: reading /dev/hdd[Input/output error]
ERROR: lsi: reading /dev/hdd[Input/output error]
ERROR: nvidia: reading /dev/hdd[Input/output error]
ERROR: pdc: reading /dev/hdd[Input/output error]
ERROR: pdc: reading /dev/hdd[Input/output error]
ERROR: sil: reading /dev/hdd[Input/output error]

Might be missing an error or two here..

Now badblocks:
Code:

sh-3.1# badblocks -v /dev/hdd
Checking blocks 0 to 80043264
Checking for bad blocks (read-only test): 256        256/    80043264
304        304/        80043264
305        305/        80043264
306        306/        80043264
307        307/        80043264
308        308/        80043264
...

Last but not least, gpart:
Code:

Warning: read error (EIO) near sector (...), skipping...
...

Thats about all I can see on my monitors for hours..

Roll your eyeballs on that.

Beaud 01-17-2008 12:18 PM

Thanks tredegar, appreciated, I'll look into it, otherwise I will attempt Spinrite, need to make sure the guy won't blame me for losing his data, even if its already lost.

tredegar 01-17-2008 12:23 PM

As I said, it looks bad.
But you cannot mount disks like this:

Quote:

Code:

mount -t ntfs /dev/hdd /mnt

You need to mount a partition to a directory, more like this:
Code:

mount -t ntfs /dev/hdd0 /mnt/baddisk
The directory baddisk must exist before you try the mount.
But I think the disk is bad, so this is unlikely to work :(

Give photorec a try, it is not just for photos (jpg's), but loads of other formats as well.

Beaud 01-17-2008 12:27 PM

Yeah, I've googled it, looks good. I'll give it a try right now. Thanks.

Emerson 01-17-2008 12:30 PM

Quote:

[root@localhost ~]# mount -t ntfs /dev/hdd /mnt
mount: unknown filesystem type 'ntfs'
NTFS support missing?

Beaud 01-17-2008 12:37 PM

Yes, it is missing... for some reason or maybe I am missing a lib.

Emerson 01-17-2008 12:41 PM

Not sure but I think FC6 didn't have NTFS support out of box.

tredegar 01-17-2008 12:57 PM

Quote:

Yes, it is missing... for some reason or maybe I am missing a lib.
You are missing a module:
Code:

tg@vaio:~$ lsmod | grep ntfs
ntfs                  103536  2
tg@vaio:~$

So, try, as root, modprobe ntfs

Beaud 01-17-2008 01:18 PM

FATAL, not found, I'll install it. With yum I guess

Beaud 01-17-2008 01:32 PM

Anyway, if there is no partition, there is nothing to be mounted? Confusing a little when it comes to use photorec with no partition found, I'll give it a second try.

Code:

D empty                  0  0  1 158815  15 63  160086528 [Whole disk]

Beaud 01-17-2008 01:40 PM

here we go

Code:

PhotoRec 6.8, Data Recovery Utility, August 2007
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hdd - 81 GB / 76 GiB (RO)
    Partition                  Start        End    Size in sectors
  D empty                    0  0  1 158815  15 63  160086528 [Whole disk]


Pass 0 - Reading sector        241/160086528, 0/10 headers found
Elapsed time 0h00m03s - Estimated time for achievement 553h32m55

Guess it not quit done yet. Got NTFS module installed but modprobe doesnt agree still. Thanks. I guess there is nothing else I can do for now.

Electro 01-17-2008 03:41 PM

When trying to recover data from a failed drive, always first make an image file of it. Then run the recover utility on the image file. Never try recover data from a failed drive because you never know when it will seize to function.

Try running ddrescue or dd_rescue to make an image file of the drive. Then run PhotoRec to recover the files on the image file. If making the image file fails to work, use the hard drive utility from the manufacture and tell it to repair. Hitachi disk utility is good at this but can only be used with Hitach hard drives. Then re-start imaging the drive and use PhotoRec on the image file.

To make sure the kernel sees a new installed module, run depmod -a.

syg00 01-17-2008 03:53 PM

Not much point installing NTFS support if you can't find a partition.
The error every 64 sectors sounds bad - this is a logical track. Probably means the read is attempted, and gives up - tries next "track". Same result.
If you can't physically read the disk, even the forensic solutions are up against a wall.

If you search around, you'll find plenty of (sometimes whacko) suggestions - even sticking the disk in the freezer overnight. As I have a small pile of dead-ish disks I tried that one once - didn't work for me.

Simon Bridge 01-17-2008 05:28 PM

Quote:

I'll install [ntfs driver]. With yum I guess
NO!

fedora comes with ntfs-3g ... you mount an ntfs partition like this:

# ntfs-3g /dev/hdd1 /mnt/fubar

yum install ntfs will remove ntfs-3g and leaving you with ro support only.

Simon Bridge 01-17-2008 05:55 PM

Dead hard drive Sketch


The cast:

MR. PRALINE
Beaud's results
SHOP OWNER
Beaud

The sketch:

A customer enters a hardware repair shop.

Mr. Praline: 'Ello, I wish to register a complaint.

(The owner does not respond.)

Mr. Praline: 'Ello, Miss?

Owner: What do you mean "miss"?

Mr. Praline: I'm sorry, I have a cold. I wish to make a complaint!

Owner: We're closin' for lunch.

Mr. Praline: Never mind that, my lad. I wish to complain about this hard drive what I purchased not half an hour ago from this very boutique.

Owner: Oh yes, the, uh, the 86GiB IDE...What's,uh...What's wrong with it?

Mr. Praline: I'll tell you what's wrong with it, my lad. it's dead, that's what's wrong with it!

Owner: No, no, it's uh,...it's resting.

Mr. Praline: Look, matey, I know a dead hard drive when I see one, and I'm looking at one right now.

Owner: No no it's not dead, it's, it's restin'! Remarkable drive, the 80GiB IDE, idn'it, ay? Beautiful platters!

Mr. Praline: The platters don't enter into it. It's stone dead.

Owner: Nononono, no, no! it's resting!

Mr. Praline: All right then, if it's restin', I'll wake him up! (shouting at the drive enclosure) 'Ello, Mister hard drive! I've got a lovely fresh ntfs driver for you if you show...

(owner hits the drive enclosure)

Owner: There, it moved!

Mr. Praline: No, it didn't, that was you hitting the drive enclosure!

Owner: I never!!

Mr. Praline: Yes, you did!

Owner: I never, never did anything...

Mr. Praline: (yelling and hitting the drive enclosure repeatedly) 'ELLO DRIVE!!!!! Testing! Testing! Testing! Testing! This is your nine o'clock alarm call!

(Takes hard drive out of the drive enclosure and thumps its hard on the counter. Throws it up in the air and watches it plummet to the floor.)

Mr. Praline: Now that's what I call a dead hard drive.

Owner: No, no.....No, it's stunned!

Mr. Praline: STUNNED?!?

Owner: Yeah! You stunned it, just as it was wakin' up! 80GiB IDEs stun easily, major.

Mr. Praline: Um...now look...now look, mate, I've definitely 'ad enough of this. That hard drive is definitely deceased, and when I purchased it not 'alf an hour ago, you assured me that its total lack of operation was due to it bein' tired and shagged out following a prolonged data transfer.

Owner: Well, it's...it's, ah...probably pining for the fjords.

Mr. Praline: PININ' for the FJORDS?!?!?!? What kind of talk is that?, look, why did he fail the first fsck the moment I got 'im home?

Owner: The 80GiB IDE prefers keepin' the fsck to itself! Remarkable drive, id'nit, squire? Lovely platters!

Mr. Praline: Look, I took the liberty of running badblocks: nearly 100% badblocks after 10mins, canceled. I'm currently running gpart and I'm having read errors EIO near sectors(...) every 64 "sectors". As an additionnal information, I tried to mount the hard drive from the FC Rescue Mode. No result. fdisk can't find any valid partition.
(pause)

Owner: Well, o'course it was "can't find any valid partition"! You don't have ntfs support. If it wasn't for those badblocks, that drive would have burst out of it's casing and "VOOM"!

Mr. Praline: "ntfs support"?!? Mate, this drive wouldn't "voom" if you put four million volts through it! it's bleedin' demised!

Owner: No no! it's pining!

Mr. Praline: it's not pinin'! it's passed on! This hard drive is no more! It has ceased to be! it's expired and gone to meet it's maker! it's a stiff! Bereft of life, it rests in peace! If you hadn't jammed it in it's enclosure it'd be pushing up the daisies! It's data-streaming processes are now 'istory! it's off the twig! it's kicked the bucket, it's shuffled off it's mortal coil, run down the curtain and joined the bleedin' choir invisibile!! THIS IS AN EX-hard drive!!

(pause)

Owner: Well, I'd better replace it, then. (he takes a quick peek behind the counter) Sorry squire, I've had a look 'round the back of the shop, and uh, we're right out of hard drives.

Mr. Praline: I see. I see, I get the picture.

Owner: I got an old Windows box.

(pause)

Mr. Praline: Pray, does it store data?

Owner: Nnnnot really.

Mr. Praline: WELL IT'S HARDLY A BLOODY REPLACEMENT, IS IT?!!???!!?

Owner: N-no, I guess not. (gets ashamed, looks at his feet)

Mr. Praline: Well.

(pause)

Owner: (quietly) D'you.... d'you want to come back to my place?

Mr. Praline: (looks around) Yeah, all right, sure.

Simon Bridge 01-17-2008 06:09 PM

Narrator: In A.D. 2008, a hard drive failed.
Captain: What happen ?
Mechanic: Somebody set up us the bomb.
Operator: We get signal.
Captain: What!
Operator: Main screen turn on.
Captain: It's you!!
CATS: How are you gentlemen!!
CATS: All your hard drive are belong to us.
CATS: You data are on the way to destruction.
Captain: What you say!!
CATS: You data has no chance to survive make your time.
CATS: Ha Ha Ha Ha ....
Operator: Captain!! *
Captain: Take off every 'recovery option'!!
Captain: You know what you doing.
Captain: Move 'recovery'.
Captain: For great justice.

Emerson 01-17-2008 06:31 PM

Man, you are not dethroning my favorite writer G. B. Shaw yet ... but you are getting close!!!

Simon Bridge 01-17-2008 07:27 PM

Quote:

Man, you are not dethroning my favorite writer G. B. Shaw yet ... but you are getting close!!!
Americans adore me and will go on adoring me until I say something nice about them.

Beaud 01-18-2008 12:00 AM

*Clap* *bow*
Simon, my friend, we are going to make a lot of money with this scenario.

Beaud 01-18-2008 12:10 AM

Thanks for you all for replying, I've learned lot of things, I will make good use of what I aquired. I'll take that disk back to its owner and... huh... w/e I'm glad to see an active and dedicated community.

Regards, Beaud


All times are GMT -5. The time now is 06:21 PM.