385

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.

When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.

Here's my partition table, if any more data is needed please let me know.

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    20000767     9999360   83  Linux
/dev/sda2        20002814   478001151   228999169    5  Extended
/dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT
/dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris
/dev/sda5        20002816   478001151   228999168   83  Linux
1
  • Do you hibernate it or do you shutdown Windows before you see the error message? I have this problem too, but I am sure I shutdown Windows 8 Release Preview instead of hibernating it. What version of Windows do you use?
    – hgajshb
    Aug 26, 2012 at 7:22

23 Answers 23

430

A bug has been filed about the Nautilus dialog you are seeing as it recommends a potentially dangerous option that could result in data loss. Please do not run the command in this dialog unless you want to delete your saved Windows session and potentially lose unsaved work.

Explanation: Why Linux can't open hibernated Windows partitions:

You are seeing this error because you hibernated Windows instead of turning it off the normal way (in newer versions of Windows, hibernate might be the default option).

  • Hibernating saves the current state information to the hard disk and then powers down the computer.
  • Shutting down the computer closes all programs and ends all running processes before powering down the computer.

When you turn off Windows by hibernating it, you are essentially pausing the system and saving all of that information (into a big file called hiberfil.sys) This way when you resume from hibernation all of your applications and files will be exactly how you left them. It also sets a flag in hiberfil.sys to let other Operating Systems know that Windows is hibernated.

Making changes to your Windows (ntfs) partition while it is hibernated could be dangerous--it could cause Windows to not resume from hibernation or to crash after resuming. Because of this, the tool (ntfs-3g) that mounts (opens) the partition will not mount it in read-write mode if it sees a hibernation flag. As such, Nautilus, the default file browser, will not be able to automatically open this partition--hence the error message that you see--because it is trying to open it in read-write mode.

Workaround for all versions of Windows:

There are three ways to mount a hibernated Windows partition:

  1. Boot into Windows and power down the system by shutting it down completely. You may then boot back into Ubuntu and the partition will mount in read-write mode automatically when you open it in Nautilus. Note that the "Shut Down" option may not be the one displayed in your start menu by default. You may need to click the button next to it to see further options.

  2. Manually mount the filesystem in read only mode.

    • Check to see if you have a mount point (folder for mounting your partition in) for your Windows partition in the folder /media using this command:

      ls /media

    • If you don't see a folder for your Windows partition, you should create one with the following command:

      sudo mkdir /media/windows

    • Next, mount the partition in read-only mode onto this folder with this command:

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

      Note that you should change /media/windows if your mountpoint is called something else.

    • Now you will be able to view/open files on your Windows partition using any program in Ubuntu. However you will not be able to write to the partition or modify any files as it is in read only mode.
  3. If you need to mount the partition in read-write mode and are not able to or willing to boot into Windows and shut it down completely there is a third option. However, it is not included here because it completely deletes hiberfil.sys and will cause you to lose all unsaved information in the hibernated Windows programs. The following is a quotation from man ntfs-3g about the option that would be used to do this.

    remove_hiberfile
                  Unlike in case of  read-only  mount,  the  read-write  mount  is
                  denied  if  the  NTFS  volume is hibernated. One needs either to
                  resume Windows and shutdown it  properly,  or  use  this  option
                  which  will  remove  the  Windows hibernation file. Please note,
                  this means that the saved Windows  session  will  be  completely
                  lost. Use this option under your own responsibility.
    

Solution (only for Windows 8 and 10):

There is a new feature in Windows 8 called Fast Startup. If this feature is enabled (which it is by default), Windows 8 does not actually completely shutdown when you choose shutdown. Instead, it does a "hybrid shutdown". This is something like hibernating; it makes booting Windows 8 back up faster. So, you need to disable this feature to be able to shut it down properly, and be able to mount the Windows partitions. To do this, boot into your Windows 8 and:

