Share via


Registry Hive ROM Dependency (Windows CE 5.0)

Send Feedback

The hive-based registry stores collections of registry data in files called hives. The default contents of the registry are stored in hive files in ROM. Registry keys and values that have been added or modified are stored in hive files on a persistent file system. Those hive files contain only changed values and keys; unchanged data is still referenced from ROM. On the very first boot of the system, the system hive and user hive are empty. As changes are made to the registry, the changed data is added to the hives. This design not only minimizes the size of the hive files that must be persisted, but also minimizes the time required to load those files during the system boot. As a result, the system boots faster than it would if the entire registry is stored in the persistent hive files.

However, the fact that data is split between the hive files in the persistent file system and the hive files in ROM means that the system hive and user hives work only in reference to the files in ROM. If the ROM is updated with new hive files, the references from the hives on the persistent file system to the files in ROM are broken. Therefore, if the ROM is updated, the hive files lose their meaning and must be erased. To prevent confusion between old hive files and new ROM contents, there is a mechanism that detects the conflict and erases the persistent hives. A ROM signature is stored in the persistent hive files, and it is compared against the ROM on each boot. If the ROM changes, the older hive files are erased during the system boot and re-created clean. This action is automatic and cannot be turned off.

Carrying over existing registry settings when the ROM of a device is updated is not a simple process. You must define which registry settings to maintain and which to overwrite, and then manually make a backup copy of the settings you want to keep. After the device boots with the default settings in the new ROM, you can manually import the backed up registry data. There is currently no OS tool for exporting and importing data in this manner, so you must enumerate the data using the registry APIs and then store it.

You can induce a clean boot without updating the ROM by implementing IOCTL_HAL_GET_HIVE_CLEAN_FLAG.

See Also

Hive-Based Registry Startup Sequence | IOCTL_HAL_GET_HIVE_CLEAN_FLAG

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.