I have a folder containing certain files. Is there a way to mount it onto
/, so that the contents of a given directory appear in the corresponding locations in
In my case, the directories contain the files related to an application — it does not have directories like
I tried creating a bind mount in the following manner:
mount --bind ~/applications/firefox /
However, this does not do anything at all. Unlike what has been speculated in the comments, it does not have any adverse effect either.
The motivation for this is that I have a number of custom applications that I want to install cleanly on mission-critical systems. Understandbly, I want to keep the related management to a minimum. I obtain the filesystem layout of the application install with a unionfs-fuse + chroot method, but then I still have to deal with the problem of the applications' files mingling with those of the system. Mounting certain directories onto
/ would help me to keep the filesystem clean.
While this method of installing software may seem perverted, there is a distro named "Porteus" which installs software in exactly this manner (and for the same reasons), however, they are known to use a patched kernel along with aufs. However, I cannot use a custom kernel on the systems.