Debian

Fix Unable to Mount Windows NTFS Filesystem on Linux

When you dual-boot Windows and Linux, you will often hit a frustrating error trying to mount your Windows NTFS partition: “The NTFS partition is in an unsafe state” or “Windows is hibernated, refused to mount.” This happens because Windows Fast Startup (enabled by default since Windows 8) writes a hibernation file to the NTFS volume on shutdown, locking it against write access from other operating systems.

Original content from computingforgeeks.com - post 79

This guide covers how to fix NTFS mount failures on Linux caused by Windows hibernation and Fast Startup. You will learn how to disable Fast Startup in Windows, use ntfsfix to clear the hibernation flag, mount NTFS partitions read-write using both ntfs-3g and the newer kernel ntfs3 driver, and configure persistent auto-mounting through /etc/fstab. These steps work on Ubuntu, Debian, Fedora, Arch Linux, and other distributions.

Prerequisites

  • A Linux system dual-booting with Windows 10 or Windows 11
  • Root or sudo access on the Linux system
  • The ntfs-3g package installed (most distributions include it by default)
  • Access to the Windows installation for disabling Fast Startup (recommended permanent fix)

Step 1: Understand the NTFS Mount Error

When you try to mount a Windows NTFS partition on Linux after a normal Windows shutdown, you typically see one of these error messages. The exact wording varies between ntfs-3g and the kernel ntfs3 driver, but they all mean the same thing – the NTFS volume has a hibernation flag set.

With ntfs-3g, the error looks like this:

The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting).

With the kernel ntfs3 driver, you may see:

mount: /mnt/windows: wrong fs type, bad option, bad superblock on /dev/sda3,
       missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

Running dmesg after a failed mount with ntfs3 shows the real cause:

dmesg | tail -5

The kernel log reveals that Windows hibernation is preventing the mount:

ntfs3: sda3: Windows is hibernated, refused to mount.

The root cause is Windows Fast Startup. When you click “Shut down” in Windows, it does not perform a full shutdown. Instead, it logs off your user session but hibernates the kernel session, writing system memory to hiberfil.sys on the NTFS volume. This locks the filesystem metadata. Linux correctly refuses to mount it read-write because writing to a hibernated volume would corrupt it.

Step 2: Disable Windows Fast Startup (Permanent Fix)

The proper solution is to disable Fast Startup in Windows so that every shutdown is a full shutdown. This is the only fix that addresses the root cause – everything else is a workaround. According to Microsoft’s documentation on hibernation, Fast Startup combines a partial hibernate with a shutdown, which is why the NTFS volume stays locked.

Method 1: Disable through Power Options (GUI)

  • Open Control Panel and go to Hardware and Sound > Power Options
  • Click Choose what the power buttons do in the left sidebar
  • Click Change settings that are currently unavailable (requires admin rights)
  • Uncheck Turn on fast startup (recommended)
  • Click Save changes

Method 2: Disable through Command Prompt or PowerShell

Open an elevated Command Prompt or PowerShell window in Windows and run:

powercfg /hibernate off

This disables hibernation entirely, which also disables Fast Startup. After running this command, shut down Windows completely, then boot into Linux. Your NTFS partition will mount normally.

Method 3: Disable via Registry

Open Registry Editor (regedit) and navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power

Set the value of HiberbootEnabled to 0. This disables Fast Startup while keeping regular hibernation available if you need it.

After any of these methods, perform a full shutdown in Windows (not restart), then boot into Linux to verify the NTFS partition mounts without errors.

Step 3: Force Mount NTFS Read-Only as Temporary Fix

If you cannot access Windows right now but need to read files from the NTFS partition immediately, you can force a read-only mount. This is safe because you are not writing to the hibernated volume. First, identify your NTFS partition.

lsblk -f | grep ntfs

The output shows your NTFS partitions with their device paths and labels:

sda1  ntfs   System Reserved          5C2E7A2B2E79FE4A
sda3  ntfs   Windows                  3A8C6D1F8C6CD2B7

