How to fix a damaged/corrupted NTFS filesystem/partition without losing the data on it?

17

2

I was going to install Fedora 15 along side my Windows 7 Starter on my Acer Apire One D255E and at some point during the resizing of the NTFS partition (the one with Windows on it) the setup failed. Now I cannot access this partition from any OS. When I tried to access it from a Fedora install running on a USB flashdrive I get this error:

Error mounting: mount exited with exit code 12: Failed to read last sector (452534271):
Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to mount '/dev/sda5': Invalid argument
The device '/dev/sda5' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

It doesn't make a lot of sense to me but I was really hoping it would to someone and they can give me a way to restore the partition without losing everything on it (I have a lot of important notes from various classes on there)?

Gareth

Posted 2011-06-17T23:46:49.103

Reputation: 173

Have you tried mounting it in a different windows install? – Kirk – 2011-06-17T23:57:04.730

2Make an image and then screw with it. – KCotreau – 2011-06-18T00:30:24.040

What do you mean by a different windows install? I have tried putting an XP install disk in there to see if I could use it to run chkdsk but it didn't work. – Gareth – 2011-06-18T00:47:30.497

You can try Test Disk: http://www.cgsecurity.org/wiki/TestDisk. If it fixes it, resize your partition in Windows, not Linux. Or use VirtualBox and run Linux in a vm.

– Joe Internet – 2011-06-18T01:08:25.283

Answers

17

If you can get Ubuntu on a live CD and install NTFS-3G and NTFSProgs (in the repositories), you might be able to recover your NTFS sorrows.

I had to do this once for a friend's PC, and I followed this guy's How To. It's very helpful and it should either fix your problem OR give you more information as to what exactly is wrong (then we can work from there).

This may well do the job:

sudo ntfsfix /dev/<device name>

n0pe

Posted 2011-06-17T23:46:49.103

Reputation: 14 506

This worked perfectly! Thank you sooo much for that! :D – Gareth – 2011-06-18T01:53:56.853

No worries, glad to help! – n0pe – 2011-06-18T02:24:20.243

Thank you for answer! Old post, but still very helpful! – Radu Rădeanu – 2013-05-13T07:55:42.433

2

I had a similiar issue on one of my client's PCs. After going through multiple pieces of software such as spinrite, Windows's utilities, Linux based utilities (such as the previous answer's suggestion), HDD Regenerator was the one that found and recovered the bad sectors of the HDD in question in my case, and this HDD had almost 15% of its sectors labeled as BAD. It took approx 11 days to complete but I was able to then mount the drive and remove the user's tax, employee, and other important data.

Joshua A. T.

Posted 2011-06-17T23:46:49.103

Reputation: 21