ABENEZER/OSpersonal web terminal · session: guest
~/about.txtprojects/writing/bookshelf/

guest@abenezer.ca:~$ cat ~/notes/mounting-error-ntsfix.md

--- file metadata ---

Using ntfsfix to fix mounting error on Linux

date: 2024-07-20

topic: development

read_time: 1 min read

# For those annoying "unknown error when mounting" messages

If you've ever encountered mounting errors with NTFS partitions on Linux, you know how frustrating it can be. In this post, I'll share a quick fix using the ntfsfix utility.

Bash
Error mounting /dev/sda4 at /media/ab/Elements:unknown error when 
mounting /dev/sda4

Here are the two steps I took to fix my most recent mounting error:

1. Find the name of the partition

Bash
$ lsblk    # in my case, it was /dev/sda4 I was having trouble with

2. Run ntfsfix: Use ntfsfix to repair the partition.

Bash
$ sudo ntfsfix /dev/sda4

Mounting volume... $MFTMirr does not match $MFT (record 0).
FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 0...OK
Correcting differences in $MFTMirr record 3...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sda4 was processed successfully.

guest@abenezer.ca:~$ cd ..

guest@abenezer.ca:~$ theme --list

workspace berkshire terminal