Mount the partition read-only using ntfs-3g:

sudo mkdir -p /mnt/windows
sudo mount -t ntfs-3g -o ro /dev/sda3 /mnt/windows

You can now browse and copy files from the Windows partition. This is a temporary measure – the partition remains read-only until you disable Fast Startup in Windows or clear the hibernation flag.

Step 4: Use ntfsfix to Clear the Hibernation Flag

If you do not have access to the Windows installation (for example, the Windows boot is broken), you can clear the hibernation flag from Linux using ntfsfix. This tool is part of the ntfs-3g package. Make sure the partition is unmounted before running this.

Install ntfs-3g if it is not already present. On Debian/Ubuntu:

sudo apt install ntfs-3g

On Fedora:

sudo dnf install ntfs-3g

On Arch Linux:

sudo pacman -S ntfs-3g

Unmount the NTFS partition if it is currently mounted, then run ntfsfix with the -d flag to clear the dirty bit:

sudo umount /dev/sda3
sudo ntfsfix -d /dev/sda3

A successful run shows the volume serial number and confirms the dirty bit has been cleared:

Mounting volume... Windows is hibernated, refused to mount.
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
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sda3 was processed successfully.

Warning: Using ntfsfix to clear the hibernation flag means Windows will not resume its hibernated session on next boot. Windows will detect the inconsistency and may run chkdsk automatically. This is generally safe but you will lose any unsaved state from the hibernated Windows session. The recommended approach is always to disable Fast Startup from within Windows (Step 2) and do a proper shutdown.

Step 5: Mount NTFS Read-Write with ntfs-3g or ntfs3

After clearing the hibernation flag or disabling Fast Startup, you can mount the NTFS partition with full read-write access. Linux offers two NTFS drivers – choose one based on your needs.

Option A: Mount with ntfs-3g (FUSE driver)

The ntfs-3g driver is the traditional FUSE-based NTFS driver. It is stable, well-tested, and works on all Linux distributions. Mount the partition with proper permissions:

sudo mount -t ntfs-3g /dev/sda3 /mnt/windows

To set ownership so your regular user can read and write files without sudo:

sudo mount -t ntfs-3g -o uid=1000,gid=1000,dmask=022,fmask=133 /dev/sda3 /mnt/windows

Replace 1000 with your actual user and group ID. Check your IDs with the id command.

Option B: Mount with ntfs3 (kernel driver)

Linux kernel 5.15 and later include the ntfs3 kernel driver, which provides native NTFS read-write support without FUSE. It offers better performance than ntfs-3g, especially for large file operations. If you are running a modern distribution like Ubuntu 24.04, Fedora, or Arch, you already have this driver available.

sudo mount -t ntfs3 /dev/sda3 /mnt/windows

With user permissions:

sudo mount -t ntfs3 -o uid=1000,gid=1000,iocharset=utf8 /dev/sda3 /mnt/windows

Verify the mount was successful and check that you have read-write access:

mount | grep /mnt/windows

The output confirms the filesystem type and mount options:

/dev/sda3 on /mnt/windows type ntfs3 (rw,relatime,uid=1000,gid=1000,iocharset=utf8)

Test write access by creating a test file:

touch /mnt/windows/test_from_linux.txt && echo "Write access confirmed" && rm /mnt/windows/test_from_linux.txt

Step 6: Configure NTFS Auto-Mount in /etc/fstab

To automatically mount your Windows NTFS partition every time Linux boots, add an entry to /etc/fstab. Using the partition UUID is more reliable than device paths like /dev/sda3, which can change if you add or remove drives.

First, get the UUID of your NTFS partition:

sudo blkid /dev/sda3

The output shows the UUID, label, and filesystem type:

/dev/sda3: LABEL="Windows" UUID="3A8C6D1F8C6CD2B7" TYPE="ntfs" PARTUUID="a1b2c3d4-05"

Create the mount point if it does not exist:

sudo mkdir -p /mnt/windows

Open /etc/fstab in your editor:

