Subject: Re: Single-user
To: None <port-mac68k@NetBSD.ORG, shortj@leviathan.ele.uri.edu>
From: Ben Cottrell <benco@ucsee.EECS.Berkeley.EDU>
List: port-mac68k
Date: 04/05/1996 17:33:35
Single-user mode is the mode in which the system is when it loads the
kernel into memory. It normally progresses from there to multiuser.
The following things (among others; I'm sure I've left out some) happen in
that transition from single-user to multi-user:
* File systems are checked for consistency--this is a good thing
if one wants to avoid losing data.
* After that step, it is safe to mount the filesystems read/write--
only the root filesystem is initially mounted, and even that is
mounted as read-only.
* The networking is initialized and any NFS volumes necessary are
mounted.
* The databases that cache the information in /etc/passwd are
created.
* Any shared libraries in /usr/lib are found and information about
them is cached, and any extras that the system should know about
are also dealt with.
* The kernel security level is changed to 1, which means that things
like sysctl will not work while in multiuser mode. This is for
security reasons.
* gettys are started on all attached terminals, to allow other
people besides root to log in
All except the last two of these can be done manually (and the last *can* be
done manually, but it's not very pleasant). Look at the file /etc/rc (and the
files and programs that it runs) to find out how.
I don't know in what way your computer fails on that transition--I haven't
been following that discussion :-) You can probably live in single-user
as long as you keep in mind that single-user mode is normally only for dire
system administration emergencies. For example, it's not good to avoid the
filesystem checks, and you won't be able to do much if your filesystems are
read-only. So your first two commands might be "fsck -p" and "mount -a".
Maybe you'd follow that with a "source /etc/netstart" and maybe then you'd
decide to run "exec /bin/csh" to get a nicer shell. Or whatever :-)
X windows... hmm. I see no reason why you shouldn't be able to run that in
single-user (you'd have to do an "ldconfig /usr/X11R6/lib" to get the shared
libraries to load, and in all likelihood a "set path=($path /usr/X11R6/bin)"
assuming you're using csh), but it probably wouldn't be very pleasant. You'd
always be root, for example, unless you used "login" manually. Also keep in
mind that depending on what the actual problem with your machine is that
won't let you go to multi-user, /dev/grf0 or /dev/adb might not be so happy
when driven by X.
Hmm. I guess that's all the solid facts I have... I'm starting to drift into
speculation :-) Good luck!
--
____ -Ben Cottrell (home page http://www.csua.berkeley.edu/~benco/)
\ / Geek 3.0: GCS(M) dpu s:+ a16 C++++ UB++++ P++ L- E+ W++ N++ K+ w-- O++
\/ M+ !V PS++ ?PE Y+ PGP-- t+ 5? X? R tv-- b+++ DI-- D- G+ e h! r% !y+(**)
Tamino on FurryMUCK and YiffNet IRC NetBSD!