D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Sick hard drive...

 

On Sun, 5 Jul 2009, tom wrote:

> Gordon Henderson wrote:
>> On Sun, 5 Jul 2009, tom wrote:
>>
>>
>>> When my laptop went west a component on the motherboard overheated. It
>>> seems to have done something to the hard drive so the hard drive is
>>> asking to be initialised. Does anyone know of a way of just kicking its
>>> bottom to see it the data is still there on the drive?
>>>
>>
>> What do you mean by "askingto be initialised"?
>>
>> What format is(was) it - ext3, ntfs, ?
>>
> ext3 I think - its a good 5 years old
> Its so long since I worked at this 'low level'
> I took it the laptop to the pc shop in Holsworthy and they plugged the
> HD into a linux box and said it wanted to be initialised ie formatted -
> cant speek MS no more.
> ex2fsck is probably what I'm looking for?

Maybe, but the very first thing is to get a Linux box that does not try to 
automount or otherwise fiddle with a new drive plugged into an existing 
box... Or maybe you can temporarily turn-ff auto-scan. I do not use these 
auto hardware recogniser things, so have no idea how to control them. 
(Other than kill -9)

I'd be happy to help, but (a) I'm in Buckfastleigh, and (b) going away for 
a few days from Tuesday...

If you get it plugged in and no automounter going, then I'd be doing 
something like the following:

Check that the drive is recognised - see output of dmesg. (It probably is, 
given that the other Linux box 'found' it before declaring it needed 
initialising)

See if it has smart enabled, (or is capable, but if it's 5 years old, then 
maybe not), but if it has, then extract the smart data from it to see what 
it says (smartctl ...)

Then do a surface scan with badblocks.

Then check the partition table - fdisk -l

Then I might run an fsck on it without modifying anything just to see what 
it looks like... If very bad, then try to mount it read only and copy what 
data off I can, if it looks like it's mostly fine (just a 'normal' power 
fail), then fsck it, mount read-only and get the data off it.

However, if it's asking to be "initialised", then something is very wrong 
- either that or whatever software is running on the test box is too dumb 
to recognise a partially broken disk and offer to abandon it...

Anyway, if the above fails, but the surface scan if mostly OK, it's 
low-level fsck time if the first fsck can't find the first superblock 
you'll need to work out there the backups are (which will almost always be 
in the default locations) and again do it without making changes to see 
how bad it looks before comiting to writing changed back .. (ans assuming 
the partition table is OK to start with - you did keep a copy of it on 
paper or another server, didn't you?)

Gordon

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html