none
CE 5.0.Mounting an Installable File System as the Root Directory, not work RRS feed

  • General discussion

  • I followed the instructions here, but it did not work. Nothing has changed.

    http://msdn.microsoft.com/en-us/library/ms885839.aspx


    I just sysgened it. The registry has changed when I use a remote registry editor tool to check it.

    My hardware has been restarted.

    I'm using a debug build, here are the outputs. There are so many outputs that I don't know which parts are useful. I saved all of them here.

    outputs

    I was always using hive based registry in catalog items.

    I'm using a CF card(CompactFlash), not Nand flash.


    • Edited by Percy Xu Thursday, January 31, 2013 7:59 AM
    • Changed type Percy Xu Thursday, March 7, 2013 4:29 AM not solved
    Monday, January 28, 2013 9:39 AM

All replies

  • "did not work" is useless information to us. Something happened if you made those registry changes, rebuilt the operating system, and restarted the hardware.

    If you're running a Release build, think about running a Debug build instead and capturing the debug output during startup.

    My first guess is that you didn't put the new registry entries in the correct "hive", the boot hive, so they didn't actually "appear" until the filesystem was mounted and the hive registry was loaded. That's not early enough.

    Paul T.

    Monday, January 28, 2013 7:46 PM
  • Do you mean "rebuilt the operating system" is to "sysgen and rebuild"? I just sysgened it. The registry has changed when I use a remote registry editor tool to check it.

    My hardware has been restarted.

    I'm using a debug build, here are the outputs. There are so many outputs that I don't know which parts are useful. I saved all of them here.

    outputs

    What do you mean of correct "hive"? How to do that?

    Tuesday, January 29, 2013 3:31 AM
  • Here is the blog for the rom only file system

    http://nicolasbesson.blogspot.in/2007/12/enable-rom-only-file-system-under.html

    Regarding hive:

    if you are enabling hive based registry, you have to do clean sysgen. the storage device you want to use for hive based should be configure as a bootable device and the registry settings related to the device should be in between

    ;HIVE BOOT SECTION

    :END HIVE BOOT SECTION

    then only it will be the part of boot hive.



    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Tuesday, January 29, 2013 1:48 PM
  • The url you posted is for CE 6.0R2, I'm using CE 5.0. Will that article help?

    Where is

    ;HIVE BOOT SECTION

    and

    :END HIVE BOOT SECTION

    ? I just put the registry configuration in my project.reg file.

    Wednesday, January 30, 2013 3:47 AM
  • i believe it should work for 5.0.

    you have to add the registry configuration for your storage device between the

    ;HIVE BOOT SECTION

    << your storage device registry configuration >>

    :END HIVE BOOT SECTION

    you can use platform.reg in your BSP or project.reg is also fine. Make sure the registry configuration should come between this as mentioned above. Also check the registry entries added in the project.reg or platform.reg are available in your final registry file (reginit.ini) in the release directory.


    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Wednesday, January 30, 2013 6:27 AM
  • After adding the following lines to my project.reg. My ce failed to boot.

    ;HIVE BOOT SECTION
    
    ;Mount as root
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile\FATFS]
    	"MountAsBootable"=dword:1
    	"MountAsRoot"=dword:1
    	"MountPermanent"=dword:1
    
    ;command shell
    ;[HKEY_LOCAL_MACHINE\init]
    ;	"Launch50"="cmd.exe"
    ;	"Depend50"=hex:14,00, 1e,00
    
    ;load device manager at phase 1
    [HKEY_LOCAL_MACHINE\init\BootVars]
    "Start DevMgr"=dword:1 
    
    ;load hard disk driver at phase 1
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\]
    "Profile"="HDProfile" 
    "Flags"=dword:1000
    
    ;mount as bootable
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]
    "AutoMount"=dword:1
    "PartitionDriver"="mspart.dll"
    "MountAsBootable"=dword:1
    "Name"="harddisk"
    "Folder"="Hard_disk"
    "DefaultFileSystem"="FATFS" 
    
    :END HIVE BOOT SECTION
    

    The booting halted with the following debug output:

    Kernel debugger connected.
    The Kernel Debugger connection has been established (Target CPU is X86).
    Target name: CE Device
    Probe name: KdStub
    Binary Image should be loaded at 0x80220000 / Data relocated at 0x828ff000
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\NK.EXE'
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\KD.DLL'
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\OSAXST1.DLL'
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\OSAXST0.DLL'
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\HD.DLL'
    4294767350 PID:3fdf002 TID:3fdf1de 0x83fdf030: Updated eptr->e32_vsize to = 00004000
    4294767351 PID:3fdf002 TID:3fdf1de 0x83fdf030: >>> Loading module celog.dll at address 0x802F7000-0x802FB000 (RW data at 0x8298A000-0x8298A57C)
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\CELOG.DLL'
    4294767365 PID:3fdf002 TID:3fdf1de 0x83fdf030: CeLog: +Init
    4294767366 PID:3fdf002 TID:3fdf1de 0x83fdf030: CeLog: Large buffer size unspecified, using default size
    4294767368 PID:3fdf002 TID:3fdf1de 0x83fdf030: CeLog: Small buffer size invalid or unspecified, using default size
    4294767370 PID:3fdf002 TID:3fdf1de 0x83fdf030: CeLog: -Init
    4294767371 PID:3fdf002 TID:3fdf1de 0x83fdf030: CeLog Zones : CE = 0xCFBFFFFF, User = 0xCFBFFFFF, Proc = 0xFFFFFFFF
    4294767372 PID:3fdf002 TID:3fdf1de 0x83fdf030: New CeLog DLL is now live!  (1 total)
    4294767373 PID:3fdf002 TID:3fdf1de 0x83fdf030: first = 01d50000, last = 02000000, SharedDllBase = 02110000
    4294767377 PID:3fdf002 TID:3fdf1de 0x83fdf030: >>> Loading module coredll.dll at address 0x03F50000-0x03FF4000 (RW data at 0x01FFE000-0x01FFF765)
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\COREDLL.DLL'
    4294767391 PID:3fdf002 TID:3fdf1de 0x83fdf030: Did not find emulation code for x86... using floating point hardware.

    Wednesday, January 30, 2013 7:48 AM
  • Did you enable the hive based registry in catalog item? After that, did you give the clean sysgen?

    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Wednesday, January 30, 2013 7:53 AM
  • I was always using hive based registry in catalog items. So I think I don't need to clean sysgen.
    Wednesday, January 30, 2013 9:31 AM
  • okay.

    Did you go through the blog link i showed you?

    Erase the Storage content
    Before booting the device for the first time, the content of the storage device must be completely erased (most of the bootloaders provide a menu to clean up your storage device).
    After booting all the files that you will store under \ will be accessible on the next boot.

    Final note
    To clean up the registry file and to insert those settings only when the ROM-Only File System option is selected in your OSDesign, you can use IF statement with the SYSGEN_FSROMONLY variable.


    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Wednesday, January 30, 2013 9:38 AM
  • Thanks Vinoth.

    I'm using ROM-Only File system now.

    I didn't erase the Storage content. Because I have only one storage and one partation. Is it posible to acheive my goal without erase the content?

    Respectively, I removed the registry about "auto format" and "auto partition"... from the project.reg.

    Wednesday, January 30, 2013 10:15 AM
  • Not sure. Because the blogger specifically mentioned this by sharing his experience.

    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Wednesday, January 30, 2013 10:20 AM
  • I think your next step is to revert to last bootable configuration and capture debug output, comparing to above. The hope is that the next item in the working log after the lockup point above will tell you where it's breaking

    I haven't done this with a hard disk, but aren't you missing the driver for your disk interface (IDE/ATA) in the hive boot section?

    Paul T.

    Wednesday, January 30, 2013 3:34 PM
  • Compared to the bootable configuration debug output, the next items in the working log after the lockup point above are:

    4294767490 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: >>> Loading module coredll.dll at address 0x03F50000-0x03FF4000 (RW data at 0x01FFE000-0x01FFF765)
    4294767504 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: >>> Loading module filesys.exe at address 0x04010000-0x04081000
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\FILESYS.EXE'
    4294767518 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: CertMod.dll not found, using old OEM Trust Model
    4294767519 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FileSystem Starting - starting with clean file system
    4294767520 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: initializing ROM/RAM file system
    4294767520 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: SC_CreateAPIHandle: pvData == NULL
    4294767520 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Registering file system ROM, index 2, flags 0x00000031
    4294767520 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Mount complete (ROM, index 2, flags 0x00000031)
    4294767522 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: >>> Loading module eventlog.dll at address 0x03210000-0x0322B000 (RW data at 0x01E83000-0x01E838B4)
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\EVENTLOG.DLL'
    4294767535 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: EventLog:: EventLogInit() called
    4294767535 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: OEMIoControl: Unsupported Code 0x101008c - device 0x0101 func 35
    4294767537 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FSVOL: Opening existing volume
    4294767537 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FSVOL: Volume heap already initialized
    4294767538 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FSREG: Mounted ROM portion of boot registry
    4294767538 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FSVOL: Creating clean virtual volume
    4294767538 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FSVOL: Initializing volume heap
    4294767543 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FSREG: Mounted RAM portion of boot registry
    4294767543 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: PCIReg(key: Drivers\BuiltIn\PCI\Instance\KITL, device: 0/13/0)
    4294767547 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Creating signal event SYSTEM/DevMgrApiSetReady
    4294767547 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Creating signal event SYSTEM/PowerManagerReady
    4294767548 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Creating signal event SYSTEM/GweApiSetReady
    4294767548 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Creating signal event ReleaseFSD
    4294767548 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FSREG: Unable to read value "Start DevMgr" under HKEY_LOCAL_MACHINE\init\BootVars
    4294767548 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FILESYS: Starting storage manager.
    4294767550 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: >>> Loading module fsdmgr.dll at address 0x03C00000-0x03C23000 (RW data at 0x01FC5000-0x01FC5810)
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\FSDMGR.DLL'
    4294767562 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Registering file system StoreMgr, index 3, flags 0x00000001
    4294767563 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: InitSharedHeap: 42300000 10000 c
    4294767563 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c:   InitSharedHeap: return 42300060
    4294767564 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FILESYS: Restarting storage manager.
    4294767566 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: >>> Loading module relfsd.dll at address 0x03E60000-0x03E69000 (RW data at 0x01FEB000-0x01FEBADC)
    Loaded symbols for 'Z:\PROJECTS\DATA_GATHERER\SRC\OPC_AGENT_CE_5\RELDIR\GEODELX_X86_DEBUG\RELFSD.DLL'
    4294767582 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Registering file system Release, index 4, flags 0x00000000
    4294767582 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: Mounted ReleaseFSD volume '\Release'
    4294767629 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: size of 'dbglist.txt' = 00000000
    4294767633 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FS: Mount complete (Release, index 4, flags 0x00000000)
    4294767633 PID:43fa5c1a TID:43fa5bea 0x83fa5a3c: FILESYS: Starting device and waiting for boot file system.

    I think it is the file system.

    Is the driver

    ;load hard disk driver at phase 1
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\]
    "Profile"="HDProfile" 
    "Flags"=dword:1000

    ?

    Thursday, January 31, 2013 1:52 AM
  • i have posted the sample registry settings for bootable filesystem. you can compare this with your registry settings. this is for NAND Flash. most of the settings should be same except the settings given in [HKLM\Drivers\BuiltIn\...] this is used for the corresponding storage device driver settings. yours is HDProfile and here it is MSFlash.

    -- NAND Flash Drivers ---------------------------------------------------------
    ; @CESYSGEN IF CE_MODULES_FSDMGR
    ; @XIPREGION IF PACKAGE_OEMXIPKERNEL
    IF BSP_NONAND !
    ; HIVE BOOT SECTION
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MSFlash]
        "Dll"="nand.dll"
        "Prefix"="DSK"
        "Index"=dword:0
        "Order"=dword:4
        "MemBase"=multi_sz:"6E000000","08000000"
        "MemLen"=multi_sz:"00001000","00001000"
        ;"DmaCh"=dword:3
        ; CE_DRIVER_BLOCK_GUID
        "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
        "Profile"="MSFlash"
    ; END HIVE BOOT SECTION
    ENDIF BSP_NONAND !
    ; @XIPREGION ENDIF PACKAGE_OEMXIPKERNEL
    ; @CESYSGEN ENDIF CE_MODULES_FSDMGR

    ;-- Storage Manager Configuration ----------------------------------------------
    ; @CESYSGEN IF CE_MODULES_FSDMGR
    ;
    ; HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
        "DriverPath"="Drivers\\BuiltIn\\MSFlash"
        "LoadFlags"=dword:1
        "BootPhase"=dword:0
        "Order"=dword:0

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\FATFS]
        "MountAsBootable"=dword:1
        "Flags"=dword:00000014
        "FormatTFAT"=dword:1
        "EnableWriteBack"=dword:1

    ; END HIVE BOOT SECTION
    ; @CESYSGEN ENDIF CE_MODULES_FSDMGR

    ;-------------------------------------------------------------------------------


    ;-------------------------------------------------------------------------------
    ; @CESYSGEN IF FILESYS_FSREGHIVE
    ; HIVE BOOT SECTION
    ;
    ; We want start both storage and device manager. Flags value is combination of
    ;   0x0001  Start storage manager in boot phases 0 and 1 to load the boot
    ;           file system.
    ;   0x0002  Start device manager in boot phase 1 to load the boot file system.
    ;
    [HKEY_LOCAL_MACHINE\Init\BootVars]
        "Flags"=dword:3

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MSFlash]
        "Flags"=dword:00011000  ; load driver in boot phase 1; do not load again later

    ; END HIVE BOOT SECTION
    ; @CESYSGEN ELSE

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MSFlash]
        "Flags"=dword:00010000

    ; @CESYSGEN ENDIF FILESYS_FSREGHIVE
    ;-------------------------------------------------------------------------------


    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Thursday, January 31, 2013 6:33 AM
  • I'm using a CF card(CompactFlash), not Nand flash. How to change your registry settings?
    Thursday, January 31, 2013 7:57 AM
  • your compact Flash driver registry settings should be in

    ;HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\< compact flash driver name >]

    ; END HIVE BOOT SECTION

    and the order of your driver should be 0.

    it should have a profile name. in my sample the profile name is MSFlash. you have to replace the registry with your profile name ( Where ever MSFlash is present)

    you have to specify the driver path as shown in the sample. i just show it below. your driver path should be the builtin registry of the compact flash driver.

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
        "DriverPath"="Drivers\\BuiltIn\\MSFlash"


    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Thursday, January 31, 2013 9:07 AM
  • "Dll"="nand.dll"

    If I use a Compact Flash, which dll should I use? And should I change any other settings in

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\HDProfile]

    Friday, February 1, 2013 4:00 AM
  • i believe you should have a driver for Compact flash and it should have a registry settings. May be in PCMCIA interface.

    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Friday, February 1, 2013 5:40 AM
  • That entry is a profile, not the driver. Remember that your hard disk is plugged into the main board somehow. It might be an SATA interface or IDE/ATA. Either way it should be obvious that the OS will need a driver for that hardware in order to access the disk connected to it. That driver MUST be loaded in the hive boot section or its not there when you're trying to startup and obviously, the hard disk will essentially be missing, and the filesystem can't be mounted as the root.

    The "lockup" symptom is consistent with this cause: you have specified a profile of the boot filesystem, the filesystem driver must wait for the boot filesystem in order to boot (of course!), but, if you don't have the driver for filesystem's hardware, it will wait forever.

    Paul T.

    Friday, February 1, 2013 4:14 PM
  • Give up. Use ram and rom file system instead.
    Thursday, March 7, 2013 4:29 AM