Fix corrupt NTFS partition without Windows
Install ntfs-3g with sudo apt-get install ntfs-3g
.
Then run the ntfsfix command on your NTFS partition.
For example:
ntfsfix /dev/hda6
ntfsfix v2.0.0 (libntfs 10:0:0)
Usage: ntfsfix [options] device
Attempt to fix an NTFS partition. -h, --help Display this help -V, --version Display version information
Developers' email address:
[email protected]
Linux NTFS homepage: http://www.linux-ntfs.org
For newer Ubuntus You can use -b
and -d
option together. -b
tries to fix bad clusters and -d
to fix dirty states. So the command can be
sudo ntfsfix -b -d /dev/sda6
--help
shows them
ntfsfix v2015.3.14AR.1 (libntfs-3g)
Usage: ntfsfix [options] device
Attempt to fix an NTFS partition.
-b, --clear-bad-sectors Clear the bad sector list
-d, --clear-dirty Clear the volume dirty flag
-h, --help Display this help
-n, --no-action Do not write anything
-V, --version Display version information
I've just fixed my USB drive using "testdisk", a Linux command line (yet friendly) utility. My drive was not even mounting in Windows and Windows 8 discovered like 6 partitions (when the drive had only one).
To use the utility, install it:
sudo apt-get install testdisk
Then run it:
sudo testdisk
and follow the instructions. You must search for partitions and then write the changes.
Hope this help anyone.
Just to clear some of your points up.
My attempt to run fsck results in the following :
ubuntu@ubuntu:~$ sudo fsck /dev/sda ... fsck.ext2: Bad magic number in super-block while trying to open /dev/sda
Now, thats not wonder, because you are trying to fsck the disk, and not its partition. What fsck does is, it tries to recognize the FS type. Because you have given it raw disk surface, it fails to recognize and resorts to default type - ext, calling fsck.ext.
fsck.ext does not find any FS signature in the location and tries to find superblocks. Ultimately it fails, because its disk with only NTFS partition type.
This is why you have this error.
The correct command would be:
sudo fsck /dev/sda1
That would feed the FIRST partition of first sata hard drive, not the first sata disk itself.
In Ubuntu 14.04 Just try this
sudo ntfsfix /dev/sdXY
Where XY
is your partition. (/dev/sda2
in your case)