To start with I'll say I've read the post here and I'm still having trouble.
I'm trying to create a CE6 image with a hive-based registry that actually stores results through a reboot.
This is where it starts to fall over. It all compiles fine, but on the target system, when it boots, I get:
What am I still missing? Why is the registry not being stored on the flash?
Strangly, if I create a random file/directory in the registry directory, it is still there after a reboot, so even though this directory isn't on the other partition (where I tried to put it), it does appear to be permanent. If it is permanent, why don't registry settings save (ie Ethernet adapter IP addresses?)
I'm not using any specific profiles, so I'm at a loss as to what the last step is to make this hive registry a permanent store.
First, I hope you are not changing common.reg directly. You should never change public code. If you want to change public registry keys you need set them in your project.reg or platform.reg and they will override the public settings.
SystemHive
should be set to the name of the directory to which you want to store the hive files without the name of the device.
In your case:
"SystemHive"="Registry\\system.hv"
Quote from the MSDN source:
Do not include the name of the file system on which the file is stored. The system will determine which file system to use based on other registry settings.
Update regarding your second comment (source):
If this value is present under HKEY_LOCAL_MACHINE, it indicates that the system hive has been restored successfully. If it is present under HKEY_CURRENT_USER, it indicates that the user hive was successfully restored.
Are you flushing the changes you make?
Check that you don't have a wierd implementation of IOCTL_HAL_GET_HIVE_CLEAN_FLAG
(source) - your system might be returning a true value to clean the system registry every boot.
You can add a thread that will periodically flush your registry (though I'd recommend excluding it and let each application flush its own changes) - PRJ_ENABLE_REGFLUSH_THREAD