[comp.unix.questions] umount, and SunOS 3.X

chris@mimsy.UUCP (Chris Torek) (09/09/88)

In article <520@cra2.apctrc.UUCP> zjat02@apctrc.UUCP (Jon A. Tankersley)
writes:
>rc.boot trashes /etc/mtab before running /etc/umount -at nfs.  This leaves
>potential garbage on remote systems /etc/rmtab (remote mtab).

It does more than just that.  rc.boot is always run, even on a single-
user boot.  If your root file system gets corrupted---and as most of us
know, anything that *can* go wrong *will* go wrong (someone at Sun
seems to have forgotten)---the code that clobbers /etc/mtab will cause
a continuous series of crashes and auto-reboots.  The only way to
recover is to boot from another machine, or from the distribution
tapes.  But if this is the first machine on your network, or the only
one with source . . . ?  (Praise to Aule for mini-roots.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris

david@elroy.Jpl.Nasa.Gov (David Robinson) (09/09/88)

In article <13448@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes:
< In article <520@cra2.apctrc.UUCP> zjat02@apctrc.UUCP (Jon A. Tankersley)
< writes:
< >rc.boot trashes /etc/mtab before running /etc/umount -at nfs.  This leaves
< >potential garbage on remote systems /etc/rmtab (remote mtab).
< 
< It does more than just that.  rc.boot is always run, even on a single-
< user boot.  If your root file system gets corrupted---and as most of us
< know, anything that *can* go wrong *will* go wrong (someone at Sun
< seems to have forgotten)---the code that clobbers /etc/mtab will cause
< a continuous series of crashes and auto-reboots.  The only way to
< recover is to boot from another machine, or from the distribution
< tapes.  But if this is the first machine on your network, or the only
< one with source . . . ?  (Praise to Aule for mini-roots.)

Or you could use the totally undocumented "-b" option to cause the
Sun to boot without running /etc/rc.boot and hope you are not
too corrupted.

-- 
	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!

zap@nada.kth.se (Svante Lindahl) (09/11/88)

In article <9192@elroy.Jpl.Nasa.Gov> david@elroy.Jpl.Nasa.Gov (David Robinson) writes:
>In article <13448@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes:
>< It does more than just that.  rc.boot is always run, even on a single-
>< user boot.
[....]
>Or you could use the totally undocumented "-b" option to cause the
>Sun to boot without running /etc/rc.boot and hope you are not
>too corrupted.

-b is documented. Take a look at boot(8s) and init(8).
The documentation is however incorrect. boot(8s) claims:

          -b   Pass the -b flag through the kernel to init(8)  to
               skip execution of the rc.local script.

which is not very likely, since rc.local is executed by /etc/rc and not
directly by init.

init(8) got it right though:

     		 It normally runs the sequence of commands in the
     script /etc/rc.boot (see rc(8)) to check  the  file  system.
     If passed the -b flag from the boot program, init skips this
     step.

I have not tried this. All this applies to SunOS 3.[45], I have no
idea about 4.0.

-- 
Svante Lindahl		Front Capital Systems		zap@front.se