Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
    
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? –  yanglifu90 Aug 26 '12 at 7:22

10 Answers 10

up vote 63 down vote accepted

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.

Solution: Windows 7 and older

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: Windows 8

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.
2. Click on Choose what the power buttons do.
3. Click on Change settings that are currently unavailable.
4. Uncheck Turn on fast startup (recommended).
Click on the numbers above to see screenshots.

Click on Save changes. Now, shutdown Windows 8 and boot back into Ubuntu. You'll be able to mount without getting errors.

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

share|improve this answer
2  
I'd like to add that there is yet another way to generate this error with Windows 8. Thanks to the new hybrid shutdown option (which also happens to be the default), the only way for an ordinary user to access the primary Windows partition is to boot Windows and then restart the system - forcing Windows to perform a full shutdown. –  Nathan Osman Feb 12 '13 at 19:04
1  
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. –  arkilus Aug 24 '13 at 18:59
1  
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, –  rashed azad Apr 25 at 12:08
    
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 at 18:06
    
Worked on Windows 8.1. Thanks. :) –  bludger May 11 at 5:08

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.

share|improve this answer

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.

share|improve this answer
1  
Man this totally saved my ass. I couldn't get into Win8, so this was the only solution for me. Thanks a lot –  MNVOH Aug 19 at 8:54

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
share|improve this answer

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.

share|improve this answer
    
I believe shutdown /s /t 0 is sufficient... no need to use force –  Matt Aug 1 at 17:06
  • Boot into windows os and then restart it.(not shutdown).

  • In the grub menu select ubuntu and boot it.After the ubuntu booted up,now open the ntfs hard drive partition,it will open.

share|improve this answer
1  
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. –  Dave Burton May 15 at 4:11

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
    
I Love this! :D –  Jeggy Mar 29 at 13:52

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.

share|improve this answer

protected by Community Oct 24 '13 at 5:27

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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