Posted by: Sue Loh (with help from Andrew Rogers)
I’ve seen this question fly by a few times, so I’m blogging it. “Now that Windows Mobile 5 is persistent store based, how are OEMs supposed to implement a clean boot?” The idea is to reset the registry, databases and all files to produce a “clean” device, as if it came straight out of the factory.
What happens is that when the file system driver manager (FSDMGR) mounts the drivers for the persistent store, it will call an OAL IOCTL to determine whether the partition needs to be formatted. So OEMs must tell FSDMGR to call the IOCTL, and they must implement the IOCTL. In more detail, OEMs should do the following:
Older mechanisms like IOCTL_HAL_GET_HIVE_CLEAN_FLAG should not be used with Windows Mobile 5. You don’t want to get into situations where the registry is cleaned but the rest of persistent storage is not.