How to

How to Fix a Corrupted Windows NTFS Filesystem with Linux

NTFS Filesystem

How many of you guys have had that sinking feeling when your PC boots up? You guys know, a slight niggle in the back of your mind that actually says “this is taking longer than usual” before Windows drops dead in front of you and actually refuses to play ball as well. In this article, we are going to talk about How to Fix a Corrupted Windows NTFS Filesystem with Linux. Let’s begin!

Me too and much of the time the original Windows CD/DVD/USB you guys used in your original install can’t fix the problem. You have to do something else. Something just like the entire operating system, either installed on a separate partition or in Live CD/USB format as well. Now enter Ubuntu!

There are a few good reasons to have Ubuntu on a CD or also a USB stick somewhere in a draw. It’s absolutely free, to start with. You don’t have to install it to use it, and it’s really great for accessing a butchered Windows partition. Also, even if it’s just to get your precious documents back before a format as well.

Whenever it comes to fixing your broken Windows, just install it than Ubuntu has its uses there as well. If you happen to break your registry or also master boot record, then just fear not. All is not lost. This technique should work on any Ubuntu-based Linux distributions as well.

Install NTFS Filesystem fix

The NTFS fix tool doesn’t really come pre-installed on Linux. Moreover, most Linux distributions cannot interact along with NTFS file systems natively. So, before we can get into how you can clean up a hard drive running the Windows file system. We must go over how you can set up your Linux OS to be able to interact along with the hard drive via installing Ntfs-3g, and many other packages.

In order to start the installation of NTFS fix, open up a terminal window via tapping on Ctrl + Shift + T or Ctrl + Alt + T on the keyboard. Then, follow the command-line instructions that basically match your Linux operating system below.

Ubuntu

On Ubuntu Linux, the NTFSFix app isn’t installable along with its specific package. Rather, the  Ntfs-3g package that adds in support for the Microsoft Windows NTFS file system will also give the NTFS fix application.

In order to install the Ntfs-3g package on your Ubuntu system, you guys have to use the following Apt command below.

sudo apt install ntfs-3g -y

Debian

Debian Linux is really similar to Ubuntu when it comes to NTFS Fix because it doesn’t distribute the app as a unique package. However, rather as a small piece of the Ntfs-3g package (that provides NTFS support to Linux).

If you’re on Linux and you need this package, then head to the terminal window and use the Apt-get command below.

sudo apt-get install ntfs-3g -y

Arch Linux | NTFS Filesystem

In order to gain access to the NTFS Fix utility on Arch Linux, you guys must load up the NTFS-3g package. But, you should know that the NTFS-3g package is only available in the “Extra” software repository actually. That needs to be enabled as well.

Turn on extra via opening up your Pacman configuration file through the Nano text editor.

sudo nano -w /etc/pacman.conf

Now scroll via to find “Extra” and remove the “#” symbol from the “Extra” line in order to enable it. Then, remove the # symbols from all of the lines directly below it as well. Just save the edits to the configuration file in Nano through tapping Ctrl + O, exit along with Ctrl + X, and install the package with:

sudo pacman -Syy ntfs-3g

Fedora | NTFS Filesystem

On Fedora Linux, support for NTFS and also the NTFS Fix app is split between two packages. The Ntfs-3g package and also the Ntfsprogs package. In order to install both on your Fedora system, now enter the DNF command below.

sudo dnf install ntfs-3g ntfsprogs -y

OpenSUSE

OpenSUSE handles NTFS Fix because the Fedora project does. The NTFS userspace driver is in the Ntfs-3g package, whenever the NTFS Fix utility, and all other things are in the ntfsprogs package as well. In order to get everything working, enter the Zypper command below.

sudo zypper install ntfs-3g ntfsprogs

Using NTFS Filesystem Fix

The NTFS Fix tool is really easy to use on Linux, when the command’s syntax and options are very well explained in the “help” area of the command as well.

Note: IN order to access the “help” section, you have to run ntfsfix --help.

In order to clean up an NTFS filesystem hard drive on Linux along with the NTFS fix, start through identifying the drive label of it in the terminal. The quickest way to identify a hard drive’s label on Linux is just to use the lsblk command. In the terminal, you have to execute the command below.

lsblk

Just look through the drive tree that the lsblk command prints out on screen and do your best to identify the label and partition of your Windows/NTFS hard drive. When you’ve got the label of your Windows or NTFS hard drive and also the partition you’d like to scan. Just pipe it into the command below in order to run NTFS Fix. In this example, the drive label is basically/dev/sdX1. Make sure to replace it along with your actual drive label.

Note: keep in mind that running this tool does not really work 100% of the time. Many times, if NTFS Fix can’t take care of the problem, you guys must boot into Windows and run a chkdsk.

sudo ntfsfix /dev/sdX1

Now let the command run its course. When done, then each and everything on your NTFS drive should be in working order!

Clear bad sectors

Have to clear out some bad sectors on your NTFS hard drive? The NTFS Fix can take care of it as well! Just use the “clear-bad-sectors” command-line switch actually.

sudo ntfsfix --clear-bad-sectors /dev/sdX1

Clear dirty flags

The NTFS Fix tool can actually clear any “dirty flags” on an NTFS drive if the “clear-dirty” command-line switch is used or not.

sudo ntfsfix --clear-dirty /dev/sdX1

Fixing A Corrupt Master Boot Record

If you guys have got a problem with Windows’ oh-so-important boot record then you can also fix that from within Ubuntu as well. Assuming that you’ve already booted into Ubuntu, open up Terminal and then install lilo via typing:

sudo apt-get install lilo

You have to enter your password to proceed with the installation, you’ll get a few warnings pop up along the way. If you followed the first part of this tutorial you’ll guys know which partition Windows is installed on, and also if you missed it type:

sudo fdisk -l

You have to find the HPFS/NTFS partition that relates to your Windows install and then type:

sudo lilo -M /dev/ mbr

Replace <device name> along with your Windows partition (e.g. /dev/sda2) and then tap on Enter. Ubuntu will attempt in order to restore your master boot record. You’ll probably want to restart your machine now, just make sure you take any Live CD/USB devices out as you do.

Conclusion

Alright, That was all Folks! I hope you guys like this article and also find it helpful to you. Give us your feedback on it. Also if you guys have further queries and issues related to this article. Then let us know in the comments section below. We will get back to you shortly.

Have a Great Day!

Also See: How to Revitalize Kodi – Factory reset Kodi

About the author

Windy Moore

Leave a Reply