|
Übersicht |
Produkte |
HML Artikel |
|
|
| HORM Manager Lite
March
2006 Alexander Wechsler and Claus Schewe Wechsler Consulting GmbH & Co. KG
Attention!
This article provides detailed insight into the inner workings of XP embedded "Hibernate Once Resume Many" in combination with the Wechsler Consulting “HORM Manager Lite” utility.
Fast boot into a preconfigured system Hibernate Once - Resume Many (HORM) is one of the most prominent “Embedded Enabling Features” of XP embedded. It leverages several technologies such as the Enhanced Write Filter (EWF), the EWF NT Loader, and the hibernation feature of XP embedded power management. The idea is to create a hibernation file once from which the system boots any time it is started. The benefits are quite visible: Due to the fact that a complete memory image is loaded no initialisation time is spend on hardware devices and services, thus speeding up the boot process enormously. Unfortunately, this approach requires the same state on the disk as well as the hibernation file, because in the hibernation file the index of the file system as well as other volatile data is stored. For a normal XP Pro system this means that it is safe to boot from the hibernation file only once, directly after the system has created the file by entering hibernation mode. Therefore the normal the XP NT Loader disables any further boots from the hibernation file by writing zeros into the file.
Keeping data consistent XP embedded instead has the means to provide data consistency between the RAM image persisted in the hibernation file and the data state of the hard disk leveraging the Enhanced Write Filter. The EWF in RAM takes care that nothing changes on the protected partition and if changes occur they are stored in RAM. Hibernating the system, these changes will be persisted to the hibernation file, as well and so the overall view on the system data remains on synch. With a special version of NT Loader, EWF NT Loader XP embedded does not zero out the hibernation file after a successful boot. It additional uses a file called “resmany.dat” as on/off switch to determine if the system should boot from the existing hibernation file while starting up or not.
Facing the real world So far, so good, but unfortunately require real world scenarios configurations where EWF protected partitions and unprotected partitions exist side by side under the same XP embedded OS. The unprotected partitions are very often used to store log files or configuration files for the dedicated system in the field. Volatile data from the unprotected partitions of course can be found in RAM and one faces the same consistency problem as before. But, there is a solution to this: Un-mounting the unprotected partitions before creating the hibernation file will wipe the volatile data from RAM. All one has to do is to remount the partitions after the successful reboot. Then applications are able to use their scratch space again without endangering system integrity. Doing this manually can be quite a hassle due to the many different things that are necessary to occur in the correct order. The EWF needs to be controlled, power management set to the right mode, partitions mounted or re-mounted correctly and the resmany.dat file for HORM must be created or deleted.
Introducing HORM Manager Lite Therefore we at Wechsler Consulting developed a small utility called “HORM Manager Lite”, which gives the user control over all the necessary steps to fully leverage the XP embedded HORM feature. In addition to that it is a good status monitor with respect to EWF and HORM for the embedded system. It also provides data consistency for the most common scenario with a protected system drive C: and a random number of unprotected additional volumes.
Because MFC was used to develop the program, it is about 300kB small, which makes it perfectly suitable for the deployment on any XP embedded device.
The HML package comes as three XP embedded components two as the retail and the debug build for EWF RAM mode and one as the retail build for EWF RAM/REG mode which also includes the RAM/Reg registry keys.
Integrating HORM Manager Lite into Windows Embedded Studio
1. Import
of the HML component into the database Component Database Manager [2] Click on import and choose the component definition file (*.sld) of HML. If the import was successful you should see this message:
Component Database import window [3] Check
that the message really states "Suceeded:1" at its bottom end. 2.
Starting up HML in the XP embedded image The GUI
As you can
see below, the user interface of the HORM Manager is quite intuitive.
HORM Manager Lite GUI [1]
· The first section is the group of radio buttons to select tasks regarding HORM itself. When the "Unmount and Activate" radio button is selected the drive letter text box is enabled and you can enter drive letters of unprotected volumes. An example could be "e, f". The string should not contain numbers, any special characters except the comma or white spaces, and drive letters of invalid drives, for example none existing drives, or protected drives. If one of these is entered the tasks of dismounting drives and HORM activation is cancelled. · The second logical section is the group of radio buttons to select EWF tasks. Selectable tasks are to enable EWF, commit changes or commit changes and disable EWF without the need of an immediate reboot. EWF can be controlled independently from HORM. · The third section shows the status of EWF and HORM. Please note, that the HORM status will only be displayed correctly, when you use the HORM Manager to control HORM settings. Regarding to the state of HORM and EWF the different radio buttons are disabled or enabled. · The fourth and the fifth sections are the status history box which shows the progress and the success messages, or error messages. The other section is the group of buttons. With "OK" you will activate the selected task. If there is a reboot needed for the task, the HORM Manager will inform you about it.
There are some restrictions for HML. If you have paid close attention you probably have found some of them. But to make it easier I name them here explicitly:
|
HORM Manager Lite
© Fotos: [anja wechsler fotografie] |
© Wechsler Consulting GmbH & Co. KG 2012