Note: disabling Fast Startup will most likely make your Windows 8 take a longer time to boot. There are no "exact" numbers, but let's say that if it took you 10 seconds to boot into Windows 8, it will now take you 50 seconds after disabling this feature.

  1. Open Control Panel in the small icons view and click on Power Options. (see screenshot 1)
  2. Click on Choose what the power buttons do. (see screenshot 2)
  3. Click on Change settings that are currently unavailable. (see screenshot 3)
  4. Uncheck Turn on fast startup (recommended). (see screenshot 4)

Click on Save changes. Now, shutdown Windows 8 and boot back into Ubuntu.

If you still aren't able to mount without getting errors, you may need to turn off hibernation completely. Open an elevated Command Prompt (right click on the shortcut, click on “Run as Administrator”), and input:

powercfg /h off

Source: Fast Startup - Turn On or Off in Windows 8.

25
  • 11
    None of these works for me. The only I am able to mount Win 8 partition on ubuntu is to press "restart" in windows, then boot ubuntu. Aug 24, 2013 at 18:59
  • 3
    Hello, I change the seatings for windows 8.1 as you mention. But unfortunately i still have the error massage I had previously. please help me,
    – raz
    Apr 25, 2014 at 12:08
  • 3
    There is this link tuxera.com/community/ntfs-3g-manual/#fastrestart that could be useful --- it suggests issuing the command powercfg /h off on Windows.
    – Rmano
    May 8, 2014 at 18:06
  • 4
    I have the "fast boot" option disabled and I always boot to Fedora by rebooting windows yet it still says that "it's in an unsafe state" is there anything else to do?
    – arielnmz
    Dec 4, 2014 at 0:08
  • 3
    I am having the same exact problem as @arielnmz . I disabled "fast boot" according to the "Solution (only for Windows 8)", yet I still cannot mount it R/W in Ubuntu 14. I can mount it RO but not RW. Any idea why this works for others but not for me? Dec 30, 2014 at 4:16
170

EDIT: DOING THIS MIGHT HAVE DANGEROUS CONSEQUENCES and Windows might fail to boot or corrupt the filesystem upon booting.


Use ntfsfix in the terminal, even if you can't access Windows

sudo ntfsfix /dev/sdXY

where XY is the partition, e.g. a2 (/dev/sda2) or b1 (/dev/sdb1)

ntfsfix repairs some fundamental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Windows.

12
  • 7
    A little bit of explanation would be really nice :-) Certainly there is man page, but since you wrote it here, it would be good to further improve it but explaining what this command does.
    – Jendas
    Nov 17, 2014 at 11:16
  • 3
    I tried that but it stills returns "Windows is hibernated, refused to mount. Remount failed: Operation not permitted" Dec 4, 2014 at 16:30
  • 3
    Nice! this should be the chosen answer... Dec 12, 2014 at 14:36
  • 21
    You do NOT want to do this. Doing so will result in the filesystem being corrupted when you resume your hibernated windows session.
    – psusi
    Jan 4, 2015 at 4:24
  • 13
    I concur with @psusi: this is very dangerous and could result in all data lost like here
    – Fabby
    Aug 10, 2015 at 12:23
58

If you want to terminate the hibernated session, run this command in a Terminal(press Ctrl+Alt+T to open Terminal)

sudo ntfsfix /dev/sdXY

where XY is the partition. ex: sda2 or sdb1

This also works if you couldn't get into Win8.

3
  • 5
    I am not sure fixing an NTFS partition from Ubuntu is a good idea for a hibernating fast startup Windows 8.1. Instead, I solved the problem from within Windows 8.1: powercfg /h off Dec 31, 2014 at 0:29
  • 1
    I did this and got an error "Windows is hibernated, refused to mount. Remount failed: Operation not permitted" May 12, 2017 at 7:33
  • @BillTheApe but works, in my situation, I am not able to access my windows anymore.
    – ricoms
    Jul 18, 2020 at 16:51
21

It's because of Windows 8's fast startup feature.

Temporary solution would be to go back in Windows and restart the system (instead of shutdown). Permanent solution is to disable fast startup.

You can use this guide to disable fast startup in Windows 8: http://itsfoss.com/solve-ntfs-mount-problem-ubuntu-windows-8-dual-boot/

