Skip to main content.
Navigation:
DENX
>
Know
>
MiniFOFAQ
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
Know
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
Know Home
Readme
Changes
Index
Search
Go
List of pages in Know
Search
This is the mini_fo FAQ. Please feel free to post problems and solutions! %TOC% ---+++ How do I mount mini_fo? The syntax is: <verbatim> mount -t mini_fo -o base=<base directory>,sto=<storage directory> <base directory> <mount point> </verbatim> yes, it is silly to have to specify the base directory twice, I hope to fix this soon. See below for some examples. ------ ---+++ Why does mini_fo create these weird "META_dAfFgHE39ktF3HD2sr" in my storage directory? These files contain the meta data, that is used to keep track of modifications to the base file system. You can easily change this name by editing the "#define META_FILENAME" statement in mini_fo.h to whatever you prefer. ------ ---+++ How can I overlay the root file system? Mount mini_fo on top of the root file system: ==# mount -t mini_fo -o base=/,sto=/tmp/sto/root / /mnt/mini_fo== Now change your root file system to the mini_fo mount point: ==# chroot /mnt/mini_fo== Now you've got a shell with a mini_fo overlayed root file system. ----- ---+++ But how can I _really_ overlay the root file system (for the whole system)? Ok, above wasn't the whole truth, as previously started processes and daemons stay with the old root file system. To do this properly, I guess you would have to overlay the root file system before init is started, and then start init after changing root. Has anybody tried this? _Well, I did it!_ Just created a script =/etc/bootinit= with something like this: <verbatim> insmod /lib/modules/mini_fo.o mount -t tmpfs none /tmp mkdir /tmp/sto mount -t mini_fo -o base=/,sto=/tmp/sto / /rw cd /rw mkdir old_rootfs pivot_root . old_rootfs exec /usr/sbin/chroot . /sbin/init echo "Oops, exec chroot didnt work! :( :( :( " exit 1 </verbatim> then included =init=/etc/bootinit= in the kernel boot parameters line. It worked like a charm (never saw the Oops message, though :o) -- Main.RicardoScop - 30 Jun 2005 ----- ---+++ After overlaying the root file system /proc, /sys, /dev or any file system mounted on the old root disappears! This is normal behaviour. mini_fo only overlays the file system that was specified as base. It can't "detect" other file systems that are mounted somewhere on the base, so these mountpoints will be empty. The solution is to simply mount file systems you want to overlay to their appropriate mount points in the overlaid root file system before chroot'ing. For above example (assuming the file system mounted on /home is a seperate partition): ==# mount -t mini_fo -o base=/,sto=/tmp/sto/root / /mnt/mini_fo== ==# mount -t mini_fo -o base=/home/,sto=/tmp/sto/home/ /home/ /mnt/mini_fo/home/== ==# mount -t sysfs sys /mnt/mini_fo/sys/== ==# chroot /mnt/mini_fo== Note that sysfs is mounted directly. I don't think it would make much sense overlaying such a file system with mini_fo. ----- ---+++ I get =="permission denied"== messages when trying to modify files via mini_fo, although ==ls -l== shows sufficient privileges! This is usually caused by insufficient privileges in the storage filesystem. Check that the user accessing the overlaid file system has privileges to modify the storage directory. ----- -- Main.MarkusKlotzbuecher - 07 Jun 2005