Newsgroups: gmane.linux.debian.user Date: Fri, 4 Mar 2005 20:40:06 +0000
> A harddisc partition died on me without prior warnings. (ext3 filesystem) > The fsck command during boot suddenly reported: > > [...] > > I tried to read some data with the dd command and the first couple of > blocks work ok but later it complains:
I've had exactly this problem occur at work yesterday. I thought I would explain the full process for any other interested parties.
What you need to do is get the disk to a machine with sufficient space to hold the entire contents of the disk (or partition) that you are concerned about.
You then need to ensure that you are able to write a file that is bigger than 2GB - this is the real problem that I have been having!!!
Then what you do is NOT MOUNT you're dodgy disk but do make sure that your donor machine can see it.
If I presume that your bad disk is /dev/hda3 and that your good disk can be written to the current directory, then you should then be able to copy the contents to another disk by using the following command:
dd if=/dev/hda3 of=./recover.dat conv=noerror,sync.
The "noerror" bit says ignore errors and the "sync" option says to replace any bad bits read with zero data instead.
You can then mount the resultant file loop.
As an aside: my problem has been the combination of a Promise FastTrak 100 controller which had one disk die in a mirrored pair and the fact that neither DamnSmallLinux nor SystemRescueCD has allowed me to write a file bigger than 2GB on an ext2 partition!!
Eventually I found that SystemRescueCD would allow me to create and mount a ReiserFS partition where I can create a 20GB file!! Hurrah!
(I checked this by doing "dd if=/dev/zero of=/mnt/tmpdisk/blank_file bs=1k count=30720000")
But SystemRescueCD is not able to see the blasted disk on the blasted FastTrak controler!!!!!! AAAAAAAGGGGGGHHHHHH!!!!!!
Anyway - I hope this is of use to you.
TreeBoy