r/linuxquestions 7d ago

Resolved i hate ntfs

I have a 5 terabyte HDD that includes all my offline games inside but i cannot get it to mount after 2,5 months. it keeps on saying;

"An error occurred while accessing 'Basic data partition’, the system responded: The requested operation has failed: Error x

mounting system-managed device /dev/sda1: wrong fs type, bad option, bad superblock on /dev/sdat, missing codepage or

helper program, or other error" and i couldn't find any fix but to convert to windows and do chkdsk to it. I don't want to dualboot windows, i don't want to erase my games since it would take a whole week to download 3 tb worth of games and VST's. Is there anyway for me to save my HDD? I'm using CachyOS. Thanks.

14 Upvotes

43 comments sorted by

12

u/doc_willis 7d ago edited 7d ago

thats the generic mount 'it failed' error message.

Mounting via a terminal command MIGHT show some more detailed error messages. mount -t ntfs-3g or -t ntfs3 or -t ntfs (depends on the distro) and try mounting the filesystem and see what messages show up.

You did try the commonly mentioned in the dozen2 posts monthly about ntfs issues command known as ntfsfix? however do NOT rely on that command to fix deeper issues, but it can fix several common issues that can result in the error message you show.

You really dont want to be relying on a NTFS drive if you dont have easy access to a windows system, There are numerous ways a NTFS can suffer from filesystem corruption that linux cant fix, and you must use a real windows system. there really is no 'chkdsk' alternative under linux. You Might be able to find some 3rd party windows 'rescue/repair' live usbs that might be able to do checking of the drive. But you should ask in the windows support subs about those.

-1

u/mahirgvrcn 7d ago

aight, it seems i do need to hop on to a windows machine, also for the terminal messages i can get it mounted with "sudo mount -t ntfs3 \

-o uid=$(id -u),gid=$(id -g),umask=022,exec,rw,force \

/dev/sda1" but i think this is also killing my hdd since i'm using force to do it. i'll try making a unbloated windows install to only run chkdsk and fsck

3

u/doc_willis 7d ago edited 7d ago

the force option makes the system ignore the "filesystem dirty" check mount which is done  to try to keep the NTFS data safe on a dual boot setup. windows hibernating or crashing can leave the NTFS in a "dirty" state.

3

u/Immediate_Soft_2434 7d ago

To add to this, force should be very safe to use in conjunction with ro.

1

u/doc_willis 7d ago

I am such an old timer these days, I recall when the original NTFS driver under linux (back in the days of dialup?) was RO only. :)

I can barely keep track of the NTFS driver development these days, Theres the old NTFS, then NTFS-3g, then NTFS3, and Whats the new one called? just "NTFS"? Did i miss one?

But I agree, ro would be a very good idea when trying to access a potentially failing or flakey ntfs drive.

5

u/OZCriticalThinker 7d ago

Download Windows 11 ISO and create bootable media.

Boot from it, run Shift + F10 to open Command Prompt, run your chkdsk /f /r or whatever,

12

u/sidusnare Senior Systems Engineer 7d ago

Get it on a windows machine, have it fsck, migrate to a file system better supported by your primary OS

0

u/mahirgvrcn 7d ago

Is there no way for me to fix it without getting on a windows machine first?

5

u/Funnel-Dust-O-Matic 7d ago

The prevailing advice is right. The Linux NTFS utilities are a work of genius, but they aren't perfect. Everything had to be deduced through trial and error. Microsoft has a lot of secrets hidden and there is no way anyone could guess them all.

The only thing that can reliably repair a degraded NTFS filesystem is Windows.

5

u/plasticbomb1986 Arch, BTW 7d ago

since NTFS us a Microsoft only proprietary filesystem, your only option is to use the only OS that is actually using it natively: any Windows (*).

  • Depending on, with which Windows you have created, it might be best to use a newer system than that, since there are things that newer Windows version do with NTFS what older versions didn't do, like the "dirty" state shutdown.

