matt@oddjob.UChicago.EDU (Java Man) (01/15/88)
In article <22611@hi.unm.edu> kurt@hi.unm.edu (Kurt Zeilenga) writes:
) We use symbolic links from /etc to /usr/etc so that root is "static". Could
) you use them instead of modifying files?
If I were out to set up a r/o root, I'd make a r/o /usr also - there
are even more seldom-modified files there.
In fact, when some disks died around here and I had to turn this
standalone machine into a server quickly, I made a few symlinks and
let the bereaved clients mount my /usr read-only.
________________________________________________________
Matt University matt@oddjob.uchicago.edu
Crawford of Chicago {astrovax,ihnp4}!oddjob!matt
david@elroy.Jpl.Nasa.Gov (David Robinson) (01/19/88)
Having just recently learned of Sun's reorganizing of its disk layout for filesystems in SunOS 4.0, they do allow you to mount both / and /usr as read-only filesystems. The root has been striped of all "dynamic" or machine dependant files. Most of /etc went to either /usr/etc or a seperate directory tree for machine specific stuff. By doing this the root is only 1 megabyte and may be mounted read-only. You could put this into ROM but for other reasons I would hesitate from doing this. As mentioned before, upgrades would be painful. -- David Robinson elroy!david@csvax.caltech.edu ARPA david@elroy.jpl.nasa.gov ARPA {cit-vax,ames}!elroy!david UUCP Disclaimer: No one listens to me anyway!
guy@gorodish.Sun.COM (Guy Harris) (01/19/88)
> Having just recently learned of Sun's reorganizing of its disk layout > for filesystems in SunOS 4.0, they do allow you to mount both / and > /usr as read-only filesystems. The root has been striped of all > "dynamic" or machine dependant files. Most of /etc went to either > /usr/etc or a seperate directory tree for machine specific stuff. By > doing this the root is only 1 megabyte and may be mounted read-only. WRONG. "/usr" may have been stripped of all dynamic stuff; however, much of it got moved *to* the root file system. All of the *programs* in "/etc" went to "/usr/etc"; all of the configuration files stayed in "/etc", and some moved from "/usr/lib" to "/etc" (e.g., "sendmail.cf".) Directories such as "/usr/spool", "/usr/adm", etc. that might want to live on "/" if they don't get too big or that might want to live on their own file system if they *do* get big moved to "/var"; symbolic links have been left in the old places so that references to "/usr/adm/messages", etc. still work. You could, perhaps, arrange to make "/" a read-only file system by making "/etc" and "/var" both refer to some third read-write file system and by changing "/etc/rc.boot" not to make "/" a read-write file system (the kernel mounts it read-only, and only once it's passed "fsck" is it remounted read-write), but I don't think we plan to guarantee this or support it. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com
faustus@ic.Berkeley.EDU (Wayne A. Christopher) (01/19/88)
How can all the programs in /etc be moved to /usr/etc? How can you even mount /usr unless you have /etc/mount? (Or do you put that in /bin?) Wayne
guy@gorodish.Sun.COM (Guy Harris) (01/19/88)
> How can all the programs in /etc be moved to /usr/etc? How can you even > mount /usr unless you have /etc/mount? (Or do you put that in /bin?) 1) Putting it in "/bin" won't help; "/bin" is just a symbolic link to "/usr/bin". 2) You put it in "/single", instead, along with "hostname", "ifconfig", "init", and "sh". That's all you need to get "/usr" mounted. (Yes, you may need "ifconfig", if you're mounting "/usr" over NFS; "hostname" is used to do "ifconfig". Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com
jin@hplabsz.HPL.HP.COM (Tai Jin) (01/20/88)
If the root filesystem is mounted read-only, will pipes continue to work?
idc@cs.hw.ac.uk (Ian Crorie) (01/20/88)
In article <5247@elroy.Jpl.Nasa.Gov> david@elroy.Jpl.Nasa.Gov (David Robinson) writes: >Having just recently learned of Sun's reorganizing of its disk layout >for filesystems in SunOS 4.0, they do allow you to mount both / and >/usr as read-only filesystems. Well I've always thought that *all* file systems should be read only. Think of the performance improvements that would follow, not to mention never having to worry about 100% full /usr/users partitions. (;-)
ron@topaz.rutgers.edu (Ron Natalie) (01/21/88)
Sure, in addition to having rootdev and swapdev defines, one only needs to add pipedev. -Ron
gwyn@brl-smoke.ARPA (Doug Gwyn ) (01/22/88)
In article <1438@hplabsz.HPL.HP.COM> jin@hplabsz.UUCP (Tai Jin) writes: >If the root filesystem is mounted read-only, will pipes continue to work? I assume you mean, once everything else has been taken care of. Pipes are implemented in different ways on different versions of UNIX. The only ones that should have trouble are those where pipes are implemented by ripping off free inodes from the designated "pipe device" (which was always the root device on really old UNIXes, e.g. 6th Edition), only if the pipe device is the same as the root filesystem device. 4BSD systems where pipes are socketpairs and 8th or 9th Edition UNIX where pipes are cross-coupled full-duplex streams (my personal favorite) do not have their pipes directly dependent on the root filesystem being writable.
chris@mimsy.UUCP (Chris Torek) (01/24/88)
[I have redirected followups to comp.unix.wizards.] >>If the root filesystem is mounted read-only, will pipes continue to work? In article <93900011@hcx1> garyb@hcx1.SSD.HARRIS.COM writes: >[Some Unix variants use] a "pipedev" [to define] the filesystem that >will be used for pipe space (inodes and such). The BSD systems I have >seen [these are 4.2BSD and later --Chris] use the kernel socket routines >to implement pipes. I know of no Unix that requires that the root >file system be used for pipe space .... While those systems that have a pipedev, which include all 2BSDs, 3BSD, 4.0BSD, 4.1BSD, V6, V7, 32V, System III, and some System Vs [*], in principle (by the very fact that they provide a pipedev) allow pipes to be stored on a different file system, I suspect any such usage was rare. If you make pipedev != rootdev on such a system, you will not be able to create pipes until the pipe device is mounted. On the other hand, this would reduce the activity on the root, and hence the chance of something untoward occuring there. At any rate, when we ran 4.1BSD, we always had pipedev == rootdev. ----- [*] System V variants would be much easier to name if we just peeled off the `System V' part of the label and left the *real* name showing: `That Vax runs System 2.2 Unix' is more wieldy than `That Vax runs System V Release 2 Version 2 Unix'. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris
rbj@icst-cmr.arpa (Root Boy Jim) (01/26/88)
You could put this into ROM but for other reasons I would hesitate from doing this. As mentioned before, upgrades would be painful. Really. You might break a nail or something. Disclaimer: No one listens to me anyway! Me either. (Root Boy) Jim Cottrell <rbj@icst-cmr.arpa> National Bureau of Standards Flamer's Hotline: (301) 975-5688 Why are these athletic shoe salesmen following me??
allbery@ncoast.UUCP (Brandon Allbery) (01/26/88)
As quoted from <1438@hplabsz.HPL.HP.COM> by jin@hplabsz.HPL.HP.COM (Tai Jin):
+---------------
| If the root filesystem is mounted read-only, will pipes continue to work?
+---------------
I have yet to see a UNIX system where "rootdev" and "pipedev" were forced
to be the same device.
--
Brandon S. Allbery, moderator of comp.sources.misc
{well!hoptoad,uunet!hnsurg3,cbosgd,sun!mandrill}!ncoast!allbery
PS/2: Half a computer. OS/2: Half an operating system for half a computer.
mangler@cit-vax.Caltech.Edu (Don Speck) (01/29/88)
In article <14227@oddjob.UChicago.EDU>, matt@oddjob.UChicago.EDU (Java Man) writes: > If I were out to set up a r/o root, I'd make a r/o /usr also - there > are even more seldom-modified files there. A pair of my vaxen have had a read-only /usr on a dual-ported disk since 1985. It's a pain to update, though; every couple of months they come down to bring their /usr into sync with the vax that has /usr/src. Mounting read-only is the price of dual-porting. I dual-ported it because /usr is 200 MB (/usr/font and /usr/local are HUGE). Don Speck speck@vlsi.caltech.edu {amdahl,ames!elroy}!cit-vax!speck ^^^^ vax with read-only /usr
henry@utzoo.uucp (Henry Spencer) (02/03/88)
> ... If you make pipedev != rootdev on such a > system, you will not be able to create pipes until the pipe device > is mounted... It's trivial to fix things so that the system uses pipedev if and only if it is mounted, and rootdev otherwise. We made pipedev a small RAM disk; the effect on system performance was quite noticeable. -- Those who do not understand Unix are | Henry Spencer @ U of Toronto Zoology condemned to reinvent it, poorly. | {allegra,ihnp4,decvax,utai}!utzoo!henry