Forum Topic - enum-devices fails to mount usbstick if /etc/system/enum tree is in /proc/boot?: (4 Items)
   
enum-devices fails to mount usbstick if /etc/system/enum tree is in /proc/boot?  
I have duplicated the contents of /etc/system/enum in an image filesystem.  I created these directories in systembuilder
...

/etc 
/etc/system
/etc/system/enum 
/etc/system/enum/devices
/etc/system/enum/devices/usb 
/etc/system/enum/include 

and populated them with files exactly as the distribution.

/etc/system/trap is linked to /dev/shmem (so its writeable)

Yet starting enum-devices always fails to mount the usbstick.

BUT if I link /etc/system/enum to a copy of the files on a mounted harddrive, using

ln -sP /fs/etc/system/enum /etc/system/enum

NOW enum-devices works perfectly...  with only this one change. 


The difference appears to be the underlying filesystem.  Looking at "snoopy" output shows that enum processing (on the 
proc filesystem) fails to traverse the directories it opens... unlike when located on the real filesystem.

Is this a known issue (limitation) that /etc/system/enum must be located on a r/w filesystem?  I notice that qnx-car 
always locates /etc on a filesystem other than the image...


Re: enum-devices fails to mount usbstick if /etc/system/enum tree is in /proc/boot?  
We ran in to this one too.  I'd just speculated that using the "-c" flag disabled some magic behaviour somewhere.   We 
ended up working around it in exactly the way you describe: using a procmgr symlink, which we then remove after running 
our initial device enumeration pass.

-Will
Re: enum-devices fails to mount usbstick if /etc/system/enum tree is in /proc/boot?  
Actually, let me clarify that.  In our build file (QNX 6.3.2), we do:

# Bring up bootable disk devices
display_msg Detecting disk controllers...

# Link up the search trees
procmgr_symlink /proc/boot/enum /etc/system/enum 
    
sh -c "enum-devices -i CVS"

# Wait for devices.  Low priority guarantees start cookies are in place.
[pri=5] sh /proc/boot/wait-devb
	    
# Destroy the linkage to the boot enumerator files	    
rm /etc/system/enum


The -i CVS is because all of our boot tree contents are stored in our CVS server - it just asks it to ignore the CVS 
metadata files that get inadvertently sucked in.  The enum tree we evaluate here is a stripped-down copy that only 
invokes mass storage devices; after this another script analyzes /dev/hd* and mounts them appropriately.    wait-devb is
 a script that interoperates with our launch scripts for the individual mass storage drivers, essentially just waiting 
until all detected devices report that they've enumerated all drives.

Anyhow, the point is: what we found is that it doesn't seem to matter what the backing filesystem is, however it /does/ 
matter whether or not the path is "/etc/system/enum" or not.

-Will
Re: enum-devices fails to mount usbstick if /etc/system/enum tree is in /proc/boot?  
Thanks for the reply.  At least someone else has seen this too!  In the scenario I wanted to use it, there was no 
filesystem than /proc/boot.  Spent quite a bit of time trying to make it work before posting.

I see no reason (other than a bug) why reading config files would fail from /proc/boot.  I will go ahead and enter a PR.