Use linux boot disk to repair a Windows NTFS disk fault

Yes, you can use a Linux boot CD to repair a Windows NTFS disk fault. Linux ships with a utility called badblocks. Badblocks is a Linux command in its own right that has several different modes to be able to detect bad sectors on our hard disk. Once found, it saves the references to these bad sectors in a text file so we can tell the operating system to avoid storing data on them.

For the explanation below though, I’ll be using the fsck command. Why’s that? Well fsck is a really powerful command that actually runs those relatively complicated badblocks commands for you, checking or repairing errors in your filesystem and doing all the leg work for you.

Geek fact – fsck stands for “File System Consistency checK” which you can amaze your friends down the pub with. Or not…

Let’s open a terminal window and fire up this bad boy then. You’ll need superuser/root permission to run each of these commands so I’ll add ‘sudo’ into them all. I like to start by running the parted command to list my drives:

sudo parted /dev/sda 'print'

This should output the installed drives to the screen so you can note down which one you want to work with.

Now let’s run fsck on the disk. Please note that this can take several hours depending on the speed of your system, the size and speed of your disk. If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in /etc/fstab serially.

IMPORTANT – We must unmount the disk first or data corruption may happen. To do this, open a terminal window and type:

sudo umount /dev/sda1

Replace “sda1” with the disk you need to repair. Now we can run the fsck command safely against the drive:

sudo fsck -mcfv /dev/sda1

This fsck command forces automatic bad block checking and it automatically marks all known bad sectors as bad too.

The switch options I often use are:

-m  I use this for safety because if the drive is mounted you won’t be able to scan (and corrupt) it this way.

-c   Displays completion/progress bars

-f   Force a check even if it is clean

-v  Verbose, because I like to see words!

If you’re booting back into Linux, make sure that smartmontools is installed and enabled:

sudo apt-get install smartmontools

Enable “SMART” in your BIOS if it isn’t already and run an extended offline test with:

sudo smartctl --test=long /dev/sda

To see a nice overall view of system health, type:

sudo smartctl -a /dev/sda

Have a look at the relevant manpages for more info:

man fsck
man smartmontools

 

In my repair shop I only use HDD Regenerator these days.  It’s a bootable software that can fix errors on all types of disk, formatted in all manner of filesystems as used by Linux, Mac, Windows and more. We have this loaded on our drive test rig and repair hard drives daily with it.

If you want to make it easy and have a USB/CD/DVD bootable tool that will work safely on all the drives it comes up against I’d suggest you look at my hdd regenerator review here or buy it direct from their website here

 

2 thoughts on “Use linux boot disk to repair a Windows NTFS disk fault

    • Hi. The command fsck actually uses badblocks when it runs, so there is no need to call the more complicated badblocks commands directly. I have updated the article to make it clearer, thanks for the comment.

Leave a Reply

Your email address will not be published. Required fields are marked *