Mounting Filesystem over existing directory

Sameer Naik sameer.subscriptions at damagehead.com
Wed May 30 06:46:35 UTC 2012


Hello,

I have a rather unusual query.

Consider that i have a readonly filesystem mounted at / and that the
/etc folder consists of some files. Is is possible to mount a ramfs
filesystem at /etc such that the existing files in the /etc partition
are still accessible and any new files written to the /etc partition
are saved in the ramfs (which will be lost upon reboot).

To illustrate the query visually.

$ ls /etc
  fstab mtab

$ (mount ram filesystem at /etc)
$ ls /etc
   fstab mtab

$ touch /etc/file
$ ls /etc
fstab mtab file

$ umount /etc
$ ls /etc
   fstab mtab

I hope this helps you understand my query.

Thanks and Regards
~Sameer


More information about the busybox mailing list