Subject: Re: how to get to single-user mode?
To: None <perry@piermont.com>
From: James Wetterau <jwjr@name.net>
List: netbsd-help
Date: 11/23/1998 14:41:25
"Perry E. Metzger" says:
> 
> James Wetterau writes:
> > I was unable to find out how to bring a running system down to single
> > user mode cleanly in the man pages or FAQ's, other than the suggestion
> > that I:
> > 
> > kill -s TERM 1
> > 
> > from the init(8) man pages.  
> 
> That should indeed work, as should using shutdown(8) with the proper
> flags.
> 
> > I tried this last night after patching my kernel and it didn't seem to
> > work.  The system simply stopped responding to the keyboard entirely.
> > I waited for about 45 seconds and then reset my machine.
> 
> Hmmm....
> 
> 1) Were you running X at the time?

Yes.

> 2) You may have had to wait longer than you expected.

Yeah, it occurred to me later that maybe I should have just given the
system more time.  I was a little nervous patching the kernel for the
first time since installation, perhaps a bit too quick with the reset
button.  Other than that minor hiccough it went really well, actually.
I'll try sending init a sigterm later and waiting a little longer.
Maybe I was just too impatient.

....
> > So, I'm wondering, what's the right way, if there is one, to take the
> > machine down to single-user mode?
> 
> you did the right thing already with init(8) -- or there's shutdown(8) 
> as I mentioned.
...

Thanks, I'll try again later then.

>There's nothing wrong with doing it that way, although I don't see why 
>one would particularly want to. NetBSD administration isn't
>particularly different from SunOS or 4.4BSD administration in most of
>these particular respects, btw.

I was rather slavishly following the Nemeth, et al. kernel config
recpipe since I have found the book to be practically an infallible
guide to matters of UNIX system care and feeding.  I realized later
the probable reason they recommended fsck from single user mode is to
make sure that you are the only logged in user, and thus no one else
could be mucking with the filesystems!  (The text didn't explain the
reasoning.)  So it was indeed an unnecessary precaution in my case.

Regards,
James