Re: Mount as many partitions as possible read only (what do I do with /etc?)
In article <[🔎] 19991006095156.A499@marvin.casa> you write:
>It's trivial to have /usr read-only, but I have problems with the root
>partition:
>
> - It has to contain /etc since it's required at early boot time to run rc
> scripts
> - /etc has to be read-write since you have to be able to change passwords, add
> and remove users, configure samba shares via swat, update adjtime, mtab and
> so on.
>
>What's The Right Way (tm) to have / mounted read-only?
My diskless package (I just uploaded 0.3.2 to master today) does what
you want (but for diskless systems).
It diverts /sbin/init to /sbin/init.orig, and installs a shell script in
place of /sbin/init. This shell script mounts /etc from an NFS server.
The only file that might be required beforehand is /etc/resolv.conf, but
this is not even required if you give the IP address of the NFS server.
Other solutions, such as booting from a ramdisk may also be possible,
but I haven't personally tried this.
--
Brian May <bam@snoopy.apana.org.au>
Reply to: