Hibernate once, resume many (HORM) in a nutshell


I wanted to take a minute to spotlight one of the big new embedded enabling features that is new to Windows XP Embedded SP2.  It is called hibernate once, resume many.  We have taken to abbreviating this to HORM internally, so if you see this new acronym floating around in documents or newsgroups about XP Embedded that is likely what it means.

HORM provides the ability to resume an EWF-protected system from a hibernation file (hiberfil.sys) each time a machine is restarted instead of performing a full OS boot.  This greatly improves the cold-boot startup time of machines.  Here are a few key points about HORM:

  • You must protect all partitions on your volume with EWF in order for HORM to work correctly
  • You must use EWF RAM or RAM Reg overlay types in conjunction with HORM
  • Ordinarily, NTLDR will check the header/signature of hiberfil.sys when the system begins the boot process in order to protect against a stale orphaned hiberfil.sys being booted.  If a stale hiberfil.sys is detected, NTLDR will show a menu asking if you want to continue to resume or discard the hiberfil.sys and perform a full boot.  You can create a file named resmany.dat (any size, any format) on the root of the boot partition (typically c:) to suppress this check and allow your device to resume without any user interaction.
  • You must make sure to use the EWF NTLDR with HORM.  EWF NTLDR is the only boot loader that has the logic to search for resmany.dat and skip the hiberfil.sys header check.
  • There are useful help docs describing how to implement HORM on your device, you can check them out here.
  • One thing not covered in the documentation is how to enable HORM directly from Target Designer.  You can create an additional file resource that will copy resmany.dat to the root of your image partition or simply add it to the image after you do a build inside of Target Designer.  Then, assuming you have enabled hibernation in your power management component and configured EWF to run on startup, you will be able to immediately create your hiberfil.sys after your image finishes running through first-boot agent (FBA).
  • If you are using Winlogon and include the settings in the UI Core component you will be able to hibernate via the start menu.  If not, you can include the XPE Power Management tool (xpepm.exe) and run xpepm -hibernate from a cmd prompt to create your hiberfil.sys after you launch the apps that you want to run each time you resume.

I encourage you all to take a look at HORM as you start exploring XPE SP2.  Please let us know if you run into any problems or have any questions.

 

