LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-29-2013, 10:13 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Unhappy HD hardware failure, dd experts needed.


Hi !

My HD fails badly when i try to dd copy it's content on another drive, then i have to cut power and plug it back to make it recognized again.

However, i noticed that i can clone the last partition without failure.

So the idea would be to dd the entire disk to another one, _starting from the end_ until it fails.
Or starting from a random X point, same X point where the copy will start on the target drive (it's two drives with same cylinders/sectors number).

Then i'll see what i can do from here.

Anyway, i don't know how to so this in a safe manner, and i don't want to do useless tries as it may damage my drive further :/.
 
Old 12-29-2013, 11:21 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,469

Rep: Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354
I would do the minimum exercising of that knackered disk.
IME, the electronics of a disk goes, or else the platter fails. I'm presuming the latter. It gets worse as you thrash it.

Grab any good partition with cp-a; Even (sub)directories on bad partitions with cp-a, if you can. Ignore system files, and go after what you need only, in order of importance. You will get quick to realise when you have asked for something that's knackered, and be quick to hit Ctrl_C.

dd is big trouble to restore unless you have a similar disk (Same size, heads, cyls, sectors etc.). If you have an identical disk, the directories line up if you copy the whole shebang. Not otherwise.

Then, I might let e2fsck loose on it and say "Yes" to it. Your unreadable crap may build up in lost & found as bunches of sectors, and you can do your best with that later.
 
Old 12-29-2013, 11:24 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,784

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
ddrescue has a "--reverse" mode for working from the end of the device/file toward the beginning. My limited experience with ddrescue has certainly never involved a drive that locks up when trying to read from a region with problems, so good luck with that.
 
Old 12-29-2013, 11:37 AM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
As rknichols said, use ddrescue rather than dd. Because when dd runs into bad sectors it tries, tries and tries again to keep reading them. But they may be impossible to read due to your disk failure. ddrescue will do its best to read the mostest the fastest, skipping over problem areas initially, then coming back to them later to attempt further reading. Thus you don't waste what little life your harddrive may still have in it trying to read, re-read, and re-read again what may eventually prove to be impossible to read.
 
Old 12-29-2013, 12:24 PM   #5
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
I'll try ddrescue.

I omitted to say that i can't mount the partition 1, partition 2 is swap.
When i try to mount, dmesg reports a bunch of errors, and i lose the drive, having to unplug and replug power.

The partition 1 is xfs, and xfs_repair do the same.
 
Old 12-29-2013, 01:34 PM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,469

Rep: Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354Reputation: 2354
Try ddrescue, by all means.

Given the extra information you provided in your second post, I'm turning to the electronics as an armchair diagnosis. In this case, you're up the creek without a paddle and sinking fast.

I did rescue one disk in that state by buying a fresh one from the manufacturer(Maxtor), swapping in the card, and bingo, my data was there. Might be worth a shot.
 
Old 12-29-2013, 07:31 PM   #7
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Have copied 200G from my 1T, i'll continue tomorrow. I have to unplug the drive from time to time as it now seems filled with bad blocks...

Thanks for the ddrescue advice, i feel less pain with each byte secured.
After that, i'll have to make my way through almost 1T of recovered data :/ .
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I badly needed your help... spams experts erosszz Linux - Newbie 3 10-25-2006 02:56 AM
Makefile help from experts needed markelo Programming 0 07-23-2006 01:13 PM
newbies and experts needed for an article otheralex Linux - General 2 10-19-2004 12:12 AM
awk experts help needed ferreirafm Linux - General 2 07-28-2004 08:38 PM
BIND DNS experts help needed adengua Linux - Networking 2 03-02-2004 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:48 PM.

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