How to Fix a Corrupted Windows NTFS Filesystem with Linux

Posted on Tuesday, 22 of August of 2017
1245by Octåvio Gonçalveslinuxwindowssecuritycommand line

PREVIOUS NOTE - READ CAREFULLY:
The following steps, in this article, can work in most cases, but it depends how the Filesystem is damaged.
The results are not guarantee.
So, if you want to follow this steps, you are the only responsable for the result, data loss, or an unrecovable Filesystem, media, disk, usb flash drive, etc. 
In the bottom of line, you are by your own.
We allways advise that: Recovering data loss ... consult a specialist.

Recover NTFS FileSystem with ntfs-3g and ntfsprogs:
Luckily you can schedule an NTFS consistency check within Linux to attempt to repair your tattered Windows partition, but you’re going to need to install a couple of things.

For this, open the terminal (CTRL+ALT+T) and type:

sudo apt-get install ntfs-3g ntfsprogs

Now with both of those tools at your disposal, you can set about fixing Windows. First locate your Windows partition.

To know your device address, run this command:

sudo fdisk -l

The result will be similar of this:

/dev/sdb1 * 638 12312937738247HPFS/NTFS

The important bit is the /dev/sdb1 which tells us where the Windows partition is mounted.
HPFS/NTFS lets us know that the partition is a Microsoft Windows formatted device, and that little star denotes that this is a bootable partition.
So in my case /dev/sdb1 means that Windows is on sdb (internal hard drive) and that it’s partition 1 that we want to play around with.
Armed with this information you want to use NTFSProgs to attempt to fix the partition. In your Terminal window type:

sudo ntfsfix /dev/"device name"

Replace "device name" with your Windows partition (e.g. /dev/sdb1).
Your drive will now be mounted, checked for consistency and any errors found should be fixed. Restart your PC to assess the situation, if all goes well you’ll see Windows.

Share or save this article

slashdot