Unable to mount a Windows partition in write mode

13,129

The best answer is:

  1. Don't use ntfsfix in Ubuntu. It'll potentially corrupt your Windows installation.

  2. Boot Windows. Disable fast boot in the power control panel.

  3. Disable hibernation. In an admin command prompt window, type powercfg.exe -h off.

  4. run chkdsk on the drive in Windows

Now you should be able to mount it in Ubuntu.

To make the partition automount in Ubuntu, you need to modify /etc/fstab (sudo -H gedit /etc/fstab). Here's an example of what to add...

UUID=0C0F93CE58153D42 /media/username/Windows ntfs-3g defaults 0 0

replace my UUID with the UUID you find by using the sudo blkid command in terminal, and update the mount point with the correct info.

Cheers, Al

Share:
13,129

Related videos on Youtube

Nirmal Raj
Author by

Nirmal Raj

Updated on September 18, 2022

Comments

  • Nirmal Raj
    Nirmal Raj over 1 year

    I recently installed ubuntu(<12 hours) and I was able to mount my ntfs partitioned drives (orginally from Win 10)in ubuntu using this command

    sudo mount -t ntfs-3g -o ro /dev/sda3 /media/win
    

    When I try the same command with read permissions

    sudo mount -t ntfs-3g -o rw /dev/sda3 /media/win
    

    I get the following error

    The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda3': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.

    but I have shut down Windows 10 the normal way. What is the reason for this error and how can I solve it?

    Part 2:

    When mounting the drives in read only mode, I had to do that everytime I booted into the OS. Is there any way I can automate that(like create a shell script that will do the mounting for me and runs everytime the OS is booted).

    • Rinzwind
      Rinzwind over 7 years
      Sorry but you most likely did not shutdown properly.since that is what this notice means. Run chkdsk on it from windows. That might so it too.
    • Apologician
      Apologician over 7 years
      If you don't have access to Windows (for instance, if Windows is corrupted and doesn't boot). sudo ntfsfix /dev/sda3 is a Linux alternative that works in some cases. It fix common errors and force Windows to check NTFS.
    • Nirmal Raj
      Nirmal Raj over 7 years
      OK I will check it... the previous posts instruct me to use ntfsfix but I have read that I should not use ntfsfix command lightly as it can damage my data. What does it do exactly?
    • Apologician
      Apologician over 7 years
      Ntfsfix - it fix common erros and fource Wdinwos to check NTFS. By the way, as you can see from the Canonical document page under Bugs, it says there ar no know prlbems with ntfsfix. It also asks for an email to the development team if someone experiences problems. I have used it quiet a few times without problems.
    • Nirmal Raj
      Nirmal Raj over 7 years
      @L.D.James My windows is working fine. Are you suggesting to use ntfsfix only if it is corrupt? or will it apply to my case also?
    • Apologician
      Apologician over 7 years
      I made a mistake and clicked on Answer rather than comment. I deleted the answer. This is my response to your comment: You'd most likely get better mileage by using Windows, especially if the culprit is hibernation. The problem often happen with an abnormal shutdown such as power lost. If that is the case, there is a chance of having some data lost whether you check the system with Windows or Linux. I'd use Windows if it were convenient. But I wouldn't have a problem using Linux either.
    • TheWanderer
      TheWanderer over 7 years
      @NirmalRaj ntfsfix clears the hibernation data on your Windows partition. In Windows 8 and above, if Fast Boot is on, even shutting down won't work. However, sometimes even with Fast Boot off it still doesn't work. If you have a hibernated session that you want to keep, don't use it. Otherwise, it's fine.
  • TheWanderer
    TheWanderer over 7 years
    ntfsfix doesn't corrupt Windows, it only deletes hibernation data. If you have an important session hibernated, then you shouldn't use it, but otherwise there should be no problems.
  • Boris Hamanov
    Boris Hamanov over 7 years
    @Zacharee1 ntfsfix CAN corrupt Windows, in so far as the hibernation file contains the last known state of Windows... including the last file you may have edited, the last picture you may have loaded... and not written out to disk yet... along with OS changes... if you delete the hibernation file, those files may be gone when you go back to Windows, and any OS changes might not be done fully either. Cheers, Al
  • Boris Hamanov
    Boris Hamanov over 7 years
    @Zacharee1 I think we just said the same thing. Deleting the hibernation file will leave Windows in an unknown state. Windows won't be able to restore whatever it had in the hibernation file... whether it be temp data, or otherwise. Cheers, Al
  • TheWanderer
    TheWanderer over 7 years
    exactly. It seems I have a different definition of corruption. Corrupting my Windows installation would, in my mind, be making it not boot, accidentally deleting saved (not hibernated) data, or otherwise breaking something. Deleting hibernation is just like if you unplug your desktop while it's asleep.
  • Boris Hamanov
    Boris Hamanov over 7 years
    @Zacharee1 as touchy as Windows can be, I'd stay away from anything that can disturb it... in any way. My use of corruption might not have been the best choice of words... I like my last statement better... it leaves Windows in an unknown state. Cheers, Al
  • TheWanderer
    TheWanderer over 7 years
    I've never had issues using it, and since Windows has a tendency to break its and connected data drives, even without hibernation, I actually recommend the use of ntfsfix, as long as the potential risks are known.
  • fgblomqvist
    fgblomqvist about 5 years
    This answer did not lead to a writeable mount.
  • Boris Hamanov
    Boris Hamanov about 5 years
    @fgblomqvist There's no reason to down vote a 3 year old answer just because it didn't solve your specific problem. It solved the problem for the original question at the time. I added a step 4 that should fix your problem. Do it, and then please remove the down vote. Thanks.
  • fgblomqvist
    fgblomqvist about 5 years
    This provided more of an explanation: askubuntu.com/a/113746/173028
  • das Keks
    das Keks over 4 years
    I think there is no need to completely disable fast boot and hibernation. Just boot Windows and shut it down "normally" via cmd -> shutdown /s /t 0