Comments (34)

  1. Sam says:

    I am trying to enable HORM in my system. In the Target Designer, Advanced Configuration and Power Interface PC, Power Management, I checked the Enable Hibernation. But after I checked dependency , built image, deployed the image, there wasn’t a hiberfil.sys in the driver C:. What’s the problem?

    If I type c:> xpepm -hibernate, the system returns ERROR 1141: The system BIOS failed an attempt to change the system power state.

    Thanks very much

  2. This comment is for Sam.

    Sounds like your machine doesn’t support hibernate. Either through a bios setting or it may be an APM bios, not ACPI. The error you received when running xpepm indicates that the BIOS rejected the request, not the OS.

    HORM is a pretty popular subject so I’ll ask the team to write up some more blog posts on the subject including troubleshooting tips at the Embedded blog (see link above). In the meantime, i highly recommend posting followup questions on this to the XP Embedded public newsgroup for a more immediate response, there are many people in the community available there to assist as well.

    -Andy

  3. Gil says:

    Is it possible to use HORM on older version of XPE? (Like SP1)

    Best regards,

    GIL.

  4. Hi Gil – I have not tried to backport HORM to XPE SP1. I suppose it would be theoretically possible if you got all of the right binaries and placed them into your XPE SP1 image, but this type of solution would not be supported by our team or Product Support. Are there any specific issues that prevent you from using XPE SP2? Perhaps I could help you resolve those? Let me know….

  5. amro says:

    I am also trying to enable HORM in my system

    My system has two partition on harddisk.

    C: is windows xp-pro SP2 and D: is xpe sp2.

    After I deployed the target image and fba done

    there wasn’t a hiberfil.sys for xpe in the

    driver D:. there was a hiberfill.sys in the

    C: for xp-pro.

    The EWF was work on correctory, but

    d:> xpepm -hibernate, the system returns ERROR 1141: The system BIOS failed an attempt to change the system power state. It was same as

    Mr. Sam.

    In my system on the windows xp-pro SP2,

    hibernate was work correctory. Then I thought

    taht the bios of my system was supporting a

    hibernate.

    Is that tight ? and please show me how resolve

    this problem.

    Thanks very much

  6. Hi Amro – I am not positive what is causing the error that you are seeing when trying to hibernate your XP Embedded image. I would suggest double-checking that you have included all of the necessary hardware and software components when you built your XPe image. If you have included everything and it still does not work, I would suggest reviewing HORM information available on the Windows Embedded team blog at http://blogs.msdn.com/embedded/ and check the Embedded newsgroups for similar problems and resolutions. If those do not help, the alias wecrt (at) microsoft (dot) com may be able to help as well.

    Hope this helps!

  7. Hoshi says:

    Hi, I’ve the same problem as amro on an VIA Epia M Board. With XP Home and Pro I’ve no problems with hibernation support on this board.

    I think that the TargetDesigner do not accept the check mark vor hibernation.

    Have anyone a solution or an hint???

  8. amro says:

    Thank you everyone, I solve a this problem.

    When I work on the target designer,

    I added a video-driver component that only

    for my board. Video chip is ATI radeon M9.

    Then I can use HORM.

    But I do not know WHY.

  9. Just4UriM says:

    Is it possible to change the CD-ROM when the Windows XP Embedded has been boot from a bootable CD ?

  10. Hi Just4UriM – I believe that once you have booted from a bootable CD-ROM, your system is running from RAM and it is safe to swap out the CD in the drive. Just remember that if you reboot the system that you need to have the bootable CD in the drive to get the OS to reload.

  11. Just4UriM says:

    Thanks astebner , but the problem is that when the Embedded Windows was boot up , the CD-ROM drive is locked! So how can I change the CD ? is there a way to unlock it ?

  12. Hi Just4UriM – I found out that I am wrong about the behavior of the system regarding bootable CD-ROM drives. In this scenario, the OS is using the CD-ROM in place of the hard drive and is not loading the entire image into RAM like I thought it was. Therefore, it locks the CD-ROM drive to prevent accidental removal of the CD.

    One option you might consider is to use 2 CD/DVD drives – an internal CD-ROM to boot from and a more powerful CD/DVD device for runtime use. In this scenario, you could mark the boot device so that it is not visible externally.

  13. Create says:

    Error caused during hibernation/standby stating device driver error – Keyboard error etc. Disabling a Hidden service YSKeyboardFilter solved my problem. This seems to be a major problem with many user.

  14. Lynda (MSFT) says:

    Do you get the same error on normal hibernate (not using HORM)?

    Could you file a bug report athttp://msdn.microsoft.com/embedded/community/community/feedback/feedxp/default.aspx, giving more details of the error (error code, hardware and drivers installed) so we can investigate?

    Thanks!

  15. King Louie says:

    You know hibernate could be a great basis for a kewl app that saves games, desktop states etc. too bad no developers have figured this out.

  16. venkat says:

    Respected sir,

    I have a problem while creating a bootable cd for windows xp embedded.i have created iso-image and had written the iso-image contents into the cd using GEAR PRO version 7.0 software.the only problem is now i have connected the deployment hard disk has primary hard disk with the target image contents and i have given this has primary device to boot from and at the same time i have loaded the cd in the cd rom whichi have written.ultimately it has to boot but its not booting i am not getting any thing in the black screen except li.so please help me in this matter.

    from

    venkat

  17. venkat says:

    Respected sir,

    I have a problem while creating a bootable cd for windows xp embedded.i have created iso-image and had written the iso-image contents into the cd using GEAR PRO version 7.0 software.the only problem is now i have connected the deployment hard disk has primary hard disk with the target image contents and i have given this has primary device to boot from and at the same time i have loaded the cd in the cd rom whichi have written.ultimately it has to boot but its not booting i am not getting any thing in the black screen except li.so please help me in this matter.

    from

    venkat

  18. Hi Venkat – Unfortunately, I don’t have much experience debugging bootable CD-ROM creation/booting issues.  I would suggest trying to contacting the Windows Embedded team via their blog (http://blogs.msdn.com/embedded/contact.aspx) or searching on the newsgroups for some advice about how to troubleshoot this scenario.  I’m sorry I’m not able to be more helpful here.

  19. Michael Bate says:

    I have implemented HORM with reasonable success, with XPe SP2.  I am able to

    But I would like to start up an application after a HORM boot – I want the application to start from the beginning, since it performs various hardware initializations.

    Is there any way to do this?

    ALSO I don’t see what UI Core option enables Hibernate in the Start Menu.  I see the "Standby" option on Shut Down, but that does not appear to initiate hibernation.

  20. Hi Michael – HORM does not support starting applications after the HORM boot.  If you require that type of functionality, I would suggest taking a look at a 3rd party product such as ReadyOn by Ardence (http://www.ardence.com/embedded/products.aspx?ID=72).

    For your other UI issue, did you enable hibernation support in Target Designer when you built your embedded runtime?  I believe this is a part of the HAL component.  Also, if you don’t have this menu option, how are you hibernating currently?  Do you use xpepm.exe since the menu option is not available?

  21. Hi Michael – One other note here, if you are referring to the Windows "Turn off computer" menu, you can cause the Standby menu item to turn into a Hibernate menu item by clicking on Start, choosing Shut Down and then hold down the shift key.

  22. Helen Elcock says:

    Hi Michael.

    I have horm all working fine 🙂 however I do not want "hibernate" in the system shutdown menu as I do not want the user to be able to overwrite the carefully created hiberfile.sys.

    Is there any way to remove hibernate from the shutdown option. I have my own program that hibernates so I do not need it to create the horm file.

  23. Hi Helen – I’m sorry, but I’m not aware of a way to disable the Hibernate button or hide it on the shutdown menu.  I did a few quick web searches, but only found ways to enable it as opposed to ways to disable it.

    Since Windows XP Embedded uses the same underlying binaries that are a part of Windows XP, I’d suggest posting a question on one of the Windows XP public newsgroups to see if anyone there has any suggestions.  

  24. huangbichong says:

    I have a problem,I use ewf(C:RAM) with Hibernate to make horm,the horm is work in gear,but I don’t no why my D volume is protected,all Write to D it is no to use,if you can give me some advice?

  25. Hi Huangbichong – I’d suggest starting by looking at the EWF settings on your device to double-check which drive(s) are being protected and by what method.  You can use the ewfmgr.exe utility or look at the settings directly in the registry.

    If everything looks right there, then I’m not sure what to suggest because it has been a while since I’ve worked with EWF and HORM.  You can post a question on the XP Embedded forums and there are usually a lot of folks there who can help suggest ideas.  There is a specific forum for embedded enabling features like EWF and HORM that I’d suggest using for this – http://forums.microsoft.com/EmbeddedWindows/ShowForum.aspx?ForumID=1178&SiteID=47.

  26. huangbichong says:

    Thank you for you help!

    I test the ewf ,when I just enable the ewf ,

    the D volume not protected,everything is in gear.

    but when I try to ewf+hibernate,D is protected

    now I upgrad my ewf module,when I want to make horm,I just need to input "ewf c: -activehorm" in cmd,and hibernate.

    but it still protected D,not just D,

    E is protected.

    I try to post a question on the XP Embedded forums to find the answer.

  27. huangbichong says:

    it seem this article will give me a answer

    http://msdn.microsoft.com/en-us/library/aa460084.aspx

    go shares

  28. Pedro says:

    Hi, I'm trying to find a solution to a partition problem. I'm using ewf and horm on my system and it works great however during run time certain files need to changed or new files need to be added. But every time I save something it is deleted when I restart the machine, which make sense since volume zero is protected. If I use an extra flash it works great. But my goal is to do this on one flash with two partitions. But when I use one flash with two partitions the information get ereased because both partions considered volume zero. Is there any way to protect only partion on volume zero or have two different volumes on one flash?

  29. Hi Pedro – I'm sorry, but I haven't worked on the Windows Embedded team since 2005, so I don't know the answer to this question.  I'd suggest posting a question on one of the Windows Embedded forums listed at social.msdn.microsoft.com/…/embeddedwindows.  You'll want one of the embedded enabling features (EEFs) forums, but the exact one you will want to post in depends on what version of Windows Embedded that you're using.

  30. Pedro says:

    Alright I will.

    thank you for your help astebner.

  31. Vladimir says:

    Can anyone help me with hibernation in windows embedded standard?

    Hibernation is not working.

    When I write xpepm.exe -hibernate I get back Error 2: The system cannot find the file specified.

    I tryed searching on google but couldn't find any good link.

    Tnx

  32. Hi Vladimir – I'd suggest posting a question on one of the Windows Embedded forums listed at social.msdn.microsoft.com/…/embeddedwindows.  You'll want one of the embedded enabling features (EEFs) forums, but the exact one you will want to post in depends on what version of Windows Embedded that you're using.  

  33. jeangeorges says:

    Please could you confirm it is Not supported by CFast 16 GB.

    1. Hi jeangeorges – I’m sorry, but I don’t know the answer to this question. I’d suggest posting a question on the Windows Embedded forum at https://social.technet.microsoft.com/Forums/en-us/home?category=windowsembedded and hopefully someone there can answer this question for you.

Skip to main content