Issue mounting an NTFS partition

A bit of background for context

I run Manjaro Cinnamon edition that is installed on the main hard drive formatted as GPT partition table and ext4 file system. (Linux only - no dualboot) I also have a second internal hard drive with only ‘data’ on it, that is formatted as MBR partition table and 2 NTFS partitions (actually there are 3 partitions, an Expended partition and 2 NTFS partitions within)

If you wondering why NTFS it’s because that drive was in the computer when I was running ‘Windows XP’ and when I initially changed to Linux - I was dual-booting hence I left the NTFS file system as is so that I could access them from Windows or Linux. When I was ready to fully dump Windows, I physically replaced the main drive with a new SSD and installed Manjaro only, but I left the data drive as is and continued using it for data storage.

Up to about a week ago, I had no issues access either of those 2 NTFS partitions. The partitions are not mounted automatically - I mount them manually as needed (only a few times a month). I can mount one partition Ok but not the other one?? The error message I get when trying to mount the partition from within ‘Nemo’ is not very specific as it list a lot of possibilities as follow

Error mounting /dev/sdb6 at /run/media/jp/DataP: wrong fs type,bad option, bad superblock on /dev/sdb6, missing codepage or helper program, or other error 

If I try to mount the file from within ‘Disk’ I get the same error as above plus the following extra at the end of it

(udisks-error-quark, 0)

From within ‘disk’ I tried ‘Check Filesystem..’ result in ‘Filesystem is Undamaged’ and ‘Repair Filesystem..’ result in ‘Repaire Successful’ (took 1 second if that!)
I found a post on this forum from 2023 with a similar issue, one suggestion was to use ‘ntfs-3g’ (I checked it is installed) and blacklist ‘ntfs3’ which I think is part of the kernel? Is this suggestion still valid? Another suggestion was to run ‘chkdisk’ from within a Windows system - I only have access to Windows XP that’s very old! Any other suggestion/fixes? Thanks

Ps: has the interface changed? the 3 back slach don’t seem to work as they used too?

Hi @chameau,

No. It’s not a back slash, it’s a backtick, and you has 4 in the beginning of your code block so everything was messed up.

Best would be to run chkdsk (or whatever it’s name is) from Windows, yeah. But since you don’t have it any more, or a recent version any way, may I suggest Hiren’s Boot PE:

It doesn’t require installation and is Windows.

However, with those warnings I fear for the worst. So my suggestion would be to disconnect the disk and get a new one. Then format it ext4 and copy everything to it. (I think it can use ext4, if I’m not mistaken.)

Hope this helps!

The error message is telling you something is wrong, and the ntfs3 kernel driver is preventing the filesystem from being mounted, to avoid further possible damage.

Your NTFS filesystem is either damaged, or the dirty bit has been triggered, which amounts to the same resolve – either way, it must be repaired with chkdsk.

No, just, no…

The only reason to take that route is to allow copying your files from the NTFS partition to another location – ntfs-3g will allow you to mount the partition (almost immediately) but it will not fix any damage with the filesystem. If you do this, please make sure to delete the block file afterwards, and fix the actual problem – either that, or format the partition as ext4 using GParted.

Repairing the filesystem with Microsofts’s own tool chkdsk is the only reliable method to check/repair a proprietary NTFS fielsystem – and this must be done from a Windows environment.

If you happen to be multi-booting with Windows then this is comparatively easy. Otherwise, you will need another Windows environment such as Hiren’s Boot DVD suggested by @Mirdarthos. As a last resort, you could temporarily move the NTFS disk to another (Windows) computer for repair.

Please see the following primer for an in-depth explanation:

Regards.


And yet, it has chkdsk.

Considering the partition was created in Windows XP, there should be no compatibility concerns, and later chkdsk versions are backward-compatible, in any case, if you use Hiren’s or similar.

You would need to mount the partition in Windows, assign it a drive letter (“X” for example, so you know which partition to target with chkdsk). Being Windows, there should be no obvious issue accessing it.

If chkdsk asks to unmount the partition before fixing it, allow it, but as it’s not a Windows system partition (C:\) it likely will not need to.

After everything is fixed, this is a valid suggestion, going forward.

Regards.

1 Like

I got the old XP fired up and run ‘chkdsk’ on the problem partition. Chkdsk did not find an error and I had no issue opening the partition in Windows XP.

When I swap back to Manjaro and tried to mount the partition, I got the same error? If no other solution, I will go back to XP and copy the content to another drive or thumbdrive (will have to be NTFS, or exfat) and then I will replace the data drive with a new one (probably SSD) formated as ext4 and transfer all into that. But I would still like to know what is the issue with that partition? if it’s not the mbr corruption then what?

:man_shrugging:

But I think your plan to get a new disk and move it is the way to go.

why not ext4? ext4 and ntfs are journalling file systems, they are recovering from situations like sudden power failure better than exfat. If the purpose it to keep them accessible from Windoze, make sure always to disable Faststartup in all Windoze systems getting in contact as exactly this could cause the dirty bit to be set.

It may need deeper options specified on the chkdsk command-line.

However, if you can access it via Windows, then certainly take the opportunity to move files elsewhere. Once it’s completely empty, you could delete and recreate the partition in GParted and format it as ext4.

