ntfs partition does not mount with linux 6.8 and CONFIG_BLK_DEV_WRITE_MOUNTED=n

Bug #2062972 reported by Chris Balabanis
148
This bug affects 28 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
ntfs-3g (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am using Ubuntu 24.04 Development Branch (Beta). I am dualbooting it with Windows 11. When I try to mount my NTFS Windows partition via the Ubuntu Dock, I get: "Error mounting /dev/nvme01np3 at /media/chris(my username)/Windows:wrong fs type, bad option, bad superblock on /dev/nvme01np3, missing codepageor helper program, or other error".

Output of sudo apt-cache policy ntfs-3g: ntfs-3g:
  Installed: 1:2022.10.3-1.2ubuntu3
  Candidate: 1:2022.10.3-1.2ubuntu3
  Version table:
 *** 1:2022.10.3-1.2ubuntu3 500
        500 http://gr.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: ntfs-3g 1:2022.10.3-1.2ubuntu3
ProcVersionSignature: Ubuntu 6.8.0-28.28-generic 6.8.1
Uname: Linux 6.8.0-28-generic x86_64
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sat Apr 20 18:25:55 2024
InstallationDate: Installed on 2024-04-20 (0 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Beta amd64 (20240410.2)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: ntfs-3g
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Chris Balabanis (chris0nlinux) wrote :
Revision history for this message
Jean-Pierre (jean-pierre-andre) wrote :

First of all, please show you are using ntfs-3g. In your syslog, you
should have something like :

Cmdline options: rw,permissions,umask=0022
Mount options: allow_other,default_permissions,subtype=ntfs-3g,rw,fsname= [...]

Are these followed by other errors ?

Then, problems have been reported when using kernel 6.8.x when mounting from fstab,
and a kernel issue is suspected, see :

https://github.com/tuxera/ntfs-3g/issues/108

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ntfs-3g (Ubuntu):
status: New → Confirmed
Revision history for this message
N (sunnybubblegum) wrote :

I've been experiencing a similar issue since performing a fresh install of Ubuntu 24.04 LTS yesterday. While my external NTFS USB hard drive is recognized upon plugging it in, trying to mount it or access its contents gives me the 'wrong fs type, bad option, bad superblock' error.

I was able to get the external hard drive to mount via Terminal with the help of an article...
https://linovox.com/how-to-fix-failed-to-mount-wrong-fs-type-bad-option-bad-superblock-on-linux/
...however, its files are only accessible by navigating to my newly created /mnt/Media folder.

The drive is not visible in Nautilus, but I can see it in the Disks app (which is also how I unmount it). I get an error when trying to access its contents with the Steam app, specifically when I attempt to use the Restore Game Backup feature.

My external hard drive had been working fine with Ubuntu 22.04 a few hours earlier, and running a disk check said it was healthy.

Revision history for this message
thiago (tsoeiro88) wrote :

Fresh Ubuntu 24.04 install here.
Tried to mount my NFTS partition and I get the same error attached.

Revision history for this message
Jean-Pierre (jean-pierre-andre) wrote :
summary: - ntfs partition does not mount
+ ntfs partition does not mount with linux 6.8 and
+ CONFIG_BLK_DEV_WRITE_MOUNTED=n
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Pranav Dalvi (pranavd) wrote (last edit ):

If you are mounting drive by referring to
https://linovox.com/how-to-fix-failed-to-mount-wrong-fs-type-bad-option-bad-superblock-on-linux/
Then mount the drive in /media/ dir to be able to detect the drive in Nautilus.

Revision history for this message
Matthias (msiewert) wrote :

sudo ntfsfix -d /dev/sda1

fixed this temporarily on my USB key until I plug it in again

Revision history for this message
Olivier in Belgium (tousavelo) wrote (last edit ):

Observed similar symptoms on Ubuntu 24.04 on a NTFS partition on a USB SSD. (wrong fs type, bad option, bad superblock on /dev/XXXXXXXX, missing codepageor helper program, or other error).

I'm not too sure if I should report in this item or in https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/2063985

The partition is not a Windows system partition. It "merely" has data.

The partition mounted without issue with Ubuntu 22.04 on the same laptop; and still mounts without issue on another Ubuntu 22.04 laptop.

After sudo ntfsfix -d /dev/sdb5, with 24.04, the partition appear as mounted in Disks. And files can be accessed in Files/Nautilus.

sudo ntfsfix -d /dev/sdb5
[sudo] password for XXXXXXX:
Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdb5 was processed successfully.

Still OK after I "safely removed drive" and reconnected.
Not tested after a reboot.
Good luck.

sudo apt-cache policy ntfs-3g
[sudo] password for XXXXXXXX:
ntfs-3g:
  Installed: 1:2022.10.3-1.2ubuntu3
  Candidate: 1:2022.10.3-1.2ubuntu3
  Version table:
 *** 1:2022.10.3-1.2ubuntu3 500
        500 http://be.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status

UPDATE:
Similar symptoms, and solution/workaround with ntfsfix for another drive. This one from Lacie, also NTFS.
sudo ntfsfix -d /dev/sdc1
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/sdc1 was processed successfully.

Revision history for this message
Avinash (avinash-manoli) wrote :

I had the same problem. I dual boot Ubuntu 24.04 and Windows 11. The issue was resolved for me by disabling fast startup in Windows 11

https://support.lenovo.com/us/en/solutions/ht513773-how-to-enable-or-disable-fast-startup-on-windows-11

The fast start up option which is enabled by default on Windows 11 hibernates the system instead of shutting it down which seems to be causing this problem when trying to access the NTFS partition from Ubuntu.

Revision history for this message
Fazekas, Lajos (superskyhawk) wrote :

I ran into the same issue on:

Linux Lenovo-ThinkPad-X13-Gen-1 6.8.0-36-generic #36-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 10 10:49:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Finally I found a resolution after reading this article:
https://wiki.archlinux.org/title/NTFS#Unable_to_mount_with_ntfs3_with_partition_marked_dirty

Steps to resolve the problem:

Under linux:
sudo ntfsfix --clear-dirty /dev/_yourdiskAndPartition_here_

Rebooted into Windows 11, then command line with administrator rights:
chkdsk c: /f /r

Booted win11, checkdisk done and issues resolved.

Rebooted to Ubuntu, then mounting was fine.

Revision history for this message
Charles Faulkner (deadofnight) wrote :

This affects me too, just finished the upgrade to 24.04 manually (I'm on Kubuntu), and on first reboot into new system, I saw my external SATA pop up in Dolphin, but I got an error when I tried to mount it, the same one which Chris received, as a warning in the top portion of Dolphin.

After following Matthias' ntfsfix solution, I now have the disk mounted and accessible. Anyone have any ideas where this has broken, or is it too soon to be asking? :)

Revision history for this message
nmaxx (nmaxx) wrote (last edit ):

Until this is fixed properly, would it be an option for Ubuntu to revert to the 6.7 behavior by building the kernel with CONFIG_BLK_DEV_WRITE_MOUNTED=y instead?
Once 6.8 hits the HWE channel this will also break NTFS in many 22.04 installs eventually...

Revision history for this message
nmaxx (nmaxx) wrote :

After being able to reproduce the issue in a Linux Mint 22 VM I tried the kernel boot override mentioned at https://www.kernelconfig.io/config_blk_dev_write_mounted (bdev_allow_write_mounted=y).
That unfortunately did not have any effect. :(

Revision history for this message
nmaxx (nmaxx) wrote :

I did some more digging and found out the NTFS partition was actually mounted via the ntfs3 kernel driver, as shown by the output of "mount":

/dev/sdb1 on /media/me/NTFS4GB type ntfs3 (rw,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,uhelper=udisks2)

After blacklisting the ntfs3 module, the next mount attempt showed the fuseblk type, so that would mean ntfs-3g, which is fuse-based:

/dev/sdb1 on /media/me/NTFS4GB type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)

So maybe bdev_allow_write_mounted=y simply appeared to have no effect because the wrong driver was being used all along and the partition actually had a different issue.

Revision history for this message
Pavel (pavel-pokorny) wrote (last edit ):

The same problem in Ubuntu 24.04.1
Details:
- clean install of Ubuntu 24.04.1 (no dual boot, no other OS)
- external hard drive with NTFS
I plug in the USB cable and I get the error message: "error mounting /dev/sdb1".

If I plug the cable to a machine with Ubuntu 22.04.4 it mounts O.K.
USB flash drive with W95 FAT32 mounts O.K., so does an external disk with exFAT.

Any help please?
Pavel

Revision history for this message
Morbius1 (morbius1) wrote :

Do what nmaxx above did and blacklist the ntfs3 driver from running:

echo 'blacklist ntfs3' | sudo tee /etc/modprobe.d/disable-ntfs3.conf

Then reboot the box.

That will force the file manager to use the ntfs-3g driver like it did in Ubuntu 22.04

Revision history for this message
Rock Bollinger (rockb) wrote :

I had the same error accessing NTFS partitions with a fresh install of Kubuntu 24.10. Fast Boot (hibernation) was already disabled in Windows 11.

I followed Morbius1's advice above and this fixed the issue. I can now view NTFS volumes no problem.

So the issue does seem to be with the ntfs3 driver (for me anyway).

Revision history for this message
Ben Merwe (ben136) wrote :

I am using Linux kernel 6.8.0-47-generic and when trying to mount clean ntfs drives, I also get "wrong fs type, bad option, bad superblock". Morbius1's solution:

echo 'blacklist ntfs3' | sudo tee /etc/modprobe.d/disable-ntfs3.conf

And a reboot worked for me as well. Thank you Morbius.

Revision history for this message
Ben Merwe (ben136) wrote :

So can we log this somewhere for the ntfs developers as bug?

Revision history for this message
Ben Merwe (ben136) wrote :

Based on google, the ntfs driver is now the kernel default, but it provides read only access only, its web page says the people supporting it are part time only, there are reports about file system corruption, a notice about linux 6.9 maybe dropping it.

Maybe ubunutu should just blacklist ntfs by default?

ntfs-3g works fine. Maybe not quite as fast, but it works and I certainly want the option of read and write access.

Revision history for this message
PJW (peter-isoc) wrote :

It took me quite some time to find this page.
Morbius1/Nmax solution worked like a charm.
Thanks a million!!

------------------------------------

History :
Instead of doing a fresh install I clicked the upgrade-button for the upgrade from Kubuntu 22.04 to 24.04.
One of the several bugs I encountered was no longer being able to access my external hard drives.
Using a Start up Disk to access the HDDs did not work either.

Error message in all cases : Error mounting /dev/sda1 at /media/{username}/Seagate Expansion Drive: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error

These NTFS-HDDs were however still accessible on my laptop under Kubuntu 22.04. So 24.04 had to be the culprit.

FYI :
Operating System: Kubuntu 24.04
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.8.0-48-generic (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060/PCIe/SSE2
Product Name: B550 Extreme4

Revision history for this message
Joachim R. (jro) wrote :

Mounting NTFS volume using
mount -t ntfs /dev/sdxx /mnt/targetdir
is working perfectly, only mounting in GNOME file explorer is raising the error.

Revision history for this message
Hugo Ferreira (hmf) wrote :

None on the "ntfsfix" commands worked. Forcing a reinstall of ntfs-3g as suggested elsehwre also did not work. Manually mounting worked. Blacklisting "ntfs3" now allows auto-mounting.

@nmaxx and @morbius1: thank you for the solution.

My set-up:

~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble

~$ uname -a
Linux gandalf 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Michael Werle (lemmurg) wrote :

Can't believe this is still an issue 8 months after the first report and people still need to search for a manual solution/workaround. Just blacklist the `ntfs3` module already!

Btw, no need to reboot (this is not Windows!) after disabling the module, simply:

```
rmmod ntfs3
```

and then dolphin can automount the NTFS disks..

Revision history for this message
Sasha Vatamanyuk (sashanjh) wrote (last edit ):

For me works next solution:
just go to default app Disks,on left select disk that can't mount then select NTFS partition and click gear for settings: There - change parameters for mounting - disable default switcher - manually write mounting point (I just add "media" after slash(in result:"/mnt/media") - everything works like charm.

Revision history for this message
Morbius1 (morbius1) wrote :

Using the app "Disks" to correct for this problem is a non sequitur to this issue.

"Disks" by default does not use ntfs3 it uses ntfs-3g.

This issue isn't associated with ntfs-3g. Only with ntfs3.

Revision history for this message
Sasha Vatamanyuk (sashanjh) wrote :

I've figured out this issue by disabling fast start in windows 11.

Revision history for this message
lesliek (lesliek) wrote :

I just came across this. I'm using Ubuntu 24.04.2 with kernel 6.11.0-17-generic. I see that I have the latest version of ntfs-3g installed. I can't access my Windows partition from Ubuntu, like I could when using Ubuntu 20.04 on my old laptop. I see the suggestion to run the command "echo 'blacklist ntfs3' | sudo tee /etc/modprobe.d/disable-ntfs3.conf". Is this still a solution? I don't know whether that will still work with my later kernel and, not really understanding these things, am afraid to cause myself more problems.

Revision history for this message
lesliek (lesliek) wrote :

I hope that this is a correct answer to my own question. I answer it in case it helps someone else. On another site, I found someone saying, 'some people found a permanent solution by going to Disks, selecting "edit mount options" and turning off "User Session Defaults"'. I tried that and was able to mount my Windows partition for the first time. I haven't yet tried it after shutting down and restarting.

Revision history for this message
malangaman (cahevia) wrote :

I went angry nuts for hours about this. Turning off fast start in Windows 11 and shutting is down, did us no good.

But finally, this worked in terminal:

echo 'blacklist ntfs3' | sudo tee /etc/modprobe.d/disable-ntfs3.conf

And a reboot worked for me as well.
Thank you Morbius.

Juerg Haefliger (juergh)
tags: added: kernel-daily-bug
Revision history for this message
Jérôme Brenier (jbre) wrote :

This bug is present on Ubuntu 25.04 and the Morbius (thanks) fix is still valid.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.