5
  • 3
    This was exactly what the problem was for me and doing a restart from windows to boot into linux rather than a shutdown is a great way to verify that this is the correct solution for you. The ntfsfix solution below did not work for me, whereas this one did.
    – sage88
    May 20, 2015 at 20:17
  • 2
    same issue on Windows 10 Mar 11, 2018 at 7:16
  • 1
    restarting windows instead of shuting-down solved problem also for me. ntfs-3g flag remove_hiberfile did not help.
    – bogec
    Apr 5, 2022 at 8:43
  • Did you actually look to see if the hibernation was removed?
    – Brian
    Sep 30, 2022 at 4:09
  • Thanks, restarting was good advice! I was trying to mount the disk in order to reset a forgotten password, so of course I can't change any Windows fast boot settings.
    – Rennex
    Dec 24, 2023 at 5:24
19

My solution was to call a mntwindows script in /etc/rc.local. This script would check for hibernation and if hibernated mount as read only. In order to make sure the script may always be called I placed it in /bin and marked it as executable. The contents of the script are as follows

sudo mount /dev/sda[Partition Number] /media/[Any existing folder name]

#Mounts Windows
if [ $? -eq 14 ]
then
  echo "Windows is sleeping, I'm mounting as read-only"
  sudo mount -o ro /dev/sda[Partition Number] /media/[Any existing folder name]
fi
2
  • Great solution. Many thanks. It worked for me on an ancient eMachines E442 which got accidentally trashed on shutdown. +1
    – Ian Lewis
    Jun 11, 2018 at 21:36
  • 2
    I believe there is no need to create a separate mounting script in /etc/rc.local. A single line in /etc/fstab did the trick for me: /dev/sdaX /media/[mount-folder] ntfs-3g nofail,nodev,errors=remount-ro 0 0. I initially assumed errors=remount-ro is what is automatically mounting the drive as readonly if Windows is hibernated. But it also works without that option as tested on Linux Kernel 5.3+ Jul 4, 2020 at 11:39
15

Windows 8 adds a "fast startup" feature. It does make Windows start up faster after a shutdown, but as a side effect it ends up putting your filesystem in that hibernating state.

To disable this feature in Win 8, search for "choose what the power buttons do" under settings, click the shield to unlock the checkboxes, and you can enable or disable the fast startup from there.

The caveat mentioned earlier, that you want to really shutdown Windows and not restart to get easy access from Linux, still applies.

1
  • I disabled "fast startup" in my Windows 8.1. It didn't help. I can only mount RO. This is weird. Dec 30, 2014 at 4:32
11

Just for completion, here is another command to mount a partition as read-only (useful for hibernated Windows partitions):

udisksctl mount --block-device /dev/sda3 --options ro

If you have permission to mount the partition using the file manager (if you are an administrator, for example), then you should be able to run this command without using sudo.

This is available in the newest Ubuntu versions (like 13.04 and 13.10).

If udisksctl isn't available, then maybe udisks is. It has different arguments, so check the manpage.

3
  • 1
    I Love this! :D
    – Jeggy
    Mar 29, 2014 at 13:52
  • 1
    This is a great solution if you don't want to start windows again.
    – Goddard
    May 13, 2016 at 17:03
  • Yes it works for me! My windows wasn't booting so this was the only way out :)
    – jonsno
    Jan 11, 2018 at 13:03
11

For windows 10, I figured out how to turn off the fast startup. Did one screencast to solve that. Go to Control Panel > Hardware and Sound > Power Options > System Settings Then click on 'Change Settings that are currently unavailable' and remove tick from 'Turn on fast startup'. Source : http://blog.shahariaazam.com/fast-startup-turn-on-or-off-in-windows-10

0
11

It has become even more simple (Windows 8+)

Just force shutdown or you can say complete shutdown your windows system before rebooting to Ubuntu OS.

Well how will I do that?

Very simple: Shift + Shutdown

i,e Hold Shift key while you click the Shutdown button in Windows to shutdown it completely.

Of course it will make your windows boot little slower next time. :)

10

on Windows 8 it's normal. You need to shut down Windows 8 via cmd by entering shutdown /f /s /t 0 then it might work.

5
  • 3
    I believe shutdown /s /t 0 is sufficient... no need to use force Aug 1, 2014 at 17:06
  • @Matt I tried shutdown /s /t 0. This doesn't work. This is despite me disabling fast boot prior to that. I can only mount that NTFS partition RO. Dec 30, 2014 at 4:24
  • @root shutdown /f /s /t 0 doesn't work either. Something must have changed in either Ubuntu 14.04 or Windows 8.1 since this answer was posted. Dec 30, 2014 at 4:30
  • 1
    @BillTheApe I continue to use this technique on Arch Linux which is a rolling release. I humbly suggest that your problem lies elsewhere Dec 30, 2014 at 16:06
  • 2
    @Matt You were right. The problem indeed lied elsewhere: disabling fast startup + shutdown /f /s /t 0 was sufficient for Windows 7. It is no longer sufficient for Windows 8.1. In addition to what's required for Windows 7, Windows 8.1 requires one more step: powercfg /h off Dec 31, 2014 at 0:27
10

For Windows 8+

You need to disable the "Fast Startup" feature. To quote the How-To-Geek:

Open up your power options by hitting Windows+X or right-clicking your Start menu and selecting Power Options. In the Power Options window, click “Choose what the power buttons do.”

enter image description here

If this is the first time you’ve messed with these settings, you’ll need click “Change settings that are currently unavailable” to make the Fast Startup option available for configuration.

enter image description here

Scroll to the bottom of the window and you should see “Turn on fast startup (recommended)"

enter image description here

Uncheck the "fast startup" box.

Then, shut down Windows 10, and you should be able to mount the NTFS partition from Ubuntu just fine.


How-To-Geek quotation taken from here.

4
  • This is pretty much what the section for Windows 8 and 10 in the accepted answer says.
    – muru
    Nov 30, 2016 at 1:43
  • @muru - shrugs this has screenshots Feb 7, 2017 at 22:06
  • shrugs meh, so does that answer - the numbers in the list are links to screenshots
    – muru
    Feb 7, 2017 at 22:41
  • In my dual-boot setting with Windows 11, the trick that did it for me was not only to disable the "fast startup", but also to uncheck the "Hibernate" box. It was necessary even though I did not actually hibernate windows.
    – fffred
    Nov 28, 2023 at 20:30
9

In my experience adempewolff's popular and helpful answer above was necessary, but not sufficient, to allow me to mount my Windows NTFS partition for writing with Ubuntu. As instructed elsewhere I turned Fast Startup off before trying to install Ubuntu and I removed the Hibernate Option on the "Shutdown" menu, too.

I still couldn't write to my Windows partition from Ubuntu.

I found I also had to boot Windows 8.1, start a Windows authorized command line (right click on the Windows button on the bottom left to get to this option easily), allow it through the Windows authorization box, and then enter the command:

powercfg /h off

You can check the results with:

powercfg /a

After making this change I was able to freely access the Windows 8.1 partition from Ubuntu, whether I quit Windows by shutting down or by restarting.


I found that I was able to later reverse this and still access the partition (but keeping Fast Startup unchecked at all times, as above, and never asking for Windows hibernation of course). The command to reverse it is, predictably:

powercfg /h on

I assume something was left over from Windows installation that needed to be cleared by booting with hibernation turned off in this particular way.

There should be no reason to undo the first step like this as far as I know--it may provide a bit of extra safety to leave powercfg /h off.

See the Ubuntu man page for the Windows NTFS handler for a bit more information.

1
  • I suspect that you would not have needed to mess with powercfg if you had not disabled manual hibernation, though I could be wrong ...
    – SamB
    Nov 5, 2014 at 15:51
8
  • Boot into Windows and then restart it. Don't shut down.

  • In the grub menu select "Ubuntu" and press Return. After the Ubuntu has booted up, open the NTFS partition. It should now open.

2
  • 4
    Note that this works even if you can't log in to Windows (e.g., due to a lost password). You can restart from the Windows Start Screen. May 15, 2014 at 4:11
  • And how do you mount this if this is a HDD from a dead windows device you just want to clean up then archive? Dec 21, 2018 at 23:38
