Drive disaster

I think with that amount of data written to disk you will still have a chance in recovering fair amount of your files.

Sezo you’re beginning to sound like a descending angel :slight_smile:

Well I’ve nothing to lose but I don’t have a clue where to start, so if you’re prepared to help me I would like to try,

as it stand now, the drive is installed back in the NAS, I could leave it there or I also have the option of putting it into a USB docking station I have plugged into my PC or I may have a spare sata port that I can plug it directly into my PC to work on it

Many thanks


If you are willing to try then you will need:
a) spare HDD with space for the full 320GB image and perhaps 100GB free space for the recovered files.
b) install testdisk

sudo apt-get install testdisk

This will give you access to photorec.

Ok I’ve fell at the first hurdle I don’t have a spare drive that’s big enough but I will get one and in the meantime I’ll disconnect the drive so nothing touches it.

Can we come back to this when I have the drive ?


No problem, whenever you are ready.
On the other hand (not recommended) you could run it off the drive direct, but be extremely careful not to write the output back onto the same drive.

On the other hand (not recommended) you could run it off the drive direct, but be extremely careful not to write the output back onto the same drive.

No point in taking any unnecessary risks, I don’t care how long it takes so long as I get the data back if at all possible

out of all the files that was on that drive there’s one directory I really want back, the rest I can get back in time so if you can get that directory back for me I’ll want to marry you and have your babies :smiley:

Many thanks


For the directory structure, forget it. You will be recovering individual files.
Hope you do realise that the recovered files might not be named as the originals.
You would have to check each one and add the proper name to them.
But of course, you have to recover them first… :wink:

I honestly don’t care what they’re called if I got them back renaming them would be a pleasure

But of course, you have to recover them first..

I understand that and I also understand it may not work and if it doesn’t well I’m no worse off than I am now, but win or lose I appreciate you trying to help.

I’ll be back :slight_smile:

Many thanks


You are welcome and like I said, whenever you are ready.

As SeZo says … All formatting does is wipe the part of the drive that contains the “map” of where everything is on the drive (address/allocation tables) … it does not overwrite the data.

So specialised software can normally extract files by “file type” by looking for magic numbers and trying to figure out which blocks belong to which files.

only zeroing the drive (shredding) will overwrite the data.

So remove the drive and don’t use it AT ALL … every time you use it there’ll be less recoverable data :wink:

only zeroing the drive (shredding) will overwrite the data.

Well I didn’t do that and I’ve removed the drive as you suggest, I’ll try to get a drive ASAP, it’s all I can do for now

many thanks


Just to update

I’ve ordered a Western Digital 500gb SATA drive and waiting on delivery I should receive it in the next few days :slight_smile:


Cool :slight_smile:

I haven’t recovered deleted files in this way since the Win95 days, but OP - it is painful.
For every file you want, you’ll find 10 that are “garbage” (either irrelevant, or corrupted) - none of which will be named. Of course, being a Linux drive, it’s not reliant on the FAT table for filetype (it’s held within the file itself, I think), so hopefully the recovery tools have some kind of filtering mechanism.

Still, I wish you the best of luck (and patience)

Thank you chemicalfan

I can’t express how important some of these files are to me, I’ll sift through a million garbage files to find them if I have to


Hi guys

I finally got the drive today it’s a Western Digital 500gb clean and formatted to NTFS.

Is there anything I should do in preparation of copying the drive image from the corrupted drive ?

Many thanks


First of all I would re format that drive to ext4. No point in complicating things with NTFS.
You will need to install these first:

sudo apt-get install gddrescue


sudo apt-get install testdisk

Have both drives connected, assuming /dev/sdb is the source HDD and /dev/sdc is the target HDD.
Mount the target (/dev/sdc) and create a drectory (say rescue) then create the image.

sudo su
mkdir /mnt/sdc1
mount /dev/sdc1 /mnt/sdc1
mkdir /mnt/sdc1/rescue
cd /mnt/sdc1/rescue
ddrescue /dev/sdb image.img logfile

That would take some time to complete.
Once the image is created then remove the source HDD and come back here.

Hi Sezo

thanks for your help with this

I’ve followed your instructions, the way it’s set up on my PC is the source drive is sdc1 and the target is sdi1 so I changed the drive names accordingly and it seems to be doing it’s thing

here’s the commands I put in the terminal hope I got it right, can you please confirm I got it right ?

graeme@Linux1x ~ $ sudo su
[sudo] password for graeme: 
Linux1x graeme # mkdir /mnt/sdi1
Linux1x graeme # mount /dev/sdi1 /mnt/sdi1
Linux1x graeme # cd /mnt/sdi1/rescue
Linux1x rescue # ddrescue /dev/sdc image.img logfile

Yeah, that looks OK

You’re not joking about the time it takes, thats been about 2 hours and it’s so far rescued 200gb from a 320gb drive so probably still over an hour to go, the target drive is connected to a USB docking station (it’s the only way I could connect things up) so maybe that’s slowing it down a bit