(stupid?) bind mounting tricks
phil-news-nospam_at_ipal.net
Date: 02/20/05
- Next message: Jim: "2.6.8 kernel/sym53c8xx_2/Symbios 8951U: waste of time?"
- Previous message: phil-news-nospam_at_ipal.net: "Re: Overall forking"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Feb 2005 23:16:56 GMT
I'm wondering if anything is doing anything like this, or thinks it
might be stupid (for some reason that could be clearly explained,
like an impact on common or major software).
What I want to do at system initialization type (probably in an rc
script) is mount all the partition filesystems at special mount points
designated for them, the remount using the "bind" mounting option
specific subdirectories in those filesystems at specific mount points
to construct the traditional standard filesystem tree.
One reason I am looking at doing this is that I would like to mount
all of the following from the _same_ filesystem, in read only mode:
/bin /dev /lib /mnt /opt /sbin /usr
I'm even considering a more radical approach as follows. Mount or
leave the root filesystem in read-only mode. It may or may not even
contain the above directories already. Then create a tmpfs or ramfs
at a temporary mount point, extract a tarball into it, then mount it
(bind mount again), at /etc (hiding the original read-only etc). To
make changes in such a system, the tarball would have to be rebuilt
and the filesystem it lives on temporarily remounted writeable to
store the new tarball.
BTW, don't worry about single user mode. I've already depricated it
on my systems in favor of using a completely separate filesystem as
a "rescue partition".
Something else I am looking into is that I note that the kernel does
mount a "rootfs" which is a specially named ramfs at "/" before it
mounts the intended root filesystem. What I am thinking about is to
make some tweaks in the kernel somehow (I haven't put enough thought
into the best steps yet) so I can end up using that ramfs as is as
the "/" mount point, and mount other filesystems at mount points
other than "/" (possibly configured through the kernel command line).
I'll put on my asbestos suit now.
-- ----------------------------------------------------------------------------- | Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | -----------------------------------------------------------------------------
- Next message: Jim: "2.6.8 kernel/sym53c8xx_2/Symbios 8951U: waste of time?"
- Previous message: phil-news-nospam_at_ipal.net: "Re: Overall forking"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|