11

Is it possible to move a Windows hibernation file to a different drive?
For instance, if I have Windows installed on C:, I want its hibernate file be on D:.

I wanted to about hibernation file (hiberfil.sys), not the page file.

JDługosz
  • 296
  • 1
  • 7
Kamarey
  • 367
  • 3
  • 4
  • 10
  • 2
    How about an updated answer on how to move it in Windows 10? There’s a comment from @Jason below with a 404’ed link. – JDługosz Jan 25 '17 at 08:26

4 Answers4

17

Edit: Now I know how you got those pagefile-related answers! >smile<

Sorry, but you can't relocate the HIBERFIL.SYS file to any partition other than the boot partition. This is because it's needed very early in to boot process to resume from hiberation and the boot loader (NTLDR) code, needing to be compact and optimized, doesn't have the ability to load the HIBERFIL.SYS from an arbitrary location. (Think about how much code it would take to do that... accounting for reparse points, software RAID sets, the potential that another installable filesystem driver might be needed besides NTFS. Somebody had to draw the line somewhere... smile)

It would be nice if you could move it, but no such luck.

Here's what people consider the "definitive" Microsoft statement on this issue: http://technet.microsoft.com/en-us/magazine/2007.11.windowsconfidential.aspx

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328
  • @Evan: check out the revisions of this question: http://serverfault.com/revisions/34017/list – p.campbell Jun 30 '09 at 19:57
  • @pcampbell: Hahaha! That's excellent... I should revise my answer to talk about the pagefile! – Evan Anderson Jun 30 '09 at 20:03
  • I wouldn't say that NTLDR isn't "smart" its optimized to be to called before the real OS loads- thus has limitations – Jim B Jun 30 '09 at 22:19
  • @Jim: I was saying "smart" as in "it lacks the code". Wasn't making a value judgement about the quality of the code. Anthromophormizing code is probably a bad idea. – Evan Anderson Jun 30 '09 at 22:21
  • @Evan: Thanks for the answer. I understood this limitation, but if there is a hibernate file, that means there is also a Windows that created this file. So why this is a problem to get all required drivers from there, load them as regular and then process a hibernate file from another drive? – Kamarey Jul 01 '09 at 06:59
  • @Kamarey: Raymond Chen puts it better than I probably can in the article I linked. Basically, somebody had to design the limitations of the solution. The behaviour, as you see it, is how it ended up being designed and implemented. – Evan Anderson Jul 01 '09 at 11:45
  • 1
    To bad, I were looking for this as well as 16GB hibernate file on the SSD is quite much. Works perfectly fine in Unix-system though. – Hultner Jun 29 '11 at 11:37
  • Agreed with Hultner, on my 80GB SSD I've got an 18GB hibernate file and an 8GB winsxs folder. Have turned off the 24GB paging file. Otherwise half the drive was used with Windows7 fluff. – toxaq Feb 02 '12 at 04:32
  • Unfortunately MS dont want or cannot implement moving hiberfile to another drive, even if it is next simple partitioned local HDD or SSD. The same reason is with booting windows server using dynamic partition :( it depends on ...... luck :D – Znik Aug 07 '18 at 10:26
6

No it's not possible to move the hibernation file (hiberfil.sys). It must be on the system partition.

Joe Doyle
  • 1,681
  • 14
  • 15
3

If you are running Vista or later, the bcdedit can edit the hibernation file's location. I have moved it to another partition successfully.

Hallo
  • 31
  • 1
  • 5
    Instructions on how to accomplish this would have earned you a vote up. – boatcoder Jun 27 '12 at 19:42
  • Nevertheless, [he's right](http://imagizer.imageshack.us/a/img69/7044/rapidstart2.png). Most people reading this now are using 7/8 and are getting the wrong information. – Jason Aug 13 '14 at 01:10
  • @boatcoder Since Jason's URL expired, I tried VisualBCD and did it. Now to change the dump (write) path. I am trying to unlock the handle on a live system instead of disabling it first. – Mark C Dec 27 '21 at 05:33
  • Sym-link didn't work. Patch required. http://superuser.com/a/1082931/31491 – Mark C Dec 27 '21 at 09:08
2

No, hiberfil.sys cannot be moved. This file is accessed by ntldr which does not have this capability. But the problem is deeper than that. On the NT platform drive letter assignments are stored in the registry, which is not be available until much later in the boot process. When ntldr is about to read hiberfil.sys it doesn't even know the drive letter of the system partition, much less any others.

The pagefile can be moved. It is not needed until much later in the boot process when the registry and an almost complete file system is available.