sudo vi /etc/fstab

Add one of the following lines at the end of the file, depending on which driver you prefer.

For ntfs-3g (FUSE driver):

UUID=3A8C6D1F8C6CD2B7  /mnt/windows  ntfs-3g  defaults,uid=1000,gid=1000,dmask=022,fmask=133,nofail  0  0

For ntfs3 (kernel driver):

UUID=3A8C6D1F8C6CD2B7  /mnt/windows  ntfs3  defaults,uid=1000,gid=1000,iocharset=utf8,nofail  0  0

The nofail option is important – it prevents your Linux system from failing to boot if the Windows partition is unavailable (for example, if you disconnect the drive). Replace the UUID with your actual value from the blkid output.

Test the fstab entry without rebooting:

sudo mount -a

Verify the partition mounted correctly:

df -h /mnt/windows

The output should show the NTFS partition with its size and available space:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       238G  120G  118G  51% /mnt/windows

Step 7: Troubleshoot Other NTFS Mount Errors

Beyond the hibernation issue, there are other common NTFS errors that prevent mounting. Here are the most frequent ones and how to resolve them.

Dirty log file – needs chkdsk

If you see “The NTFS partition has a dirty log file” or “$LogFile indicates unclean shutdown”, the NTFS journal has pending transactions. Clear the journal with ntfsfix:

sudo ntfsfix /dev/sda3

This resets the journal and clears the dirty flag. If the error persists, boot into Windows and let it run chkdsk automatically, or run it manually from an elevated Command Prompt:

chkdsk C: /f

Metadata kept in Windows cache

The message “Metadata kept in Windows cache, refused to mount” is specifically caused by Fast Startup. Even if you think you shut down Windows fully, Fast Startup may still be enabled. The quickest workaround without accessing Windows settings is to hold Shift while clicking Shut Down in Windows – this forces a full shutdown regardless of Fast Startup settings.

Mount fails after Windows update

Windows updates sometimes re-enable Fast Startup even if you previously disabled it. If your NTFS mount suddenly stops working after a Windows update, check the Fast Startup setting again (Step 2). Using the registry method or the powercfg command tends to be more persistent across updates than the GUI toggle.

Permission denied on mounted NTFS files

If the partition mounts but you cannot write to it as a regular user, the issue is mount permissions. NTFS does not support Linux-native file permissions, so ownership must be set at mount time. Re-mount with explicit uid and gid options as shown in Step 5. You can also use windows_names option with ntfs3 to prevent creating files with names that Windows cannot handle, which is useful for shared partitions used by both operating systems.

NTFS volume is compressed or encrypted

If Windows has NTFS compression or BitLocker encryption enabled on the volume, Linux drivers may not mount it. The ntfs-3g driver supports NTFS-compressed files but not BitLocker. For BitLocker volumes, you need dislocker to decrypt the partition first. If you are managing disk encryption on Linux, LUKS with cryptsetup is the standard approach.

Conclusion

The NTFS mount failure in dual-boot setups is almost always caused by Windows Fast Startup hibernating the filesystem. Disabling Fast Startup in Windows is the permanent fix – do that first. For situations where you cannot access Windows, ntfsfix -d clears the hibernation flag from Linux. Once the volume is clean, mount it read-write with either ntfs-3g or the faster kernel ntfs3 driver, and set up /etc/fstab for automatic mounting at boot.

For dual-boot systems, consider keeping a partition management tool handy and always verify your partition layout with lsblk or fdisk -l before making changes. If you share files between Windows and Linux regularly, a dedicated exFAT or ext4 data partition avoids NTFS headaches entirely.

Related Articles

Debian Install pip on Debian 13/12 and Use Virtual Environments Ubuntu How To Install Erlang on Ubuntu 22.04|20.04|18.04 Docker Install Docker and Compose on Debian 12/11/10 Ubuntu Fix mkvirtualenv command not found on Ubuntu

1 thought on “Fix Unable to Mount Windows NTFS Filesystem on Linux”

Leave a Comment

Press ESC to close