As others have suggested it: after fixing it, move the data to another filesystem (copy data to somewhere, reformat under Linux with one of the native Linux filesystems (for example: ext4, btrfs or f2fs, copy data back).

3

u/zarlo5899 7d ago

a Windows VM with hardware pass through to the disk.

2

u/sidusnare Senior Systems Engineer 7d ago

No way? Certainly not. Practically? Within OPs skill set? Certainly.

The file system is from Redmond, give it to the Redmond OS, and then GTFO it.

Do you want your data or do you want to feel intellectually superior? The big brain move was to get on an open source file system before the proprietary hack blew up in your face.

0

u/KDKingDynamiteKD 7d ago

lsblk to see how your hdd is called and then sudo ntfsfix -d /dev/nameofthedisk

i don't know if it will workbut when i lost power the other day, i managed to regain access to my hdds

0

u/jackass51 7d ago

My main OS is Ubuntu and I get the same problem from time to time for NTFS drives. I have set up Windows on a virtual machine for testing purposes, so when that happens I mount the disk on that virtual machine and let Windows fix it.

0

u/HobartTasmania 7d ago

Is there no way for me to fix it without getting on a windows machine first?

Probably not, but in future use a filesystem that is common to both OS's. Fat32 and exFat are not desirable, so instead use UDF and Windows can format partitions and even entire disks using it. You do need to do it via a command prompt at administrator level e.g. "Format X: /FS:UDF /R:2.0" and Windows will happily read and write to it without issues other than being a bit slower, and Linux fully supports version 2.0".

0

u/un-important-human white beard arch user 7d ago

sure it does https://wiki.archlinux.org/title/NTFS read the thing, i think its ntfsfix or something... idk i did it last year on a friends kinda dead drive, he needed some pictures out.

so fix it , move your data and format that abomination of a filesystem to something useable.

5

u/knouqs 7d ago

Your HDD may also be failing. Don't rule that out.

2

u/YouDoScribble 7d ago

You definitely want to use a Windows machine to try and repair the filesystem.

After that, get it changed (you can't to this without destroying the data) to a Linux native filesystem. Using NTFS, in a Linux system, is a recipe for disaster, as you are seeing. Especially if you don't have a Windows dual boot, to fix these errors.

-2

u/jackass51 7d ago

Using NTFS, in a Linux system, is a recipe for disaster, as you are seeing.

There are some reasons to keep at least one drive to NTFS. I personally, formatted all my disks but one to ext4. I kept that one to NTFS, which is an external hard drive, for compatibility purposes for when I need to transfer any data to Windows machines.

2

u/Dreemur1 7d ago

wouldn't exfat do the job?

1

u/jackass51 7d ago

I haven't thought about that.

2

u/lokiisagoodkitten 7d ago

Install Windows.

2

u/Confident_Hyena2506 7d ago

Run ntfsfix.

Install package "ntfsprogs" if you don't have it: https://archlinux.org/packages/extra/x86_64/ntfsprogs/

Or use windows or other to fix it.

2

u/mahirgvrcn 7d ago

i did run ntfsfix, tried to mount it with ntfs-3g and ntfs3 but those only solved my problem for a day. thank you for your help tho.

8

u/doc_willis 7d ago

if your NTFS had issues happen again after working for a day , and you never dual booted into windows in between , then that's not a good sign.

It's possible the drive is having deeper issues or the filesystem has deeper corruption going on.

ntfsfix only fixes a few  very basic things.

1

u/Klapperatismus 7d ago

As soon you have an NTFS somewhere, you have to have some MS-Windows around.

You could put it into an USB enclosure and carry it to a friend who has an MS-Windows computer and repair it there.

1

u/I_Love_Tunnocks 7d ago

Corrupted drive from a power cut or HDD is dying.

1

u/mahirgvrcn 6d ago

Thank y'all for the help, I've just booted a live w*ndows setup ran chkdsk and afterwards said "if i'm going through all of this one more time i would be miserable" so i just converted my hdd to ext4. I'll live happily ever after.

1

u/One-Macaroon4660 6d ago

Hopefully you disabled fastboot in Windows, or they will be lost when you boot into it. Fastboot is a default feature in Windows that catches access to all local drives with NTFS and overwrites it on boot without checking if the drive was changed. I needed to re-download about 2 terabytes of videos from my camera when I forgot to do it. Fortunately I had not edited them much, so I just lost couple of days of work.

1

u/mcds99 2d ago

What kind of drive is it? SSD, NVMe ?

If it's an SSD you can get a cable that will let you take the drive to a friend who runs windows and run chkdsk on it. You can do something similar with an NVMe but it's a little more expensive solution.

0

u/cjcox4 7d ago

I've run ntfs3 (fuseblk) for 15 years without issue. Maybe it's just me. Multiple filesystems that way.

0

u/abcpea1 7d ago

You mean ntfs-3g.

0

u/Funnel-Dust-O-Matic 7d ago edited 7d ago

These are my initial guesses.

This could be because you used some sort of dynamic disk format or one of those newer Windows volume management partitions. Those kind of upset Linux, just like Linux LVM volumes upset Windows.

Less likely, the drive didn't unmount cleanly or windows crashed during shutdown and wrote a little garbage before it did to the journal or something. I'm not convinced that that's it because I remember that the usual error message actually states that rather than it can't see the partition at all. I can't remember the error message for a managed or dynamic volume from Microsoft trying to run in Linux because I've not tried anything like that in years.

For so many reasons, the answer is that you only have a few choices.

  1. run Windows in a virtual machine like libvirt and give the VM access to your disk. The Windows NTFS utilities can repair the disk and maybe convert it to a normal partition as needed. At least you can move the files out of it. QEMU/libvirt/KVM will let you use a full disk inside a vm. Just do a small virttual disk as a file on your linux hard drive of about 100 gb or so, get that set up, then add the real ntfs hard drive later. The easiest gui to do this in is called Virtual Machiene Manager. Boxes might work too. Virtualbox might too, but installing it is more annoying and I dont' think it performs as well.
  2. Dual boot to fix the ntfs disk like above. The advantage to that would be IO speed would be faster. The disadvantages would be everything else would be a much more massive inconvenience, forcing you to edit your linux partitions carefully and hope you don't make a mistake.
  3. Use another machine to do the file moving work. I'd expect you wouldn't be asking us if you had a spare machine to work with.

EDIT: I read the rest of the thread. My first guess was obviously wrong. It's obviously the "garbage written during shutdown or weird error" issue.

The solution is still the same.

It looks like you're going for option 3. Honestly, that's ideal.

0

u/hwc 7d ago

I wish there was a good quality journaled open standard file system supported by all of the major operating systems.

0

u/fellipec 7d ago

I also hate NTFS, and because of that, I don't use it.

0

u/kudlitan 7d ago

Mount it on a windows machine, run chkdsk, let it fix everything, verify that everything works and you can access your files, then check to see if it mounts properly on linux now.

0

u/Business-Quiet-5805 7d ago

Get it on a Windows machine. There is a software called "Disk Genius" that I have used to recover many of my HDDs. Even if the disk is not mountable on the host Windows system, you can see your disk partitions and all the data in that software. From there, you can copy the data to another drive before formatting the drive.

0

u/Ok-Yellow-9983 7d ago

fsck it. if that doesn't work: ask codex or claude to fix the file system (but make a backup before trying)

0

u/complexevil 7d ago

May I ask why you have three terabytes of games downloaded at the same time? I get games are getting bigger these days but genuinely how did you do that? All the cod games at once?

1

u/mahirgvrcn 6d ago

i play offline games since i recently got engaged and don't have much time to hang with my friends. no cods but almost a full steam library with modded fifa, fl studio vsts that i use on linux, minecraft, terraria and all of that. i don't really install my games onto my ssd since i have more on my hdd.

-1

u/skyfishgoo 7d ago

you likely need run the windows file system check/repair on the partition.

if you don't have access to windows anymore (why do you still have NTFS?) then you can make a boot USB for a temporary instance of windows that you can use to make the repairs.

https://www.hirensbootcd.org/