How to Fix A NTFS Partition With "fsck"

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
gcmartin

How to Fix A NTFS Partition With "fsck"

#1 Post by gcmartin »

Many Puppy users may already be aware of this:

Puppy can be used to Fix A NTFS Partition With "fsck"

Did you know that you can fix a "dirty" NTFS flagged drive using your Puppy?

NTFS drives get dirty usually when the MS system was shtdown improperly. And MS automatically corrects these, unless you skip the MS boot-time message, upon a reboot usually using Microsoft's chkdsk tool. (Believe it or not, an improper shutdown can leave a Linux drive "dirty", too)

Sometime/often-times we may encounter a dirty NTFS drive.

Out of the box (OOTB), Puppy/Linux does not make attempts to correct these. But, there are tools that come with Puppy designed to provide assistance when needed. The Linux tool to "clear" a dirty drive is fsck. (This is the Linux flavor of MS's chkdsk.)

Since all PUPs come with NTFS support built-in, YOU have a requirement to insure that fsck can find this support when asked to clean a dirty partition.

To do this, you MUST add 2 missing symlinks:

Code: Select all

ln ­s /usr/bin/ntfsfix /usr/sbin/fsck.ntfs­3g
ln ­s /usr/bin/ntfsfix /usr/sbin/fsck.ntfs
Having done this, YOU CAN CLEAN THE NTFS PARTITION (in the same fashion you would for a Linux drive):

Code: Select all

fsck /dev/sdb1
Here to help

Additional notes
Example of Puppy with links to NTFSFIX missing! wrote:bash-4.1# fsck /dev/sdg1
fsck 1.41.14 (22-Dec-2010)
fsck: fsck.ntfs: not found
fsck: Error 2 while executing fsck.ntfs for /dev/sdg1
<root> ~
bash-4.1# echo "The above results when fsck does NOT KNOW where his ntfsfix support is!"
The above results when fsck does NOT KNOW where his ntfsfix support is!
Use filemanager to make a link from /usr/vin
Example with links to FSCK set for fixing NTFS! wrote:<root> ~
bash-4.1# fsck /dev/sdg1
fsck 1.41.14 (22-Dec-2010)
Mounting volume... FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdg1 was processed successfully.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#2 Post by jpeps »

You don't need any symlinks, just run (for sdb1):

ntfsfix /dev/sdb1


Also, it's NOT a substitute for chkdsk

"ntfsfix is a utility that fixes some common NTFS problems. ntfsfix is NOT a Linux version of chkdsk. It only repairs some fundamental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Windows. "

http://linux.die.net/man/8/ntfsfix

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#3 Post by Sylvander »

Is it OK to use "GParted->check" on an NTFS partition as a substitute for chkdsk?

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#4 Post by jpeps »

Sylvander wrote:Is it OK to use "GParted->check" on an NTFS partition as a substitute for chkdsk?
Given that people are having to run chkdsk before GParted will work, I would say no.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#5 Post by Sylvander »

jpeps wrote:Given that people are having to run chkdsk before GParted will work, I would say no.
Does this apply to all GParted operations, or only when working with NTFS?
GParted has always appeared to work for me.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#6 Post by nooby »

ntfsfix /dev/sdb1

so if I use sda2 then I should change it to
ntfsfix /dev/sda2 ???
I use Google Search on Puppy Forum
not an ideal solution though

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#7 Post by jpeps »

Sylvander wrote:
jpeps wrote:Given that people are having to run chkdsk before GParted will work, I would say no.
Does this apply to all GParted operations, or only when working with NTFS?
GParted has always appeared to work for me.
GParted "check" attempts to fix major problems, but doesn't replace fsck or e2fsck for regular maintenance.



"Why isn't ntfsfix named fsck.ntfs? I don't know, but there's probably a good reason"

http://lifehacker.com/5817282/what-kind ... y-linux-pc

nooby: yes, sdb1 was only an example.

gcmartin

#8 Post by gcmartin »

nooby wrote: ... so if I use sda2 then I should change it to

Code: Select all

ntfsfix /dev/sda2
You see this correctly.

gcmartin

#9 Post by gcmartin »

jpeps wrote:
Sylvander wrote:Is it OK to use "GParted->check" on an NTFS partition as a substitute for chkdsk?
Given that people are having to run chkdsk before GParted will work, I would say no.
What is being pointed out here is the "flag" that all users will see when they attempt to use GPARTED on a disk that has an NTFS partition(s). When the flag is present, GPARTED will not let you do anything internal with the partition when the flag is showing.

One way to remove the flag (probably on some/most occasions) without having to first boot the partition to Windows to remove the flag then reboot in LInux....is to ===> following the steps outline in the first post to this thread.

That's the reason for that post...to show one thing that works in Linux to clear the flag for GPARTED use on a "dirty" NTFS partition. But as @JPeps shares, this may not always work to remove the flag.

Hope this helps

Post Reply