5

I use Ubuntu 16.04 and Windows 10 in a dual boot mode. I need to share data between them, so I decided to keep the data on the Windows partition and let Ubuntu access it.

I know the old trick to disable hibernation and fast startup in Windows 10, so I did that. Still, Ubuntu couldn't mount the partition because it was hibernated. If I remember correctly, hibernated partitions used to be mounted as read only. So this is weird...

Further more, I attempted to reboot Windows in order to perform a real shut down and not hibernation, followed by booting into Ubuntu.

The same error message appeared and the partition wasn't mounted. Just to clarify further more, I tried auto mounting, as well as manual mounting the partition.

The same problem was replicated on a dual boot with Windows 10 and Debian 9.

I use m.2 pcie SSD and UEFI mode.

Here you can find couple of screenshots:

I have seen a similar question here: Can't access Windows drive: “Windows is hibernated, refused to mount”

It was suggested to just remove the hibernation file, but I am quite sure that I did a proper shut down and that no hibernation file should be there...

What is a worst case scenario when I delete this hibernation file?

EDIT: I also tried shutting Windows down with shutdown /s /t 0, but that also didn't help.

All help is Welcome!

2
  • Disable fast startup in Windows windowscentral.com/how-disable-windows-10-fast-startup then shutdown, not reboot. The drive should now be accessible. That doesn't mean you should write to it from outside Windows, you definitely shouldn't. If you need to share files between OSes then create a separate NTFS (data) partition for that purpose.
    – user252181
    Mar 23, 2018 at 1:51
  • 1
    Haven't you seen that I already disabled the the fast startup in Windows 10?
    – Leta
    Mar 23, 2018 at 6:44

2 Answers 2

5

It turns out, hibernation file was created by Windows before I turned off the fast startup option.

Because the fast startup option was turned off, the file was never destroyed.

The solution was to turn the fast startup on and do a reboot. After the reboot, the fast startup was turned off again.

Now everything works!

2
  • 4
    Interesting! I wonder if powercfg /h off also deletes the hiberfile, but the GUI didn't. Because I bookmarked a similar-looking question: unix.stackexchange.com/questions/205984/…
    – sourcejedi
    Mar 23, 2018 at 8:20
  • 1
    I'm here to tell you that the powercfg /h off command line is what deletes the hiberfil.sys file. The option for disabling "fast startup" from Control Panel (GUI) does not do that. So the command line is not "also" what deletes the file, it's the only thing (as far as I'm aware of) that deletes the file. It is necessary to have the file deleted in order to access the Windows boot/system partition. This could potentially be done manually as well, but I have not tested this.
    – Samir
    Jul 29, 2021 at 8:09
2

Delete hiberfil.sys by disabling hibernation and get write access

Given a choice between running the powercfg /h off command and unchecking the option "Turn on fast startup" in "Control Panel\Hardware and Sound\Power Options\System Settings", the command line method will do what you expect: delete ("destroy") the hiberfil.sys.

  1. Go to C:\ or wherever you have Windows installed.
  2. Make sure hiberfil.sys is present.
  3. Open a command prompt with admin rights.
  4. Run powercfg /h off.
  5. Make sure hiberfil.sys is deleted.
  6. Reboot your PC and boot into your GNU/Linux system.

This will give you write access to the Windows boot/system partition under Linux, regardless if you're dual booting or running a Linux live system from a USB flash drive for example. I was doing the latter with Ubuntu 20.04 LTS and ran into the write access issue.

The section below is added to explain the effects of disabling "fast startup". It can be safely ignored.


Disable fast startup and get slower startup times

Using the Control Panel option to disable "fast startup" will not delete the hiberfil.sys file. It only slows down your startup time. The dialog message clearly describes what fast startup does: "This helps start your PC faster after shutdown."

I was curious to see how much faster the startup or bootup time is if I leave the "fast startup" option enabled, or how much slower it is if I decide to disable it. So I timed it with a stopwatch, starting off from a complete shutdown and then starting the stopwatch from the moment I press the power button on the PC and stopping it the moment I see the Windows desktop. The password was disabled for the account so that it would sign me in automatically without delay. I took five measurements with fast startup enabled and five more with fast startup disabled. These are the results.

Fast startup disabled
hiberfil.sys is present
24.54 s
24.75 s
24.29 s
24.25 s
24.36 s
Avg: 24.438 s

Fast startup enabled
hiberfil.sys is present
20.00 s
19.57 s
19.55 s
19.83 s
19.69 s
Avg: 19.728 s

The penalty for disabling fast startup is less than 5 seconds, and it does not solve the original problem with partition write access. Running the Power Configuration command line however does solve the problem, because it effectively deletes the hiberfil.sys file.

Tested using Windows 10 version 21H1 (build 19043.1110) running on Intel Z370 platform with Core i7 8700 and Samsung 970 EVO Plus M.2 SSD. The Asus "Fast Boot" feature was enabled at all times. System firmware was set to operate in UEFI mode with CSM enabled for better hardware compatibility (default setting).

You must log in to answer this question.

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