• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Finally, you can manage your Google Docs, uploads, and email attachments (plus Dropbox and Slack files) in one convenient place. Claim a free account, and in less than 2 minutes, Dokkio (from the makers of PBworks) can automatically organize your content for you.



Page history last edited by Vasile 11 years, 9 months ago



Union-FS (unionctl, unionfs.o) is a linux kernel module "which can appear to merge the contents of several directories (branches), while keeping their physical content separate".

Version: 1.0.14

Status: Done





If you don't know what unionfs is and how to use it, please read the basics or go to the unionfs official page.


On MG35, unionfs is a very useful tool in development: it is possible to overlay a writeable filesystem from a disk (or even on a server) on top of the read-only filesystem provided by the firmware in flash (cramfs). As an example, if you unionfs /usr/bin (from the hdd) over /bin (from the flash cramfs) you can "overwrite" the built-in binaries with user-provided ones, without the need to create a new cramfs and reflash.Unionfs can also be very useful in "normal" usage, particularly with the package management system.



The unionfs driver must be loaded before attempting to create any union mounts. To load the driver, execute the following command:



/sbin/insmod /usr/lib/modules/2.4.17-uc0/unionfs.o

using /usr/lib/modules/2.4.17-uc0/unionfs.o


After successfully loading the module, you can remount directories in stacks. To make your /etc writable with a ram overlay, try:



mkdir -p /mnt/etc

mount -t ramfs none /mnt/etc

mount -t unionfs none -o dirs=/mnt/etc=rw:/etc=ro /etc


To add or change files in /bin, you could use:



mkdir -p /usr/rootbin

cp /usr/mytest/dvdplayer.bin /usr/rootbin

mount -t unionfs none -o dirs=/usr/rootbin=rw:/bin=ro /bin



To add files in /usr/bin to /bin, extending the number of available commands or overwriting the built-in ones, you could use:



mount -t unionfs none -o dirs=/usr/bin=rw:/bin=ro /bin


For skinning, you could use mount a hdd directory over /img:



mount -t unionfs none -o dirs=/usr/img=rw:/img=ro /img



Version 1.0.14 - [John, 2008-04]

  • Ported unionfs to the new kernel.
  • Confirmed working on stock 1.5.1 kernel.


Comments (0)

You don't have permission to comment on this page.