Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Recently I installed Ubuntu 12.04.1 LTS on my Lenovo Y480. Hibernation was working properly after the Ubuntu install, but I was making sure all of the operating systems on my system worked, including OneKey Recovery (recovery partition). It is of note that I installed Windows 7 from scratch with a disk image I downloaded off of my university's DreamSpark program, and further to that I had to image the partition with Paragon Backup & Recovery, repartition to convert the Windows partition to extended, install Ubuntu, and then restore the image. During that process I also used the Windows disc to edit the BCD as to reuse the existing entry for the restored partition. I also used the automated "repair your computer" option.

With verification, I noticed that the "repair your computer" option actually wrote to the wrong BCD (the recovery partition), and I mounted the partition and restored the original BCD (from a copy I made earlier), and rebooted. At this point my GRUB broke, and I was able to restore it. At this point hibernation broke.

I tried powercfg /h off and powercfg /h on, rebooted, and nothing. Also tried increasing the hibernation file size as directed on this post, but it still doesn't work. Executing shutdown /h yields The system cannot find the file specified.(2). What file?

It seems that mounting the system partition sometimes works, but I don't want to keep it mounted in case it gets written to accidentally. How do I permanently fix this?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Short answer: If you added and removed drive letters to the system partition with Disk Management, Windows will not remount the partition at next reboot. The system partition is required because it contains the BCD, and the BCD needs to be written to so the system can successfully resume from hibernate. If the partition is not mounted, the BCD can't be written to, and hibernation will fail.

How to fix it:

  1. Open regedit, and navigate to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
  2. Look for names that has a pattern of #{guid}, and delete all of them. Devices that you have specifically unmounted will show up again on reboot.
  3. Close regedit, and open up an escalated Command Prompt.
  4. Execute mountvol /E to allow automount (so that the system partition will be automatically mounted but not assigned a letter).
  5. Reboot, and test.

If it still doesn't work, set your system partition as Active (boot). And of course, make sure hibernation is enabled, and hybrid sleep is off.

Longer answer (the process): It turns out mounting and unmounting the system partition is the culprit. Windows will "blacklist" the volume so that it will not remount on boot. I realized this when I thought about how hibernation would work only if the system partition was mounted. I installed another copy of Windows 7 on the same drive before I came to that conclusion, thinking it had something to do with Windows being a logical volume. For good measures, I checked bcdedit and it was able to pull up the BCD config. Booted back to my original installation, and it failed to find a file. (Hmm... failed to find a file here, failed to find a file during hibernation...) A check with mountvol revealed the problem: It told me *** NOT MOUNTED UNTIL A VOLUME MOUNT POINT IS CREATED ***. Aha! I unmounted the system partition so that it wouldn't show up upon reboot, and because Windows wants to keep it as such, it adds an entry somewhere to expressly forbid mounting. Hence bcdedit can't find the BCD. And it makes sense that the BCD is needed, because a special entry is added so the system can resume. The file not found error therefore referred to the BCD store.

share|improve this answer
    
I still blame the windows update ;-) –  Moab Sep 19 '12 at 21:12
    
@richard It's called "answer your own question". There's a checkbox for that. I lost quite a lot of sleep last night trying to figure this out. And this entire thing took me 20-30 minutes to type, entirely on the site, with no copying and pasting except for error messages. –  cyanic Sep 19 '12 at 21:36

In my case the solution was the Disk Order. I had followed every piece of advice (including GMMan's answer above). The windows partition was marked as active. Made sure every device could go into a sleep state. I was thorough. Still kept getting the "The system cannot find the file specified" error when trying to shutdown /h.

The issue was entirely due to the Disk the windows partition was on being Disk 1 (count from zero, so the 2nd disk).

I have a Linux Windows dual boot environment, each OS has its own HDD. The Linux HDD with Grub was listed first in BIOS. The Windows HDD was listed second. So I just switched their physical cables and told to boot to the linux hdd so I could still get grub.

Windows no longer complains about "The system cannot find the file specified" when I try and hibernate. Hybrid Sleep works. Everything works after that little change.

Long story short. I think the Windows Partition you want to hibernate has to be listed as Disk 0 in the Partition Manager.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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