Re: SysVinit prob... now runlevel question
On Mon, Sep 04, 2000 at 12:25:57AM -0400, Mark Simos wrote:
> As I understand it, X86 hardware hardly ever uses anything but two levels. I know sun
> hardware actually makes significant use of the runlevels, but I am made to understand
> that nobody ever really bothered to implement any more than two different runlevels.
> (I think this is similar to windows progs running in user or kernel mode (ring 0 or
> ring [2?] of x86 processors)
> does anybody have anything besides hearsay to confirm or deny this?
SysV run levels have precisely nothing to do with hardware or things
like 'kernel mode' and ring 0.
Runlevels are a SystemV 'enchancement' over the older method (still used
by Slackware as well as The BSD's, last I checked) of having just one
known boot state.
The older method is "run a script on boot that starts everything ... it
may want to exec /etc/rc.local to allow local changes. on shutdown run
a similar script, though that's usually just the usual kill, kill -9,
SysV run levels allow for more flexibility -- on "most" Linux systems
(ie, RH, SuSE, Caldera and even Slack, which does it via inittab), one
runlevel is differentiated from the others because X starts.
Solaris does use runlevels a bit differently, but not vastly different:
on Solaris, run level 2 is for "things brought up when we want to play
nice on the network but aren't fully awake". So the "clienty" things
usually go in rc2.d (such as nfs.client) while the "serverish" things
(like nfs.server). From 'man init' on Slugaris:
2 Put the system in multi-user mode. All multi-user
environment terminal processes and daemons are
spawned. This state is commonly referred to as
the multi-user state.
3 Extend multi-user mode by making local resources
available over the network.
4 Is available to be defined as an alternative
multi-user environment configuration. It is not
necessary for system operation and is usually not
Does Solaris really distinguish greatly? Nope... the main difference on
my Suns is that rc3.d has nfs.server in it.
Unlike RH or other "popular" distributions, Debian does -not-
distinguish between the useful run levels (as opposed to the special
ones like on-the-way-up-or-down ones). Instead, it leaves the choice of
the differences to be up to the local administrator.
Where Solaris has deigned a "put things in this way" ruleset like that
above, with Debian you're encouraged to use the run levels any way you
see fit. Perhaps you'd do something like make level 4 a "backup" mode,
which is almost like single user but allows for some common services
like basic networking and sshd so that you have a relatively quiet file
system for a nice snapshot without forcing console access. Or maybe you
want to have an easy way to swap between an X config at 1024x768 or
640x480 so you can use that external video-out connectoer for a
projection display.... what you do with it is up to you.
It has nothing to do with hardware: Debian run levels are identical on
X86, SPARC, Alpha and any other port .... and Solaris run levels are
identical on X86 and SPARC.
Brian Moore | Of course vi is God's editor.
Sysadmin, C/Perl Hacker | If He used Emacs, He'd still be waiting
Usenet Vandal | for it to load on the seventh day.
Netscum, Bane of Elves.