x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

persistent registry and minibook booting...

Dana Page Icon Posted 2010-04-21 4:58 PM
#
Avatar image of Dana
Factorite (Elite)

Posts:
186
Location:
United States
Status:
Well, I seem to have learned a few things about my minibook which were confusing me and perhaps others as well.

The registry on these is stored in hive (*.hv) files which are located in the \windows directory. However, the \windows directory is in RAM, which gets wiped on every reboot and reset. Information found on MSDN says the hive files are read from storage during boot, but there is no trace of any hive files on the flash drive. So how does the registry "persist" as it clearly does?

There are two identical registry keys, one in HKEY_LOCAL_MACHINE and one in HKEY_CURRENT_USER, for RegPersisted, which are set to 1 on my machine, which enable reading the registry from storage.

Looking at the "storage manager" applet in control panel, reveals the answer. On the flash drive, there are three partitions. Only one of these, with folder name "ResidentFlash", shows up in "my device" or windows explorer. The first, with 14975 sectors, has the "binfs" file system. The other two, with sizes of 485632 and 9216 sectors, have the exfat file system. Looking further into the registry, under "StorageManager", it seems these extra partitions are used for the persistent data: They have the "mounthidden" flag set, one is called "hivereg" and the other is "staticstore".

I suspect if I removed the "mounthidden" flags, I'd be able to browse the files in these extra partitions... but I think I'd rather not do it unless there's a good reason to do so. There are other locations listed in StorageManager, which I suspect are related the the ROM where the OS and bootloader are stored.

This may also explain why some programs seem to work initially when they're installed, but then stop working later: If the installer writes any dll's or such to the \windows directory, or other stuff to \applicationdata folder (which doesn't exist on my device anyway) as coreplayer does, these get lost as soon as the device is powered down. Changing the shellfolder locations to point applicationdata to the flash drives solves one problem, moving desktop and "my documents" solves the issue of those disappearing, but I'm afraid to change the indicated location of the windows folder.

One wonders why the device was set up to put so many things, that the user would of course want to save, on non-saved RAM instead of pointing the shellfolders to the flash disk? Just an inept programmer at the Chinese minibook factory? The fact that I received mine with one single application (voplayer) on the flash drive, somebody else's (presumably the programmer's) wifi network defined, and the system set to create debugging dumpfiles on the flash drive, makes the inept programmer the most likely answer.

-Dana
 Top of the page
Alt Bass Page Icon Posted 2010-04-21 5:15 PM
#
Avatar image of Alt Bass
H/PC Sensei

Posts:
1,169
Location:
Russia
Status:
Go to HKLM/System/StorageManager, there are names of folders for each file system. Try to enter this names in file explorer, like that: "\folder". You will surely be able to get in these folders. You can also create shortcuts for them.
 Top of the page
nigelmercier Page Icon Posted 2010-04-21 5:49 PM
#
Avatar image of nigelmercier
Factor Fanatic

Posts:
54
Location:
Kent, United Kingdom
Status:
Any idea where the registry settings are stored in the image files?
 Top of the page
Rich Hawley Page Icon Posted 2010-04-21 6:02 PM
#
Avatar image of Rich Hawley
Global Moderator
H/PC Guru

Posts:
7,188
Location:
USA
Status:
I believe registry settings are embedded in the nk.nbo file as an fdf file.
 Top of the page
Dana Page Icon Posted 2010-04-21 7:03 PM
#
Avatar image of Dana
Factorite (Elite)

Posts:
186
Location:
United States
Status:
Quote
Alt Bass - 2010-04-21 12:15 PM

Go to HKLM/System/StorageManager, there are names of folders for each file system. Try to enter this names in file explorer, like that: "\folder". You will surely be able to get in these folders. You can also create shortcuts for them.


Be durned! That works... at least for binfs and hivereg, though not for staticstore.

Makes me wonder, though... since binfs is one of the volumes on the flash drive and contains all the windows files, where does the system load into RAM from? I always assumed it was from ROM, but finding the files elsewhere makes me wonder about that.

-Dana
 Top of the page
Alt Bass Page Icon Posted 2010-04-21 7:42 PM
#
Avatar image of Alt Bass
H/PC Sensei

Posts:
1,169
Location:
Russia
Status:
ROM space is not a partition at all. BinFS is just an usual FS, like FAT. If you sum all your partition volumes, you will get less than 1, 2 or 4 GBs. The difference is the root-mounted space where the whole system resides.

Edited by Alt Bass 2010-04-21 7:42 PM
 Top of the page
Dana Page Icon Posted 2010-04-22 2:58 AM
#
Avatar image of Dana
Factorite (Elite)

Posts:
186
Location:
United States
Status:
Right, i understand that... it's just that I was given to understand that all the system files resided in ROM and were copied to RAM at boot... but if they're on the flash dive, does there need to be any ROM at all other than the bootloader?

-Dana
 Top of the page
Alt Bass Page Icon Posted 2010-04-22 6:40 PM
#
Avatar image of Alt Bass
H/PC Sensei

Posts:
1,169
Location:
Russia
Status:
There is no separate ROM chip, only as a part of NAND chip, even bootloader resides in NAND memory. Also, ROM contents are not copied to RAM, they are just mounted as root. No, no more ROM is needed. It's enough secure for netbooks though.
 Top of the page
Dana Page Icon Posted 2010-04-22 11:45 PM
#
Avatar image of Dana
Factorite (Elite)

Posts:
186
Location:
United States
Status:
Ah, gotcha, makes sense. That should make it easier for somebody wanting to change the OS, just rewrite the appropriate partition as opposed to special tools to flash the ROM, no?

-Dana
 Top of the page
nigelmercier Page Icon Posted 2010-04-23 12:22 AM
#
Avatar image of nigelmercier
Factor Fanatic

Posts:
54
Location:
Kent, United Kingdom
Status:
Quote
Rich Hawley - 2010-04-21 6:02 PM
I believe registry settings are embedded in the nk.nbo file as an fdf file.

Thanks. Is it possible to edit them?
 Top of the page
Alt Bass
Alt Bass Page Icon Posted 2010-04-23 9:27 AM
#
Status:
Quote
Dana - 2010-04-22 11:45 PM

Ah, gotcha, makes sense. That should make it easier for somebody wanting to change the OS, just rewrite the appropriate partition as opposed to special tools to flash the ROM, no?

-Dana

Most likely no because of two things: CE6 prohibits direct access to physical memory and it's a bit dangerous to flash new ROM while OS is running.
 Top of the page
Jacobi Page Icon Posted 2010-07-23 3:13 AM
#
Avatar image of Jacobi
Factorite (Elite)

Posts:
114
Status:
Quote
Alt Bass - 2010-04-22 1:40 PM

There is no separate ROM chip, only as a part of NAND chip, even bootloader resides in NAND memory.


I know Windows CE makes less rewrites than let's say XP, but how much does it do?
And how much temp rewrites does it do compared with Linux?
Any idea of the life cycle of that flash memory, with rewrites done in daily use?
Is a netbook going to last much longer if running Linux than if running WinCe?
 Top of the page
Jump to forum:
Seconds to generate: 0.187 - Cached queries : 48 - Executed queries : 30