Date: Fri, 11 Apr 1997 18:58:27 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: jmb@freefall.freebsd.org (Jonathan M. Bresler) Cc: imp@village.org, jkh@time.cdrom.com, hackers@FreeBSD.ORG Subject: Re: on the subject of changes to -RELEASEs... Message-ID: <199704111658.SAA19544@labinfo.iet.unipi.it> In-Reply-To: <199704111601.JAA25847@freefall.freebsd.org> from "Jonathan M. Bresler" at Apr 11, 97 09:01:06 am
next in thread | previous in thread | raw e-mail | index | archive | help
About readonly root partition and relocation of /etc > > : > how about making these "well known" files such as /etc/resolv.conf, > > : > /etc/host.conf and other stuff symlinks into /var/etc ? This is > > Does somebody have a cononical list of these files so that some brave > > soles can begin to experiment? > > > > in the spirit of the discussion > > how about creating HERE documents *inside* sysconfig which create > /etc/resolv.conf, /etc/hosts, /etc/namedb.boot, ...... the idea is neat but only applicable to a limited number of small files I am afraid. And it would be a great problem for large/binary/mutable files to get updated into the sysconfig (which, at that point, would look like a shar file!) > partial list: *passwd*, *db, sendamil*, host*, > named.boot namedb*, aliases, XF86Config, > adduser.conf, make.conf, fstab, dm.conf, daily, > weekly, monthly, rc.local, group,......<ack!> the list is pretty long. Really, I believe the best option is to * symlink /etc into /var/etc * provide a dummy /var/etc in the root partition (that would exist anyways in systems without a separate /var), so that a failure in mounting /var does not prevent the system to come up (possibly standalone); * after mounting root, the kernel tries to mount /var (possibly readonly, such as it is done for root) before giving control to /etc/rc . Failures to mount /var are not considered critical. The location of /var can be: 1. written into the kernel, possibly updated via kernelconfig or other options; 2. acquired using bootp (diskless machines, using the kernel bootp stuff originally submitted by Tor Egge which I patched and resubmitted a few months ago); 3. derived from the kernel by scanning UFS partitions on the same disk where the root fs is located, looking if it was last mounted as /var (it is written in the superblock). To me the above does not look too hard to implement, nor too confusing for people used to the standard location of things. The code for mounting /var is probably the same as for mounting /, with minor changes in the pathnames. As for the three ways for locating the /var partition, all of them require just a few lines of code. Things retain their nice place in /etc except that the whole /etc is now a symlink. All files in /etc are real, not symlinks, so that many utilities (such as those to rebuild password databases etc.) won't complain because of symlinks... Oh, one more thing. In order to have a real readonly root partition, one should probably give the same treatment to /root and /dev, i.e. let them live in /var Comments ? Cheers Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704111658.SAA19544>