5

You can mount it in read only mode For it, first you have to create a directory as mount point:

sudo mkdir /media/*youruser*/newdisk

Later, mount the drive with:

sudo mount -t "ntfs" -ro "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda4" "/media/*youruser*/newdisk"

Change words with *, with your user name. /dev/sda4 could be also different, depending on the partition is the one where windows 8 is installed.

Note the args values are taken for your particular error message, for other users take the error message, change -o by -ro and type appropriate user name.

Also, note, with this method, you cannot edit, write or create new files in the windows drive.

2

To add to the answer you can go into Windows 7 or Windows 8 (W8: this is the default power-off action, it isn't a true shutdown in a sense), open a command line with super user privileges and type powercfg -h off.

The caveat is now you Windows computer will not be able to Hibernate at all. However, you will be able to mount your Windows partitions without doing surgery on it.

2

It is more than likely that this is happening because you are booting from a Windows 8 system. What they have done is make it so that when you turn off your computer it really goes into hibernation for a quicker boot when you switch it on again.

What you will need to do is to go into the Control Panel section of Windows 8, navigate to power options and disable the quick start up option so that when you shut down, you will actually have shut down your system and as a result the files on the partition will be able to be accessed and edited.

2

In the end, I could solve it by following the recipe from the Arch Wiki:

  • Boot into Windows
  • As an administrator, run powercfg /h off
  • Shutdown Windows

I also changed /etc/fstab to a UUID to refer to the NTFS partition, after a first attempt failed, where I did not use the powercfg command but disabled it by clicking through the GUI. Not sure, why using a UUID should make any difference (in the Wiki, it is not explained further). But at least it is working again.


Source: Arch Wiki (NTFS-3G: Metadata kept in Windows cache, refused to mount):

The problem is due to a feature introduced in Windows 8 called "fast startup". When fast startup is enabled, part of the metadata of all mounted partitions are restored to the state they were at the previous closing down. As a consequence, changes made on Linux may be lost. This can happen to any NTFS partition when selecting "Shut down" or "Hibernate" under Windows 8 or 10. Leaving Windows by selecting "Restart", however, is apparently safe.

To enable writing to the partitions on other operating systems, be sure fast restart is disabled. This can be achieved by issuing as an administrator the command:

   powercfg /h off

You can check the current settings on Control Panel > Hardware and Sound > Power Options > System Setting > Choose what the power buttons do. The box Turn on fast startup should either be disabled or missing.

If you cannot mount your NTFS partition even when following this guide, try using the UUID instead of device name in /etc/fstab for all NTFS partitions. Here's an fstab example.

1

@abhishek ansvered correctly, I had not only ntfs mount problem, wifi didn't work after rebooting from Windows 8.1 to Ubuntu too. The best solution is to switch fast boot in Windows 8.1 off. Go to power management and press Choose what the power buttons do -> Change settings that are currently unavailable. Then look down the window, find a flag "Turn on fast startup (recommended)" and switch in off. Click Save changes, so now you wont have this problem!

1

I solved this (in Windows 10) by removing the hiberfil.sys by

powercfg /h off

then turn it back

powercfg /h on

I tried with the first answer and it worked, but - the problem came back after rebooting

1

Windows 10 and Windows 8 both act funny about shutting down. Delete the fast boot option in Windows and if using Windows ten, make sure you reinstall the home option, which looks like a house, from Windows 8.. Then use it to shut down, not restart, when you want to go into Linux, or the error will continue to pop up, and when in Linux you cannot access the one drive... Or more than one Windows drive on my system... As I have one drive I use for sharing files between Linux and Windows.

1

Well, this is a mess of a thread. To mount a NTFS partition ntfs-3g -o rw /dev/sdb1 /media/Windows or ntfs-3g -o ro /dev/sdb1 /media/Windows for read-only, if rw fails. Just make sure the device and mount point correspond to what you're using on you're system. It's not likely everyone who reads this will have their Windows NTFS partition on /dev/sdb1.

Turning off fast start in Windows 8 and up is a necessity for lasting effect. But a good one-off is to hold the power button until the machine shuts down. It won't hibernate then. You can also disable 'fast boot' in the bios/uefi, which sometimes helps.

After quite a few of the listed solutions, Windows must be shut down, rebooted, and shut down again for them to work. Other times, with Linux solutions, Linux must be shut down and rebooted for the method to work.

For instance sudo ntfs-3g -o remove_hiberfile /dev/sdb1 /path to mount point will remove the hibernation file preventing access to the NTFS volume, but afterward, the system should be shut down and rebooted, and THEN try to mount rw, as above, or with ,rw appended to the mount options in /etc/fstab for the NTFS volume.

If you want any file system to mount, regardless of what device the system gives it, which can change, you can find the UUID of the drive with ls -al /dev/disk/by-uuid which gives something like this:

marky12@linuxxx:~$ ls -al /dev/disk/by-uuid total 0 drwxr-xr-x 2 root root 200 Sep 28 23:32 . drwxr-xr-x 6 root root 120 Sep 28 23:32 .. lrwxrwxrwx 1 root root 10 Sep 28 23:34 171aadc8-f84e-4011-9a57-XXXXXXXXXXXX -> ../../sda1 lrwxrwxrwx 1 root root 10 Sep 28 23:34 1aa1b978-565d-4430-a92a-XXXXXXXXXXXX -> ../../sda3 lrwxrwxrwx 1 root root 10 Sep 28 23:34 2353a9b0-8847-4541-87d8-XXXXXXXXXXXX -> ../../sda6 lrwxrwxrwx 1 root root 10 Sep 28 23:34 5aaa6253-fe3a-43cd-81b1-XXXXXXXXXXXX -> ../../sda7 lrwxrwxrwx 1 root root 10 Sep 28 23:34 XXXXXXXXXXXX -> ../../sda2 lrwxrwxrwx 1 root root 10 Sep 28 23:34 7ac1b3cb-0a73-4f30-bea2-XXXXXXXXXXXX -> ../../sda4 lrwxrwxrwx 1 root root 10 Sep 28 23:34 ac1d849d-7aed-40c2-b1d9-XXXXXXXXXXXX -> ../../sda8 lrwxrwxrwx 1 root root 10 Sep 28 23:34 fb2d05ee-21f9-4139-a216-XXXXXXXXXXXX -> ../../sda5 t

The big long numbers are UUIDs. which the system won't change. You can use them in /etc/fstab like so

UUID=fb2d05ee-21f9-4139-a216-XXXXXXXXXXXX /media/drive ntfs defaults,user.auto,rw 0 0` Then, if you switch some drives around, and the device node changes from /dev/sdb1 to /dev/sdc1, the system will still know what drive you mean.

But if you make an identical image of a drive, it will have the same UUID. If you try to mount both on the same system, it won't work, even if you use device nodes, i.e. /dev/sdb1.

So, you have to use the mount option no-uuid for one of them, and then you can mount both.

So, my impression is that if we all take a deep breath and relax a bit before tackling mysterious computer problems, no one will rush right past the solution.

1

One of the latest windows dirty tricks courtesy of microsuck. It now keeps your data hostage by not cleanly unmounting its own filesystem and keeping journaling/paging data or whatever in a swap file, WHICH IS ON THE PARTITION. Go figure that one out.

There's a check box buried deep in the "control panel" to disable this, which is probably how they cover their asses in court if ever somenoe calls them out on this abuse, which clearly falls under the computer misuse act in most jurisdictions. I think you have to look for "what the power buttons do", then change another check box to enable changing those settings from the default, and a few other hoops iirc.

W**dows is a complete malware-infested malware joke excuse for an OS, no idea how m$ are tolerated by the legal system or why people even still use their garbage products after ~= 40 years of constant failure, abuse, plagiarism, and blatant disrespect even for their own users.

0

I solved my problem with

$ sudo apt-get install ntfs-config

and

$ sudo mount -o rw /dev/sdXY

replace the sdXY with your windows partition e.g. sda3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .