UserFS in del

Maybe I’ve overlooked something, but nowhere in the documentation I can find anything on how to create and mount a user-partition. I’m working with an ME 9210 and Digi Embedded Linux, and the device is currently still running the factory-provided image and kernel.
Eventually I want to have a read-only rootfs and a writable user-filesystem for storing logs and persistent settings. I can build a new rootfs and flash it, that’s well-documented so should be no problem. The partition table also has an entry for a UserFS, but if I try to mount /dev/mtdblock4 I just get an Input/Output error. How does one build a UserFS flash-image or format the filesystem? Can anyone shed some light on this?


Right, I figured it out in the end from the online documentation provided by a competing vendor of embedded ARM-modules. :-p

So for reference, you can format a partition as JFFS2 using "flash_eraseall -j ".
Use "cat /proc/mtd " to figure out which partition you want to format.
E.g. for the module I was using, the UserFS was supposed to be on mtd4, so I did:

flash_eraseall -j /dev/mtd4

The partition can then be mounted, e.g.: mount /dev/mtdblock4 /mnt -t jffs2
The boot-scripts can do this automagically for you, if you uncomment the corresponding shell-magic in /etc/init.d/ .
But of course you can also add the partition to /etc/fstab , or provide you own boot-script for mounting and other things…

Alternatively, you can create a JFFS2 image on a separate computer using the MTD utilities:

mkfs.jffs2 -r  -e  -o 

Then you can for instance export the image via NFS and flash it using:

update_flash -v  

Hope this will be of use to others who get lost in the docs trying to figure this out…

Best regards,