Naturally, a new SSD would save a lot of effort. :wink:

I only used chkdsk with the /f option - I may try again with the /r option

This is an intermediate step as I don’t think that Windows xp can write (or even see) to an ext4 partition. As Windows xp can read the data on the affected partition, the idea is to copy the data to an external usb attached drive formatted as NTFS or exfat, then format the internal drive (or a new one) to ext4 and copy the data back from the external drive. After that I will be able to access the data from Manjaro (however I will not be able to access it anymore from Window)

I recently researched the compatibility and feature changes in the different versions of ntfs through the years. I wanted to know if a winxp chkdsk could repair a windows 10 or 11 disk. The answer is NOT reliably !!. Ergo, depending on the error. There are some features introduced after xp time.
So, if you know the filesystem was created with newer version of windows, use at least that version to repair. The latest hirens pe iso linked above is windows 11 based so it will be your best bet.

If the system was created with xp, you can of course use that for repair and ignore my comment.

P.s. if the disk is indeed 25 years old, it might be time for a new one.

1 Like

for later:

if you create an ext4 file system on this or on another drive
keep in mind that by default 5% of the available space will only be accessible (writable) by the root user.

If you want to store data as a user, you’ll not be able to access these 5% - effectively wasting them.
(on a 1TB drive this would amount to ~50GB that can’t be used by a “normal” user …)

tune2fs -m 0 /dev/sdxY
after the file system has been created
would be the command to make all of the space accessible

You don’t necessarily have to replace the drive. You said XP can read both partitions. So do as you said you would. Copy data from both partitions to an NTFS external drive from Win XP. Then boot to Linux, and make sure that it can read the data on the external disk. If so, using Gparted I would reset your existing 2nd drive as GPT (instead of MBR). That will wipe everything (including the partitions) on it. Then reformat it as ext4 and copy the data from your external drive back onto that disk. Job done.

And check the smart status of the disk to know if it is wise to use it.

sudo smartctl --all /dev/XXXXXX
1 Like

Checking for and repairing (where possible) physical bad sectors can take an enormous amount of time (days, in some circumstances) and the process should not be interrupted. This is not scare-mongering, but cold, hard fact. Make certain no hibernation or other settings will interfere with the process.

It cannot – exfat is a wise choice for the USB as Linux does recognise it, and you will be able to easily move your personal files to an ext4 (or any other native Linux filesystem) once you have returned to Manjaro.

What would be the real-life use of the 5% space set aside for root user? I’m the only one using this pc and for personal use only! Is there any value in leaving the 5% or less (2%) instead of 0%?

Windows XP is on a HDD in dual-boot with Mint cinnamon 20.3 (I started off with Mint before moving to Manjaro). When booting up this drive, I noticed that Mint has no issues mounting and reading the ‘Data Drive’? So using this old Mint, I could copy directly to an ext4 formatted drive - by-passing the exfat intermediary?

I had a look online for a 1tb ssd - they are bl… expensive! I wait a few days I may get a better deal during the ‘Boxing Day’ sales.

It was just a heads up:
as a normal user, you cannot use that reserved space.
You simply cannot write to it.
No one but root can.
The file system will appear full to you, even though it isn’t.
That can be a significant amount of space, depending on the size of the partition.
5 % is the default upon file system creation
that amounts to ~50GB that you can’t use in the case of a 1 TB drive/partition
if you don’t change that default.

Reserved blocks

By default, 5% of the filesystem blocks will be reserved for the super-user, to avoid fragmentation and “allow root-owned daemons to continue to function correctly after non-privileged processes are prevented from writing to the filesystem” (from mke2fs(8)).

For modern high-capacity disks, this is higher than necessary if the partition is used as a long-term archive or not crucial to system operations (like /home). See this email for the opinion of ext4 developer Ted Ts’o on reserved blocks and this superuser answer for general background on this topic.

It is generally safe to reduce the percentage of reserved blocks to free up disk space when the partition is either:

  • Very large (for example > 50G)
  • Used as long-term archive, i.e., where files will not be deleted and created very often

The -m option of ext4-related utilities allows to specify the percentage of reserved blocks.

1 Like

Most users may never know of this at all. It is particularly handy to know in the case where one might inadvertantly fill their / partition to the point that they can no longer load the OS effectively – in that case, an amount can be freed up to allow easier recovery.

Other than that, my general suggestion is to forget that the reserved space exists, unless you find yourself in a situation where it’s crucial.

It’s likely Mint Cinnamon is using ntfs-3g as the default NTFS driver – ntfs-3g effectively ignores the dirty bit and allows a damaged filesystem to still be accessed, wherever possible.

Yes, that’s possible. If any data is stored on bad sectors, naturally you might have some trouble, but with any luck it’s not.

Any bad sectors should ideally be marked as such so that data isn’t written to those areas of a disk – that’s where chkdsk (with it’s advanced and time-consuming options) comes into play.

HDDs are cheaper (with larger capacities) if that’s an option.

If I were looking for a disk purely for storage, I might choose something like:

  • 7200rpm (as opposed the cheaper and slower 5400rpm disks)

I see they are currently in-stock at TechBuy for AU$193.00.

1 Like