21

I'm using Fedora 20 along with Windows 8. However, I'm unable to access the contents of the drive in which Windows 8 is installed. It shows:

Error mounting /dev/sda2/
The NTFS partition is in unsafe state
Windows is hibernated, refused to mount

even though I had shutdown the Windows properly.

| improve this question | |
  • 1
    WHO shows this error? How are you trying to access the drive? Are you sure you shutdown properly? Have you tried rebooting Windows and shitting it down again? – terdon Jan 5 '14 at 16:11
27

First, make sure you have cleanly shutdown windows and have not hibernated it.

According to the ntfs-3g manual, there is an option that allows you 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.

So, I stress that this will destroy any unsaved data that is in the hibernated Windows session. If that is not an issue for you, you should be able to access the drive by running:

sudo ntfs-3g -o remove_hiberfile /dev/sdXN /path/to/mount

Change sdXN to your windows partition (e.g. /dev/sda1) and /path/to/mount to the actual path you want to mount to.

That should mount the drive correctly and since it will delete the hibernated session file, it should mount normally from now on.

| improve this answer | |
  • 1
    +1 I highly discourage messing with Windows stuff from inside *nix, though. I once tried changing passwords and my installation got pretty much foobarred. – Joseph R. Jan 5 '14 at 18:13
  • 1
    Joseph R. - While it is generally a bad idea to try to mess with Windows configurations outside of the Windows GUIs (not just from *nix, but even by editing the files directly within Windows), Windows does occasionally botch sleep or hibernation mode that it can't recover itself from. In those instances, the only way to get it to boot again, or at least recover any data, is to remove the hibernation file and force Linux to mount it. – Shauna Apr 4 '14 at 13:24
18

Windows is hibernated, refused to mount

Chances are that Windows really is hibernated. Windows does this automatically when you tell it to shutdown normally. The benefit is that you get a faster apparent start-up time.

To shutdown Windows without hibernating, issue the following at a command-prompt (in Windows):

shutdown /s

You might also want include /t 0 for immediate shutdown.

I found a nice tutorial to set up a launcher for this: How to Do a Full Shutdown in Windows 8 Without Disabling Hybrid Boot.


The simpler approach to actually shutting down Windows is to 'restart' (rather than 'shutdown'), but then intercept the boot process and boot Linux instead of letting it boot Windows.

| improve this answer | |
6

You need to disable Windows Fast Startup because that creates a c:\hiberfil.sys file that causes this issue. Go to Power Options and uncheck "Turn on fast startup".

See https://www.eightforums.com/threads/fast-startup-turn-on-or-off-in-windows-8.6320/ for more details.

| improve this answer | |
2

I had the same problem. For me, the Windows GUI solution didn't work (for some reason it ignored the fast start-up and hibernate settings), and neither did shutdown /s /t 0, as suggested by some.

What worked for me: run the command powercfg /h off in a Windows command prompt that you opened as an administrator. This solution is specified in the ntfs-3g manual.

| improve this answer | |
1

Hold down shift when pressing Shutdown in Windows 10. This tells Windows not to hibernate like it usually does, but instead to shut-down cleanly. Once there you can mount the disk from your Linux distribution

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.