On Thu, Mar 06, 2003 at 02:48:08PM -0800, Bob Miller wrote:
> > Could we have a presentation on the boot up process?
> > 
> > I would like to know when and how *everything* gets started.  The
> > point being I would like to understand so that I can remove or add
> > anything at will.
> 
> Which distribution? (-:
> 
> There are minor differences, though we might be able to cover most of
> the major distributions.

Every major distribution uses sysvinit, which means that the basis of init
is the same across in that you have runlevels 0 through 9 and a through c
to play with, all controlled by /etc/inittab which has a very obscure
syntax, but isn't that terribly complex really if you simply accept that
This Is How You Do It(TM).

The devil is in the details - most RPM dists put the rc symlinks in the
same place as Red Hat.  I don't recall where this is offhand.  Debian does
not follow this trend - but they just put them in a different place.

Slackware has opted to instead have each runlevel be a single script which
you edit by hand.  Since package management on Slackware means ./configure
&& make && su -c 'make install', this works well, and is much the same as
how BSD's init works.

Gentoo takes a very interesting approach.  Each defined runlevel in the
inittab runs a script with an argument specifying the NAME of a runlevel.
As with Debian and just about all others save Slackware, the scripts which
can start and stop services live in /etc/init.d.  Most dists provide a
command to actually add/remove/tweak the symlinks used by the init scripts
to know what to do..

Gentoo's is rc-update.  You can rc-update add <scriptname> <runlevel>, for
example rc-update add sshd default will add sshd to the default runlevel,
which is the one Gentoo boots into normally.  The named runlevels are an
interesting feature, however more interesting is that Gentoo's init
scripts contain dependency information to indicate what should happen
before or after it.


I'm of the opinion that this has its advantages, but I would like to the
named runlevels and dependencies integrated with sysvinit to simplify the
configuration and make it a little faster.  Even with the extra work done
by Gentoo's init scripts beyond a run-parts sort of thing, the fact that
Gentoo is compiled for the host tends to result in faster boots and more
secure systems.  How much more?  Well, keep in mind that I do not run any
packet filters on my LAN since I'm behind a firewall:

Interesting ports on galen (192.168.0.121):
(The 1599 ports scanned but not shown below are in state: closed)
Port       State       Service
22/tcp     open        ssh
25/tcp     open        smtp

Now, I had to explicitly add both smtp and ssh to Gentoo.  Here's a pretty
standard Debian box:

Interesting ports on vickery (192.168.0.122):
(The 1596 ports scanned but not shown below are in state: closed)
Port       State       Service
13/tcp     open        daytime
22/tcp     open        ssh
25/tcp     open        smtp
37/tcp     open        time
80/tcp     open        http

You add a package in Debian and if it provides a server, it's a good bet
that server will be started and accessible to the world.  The exceptions
to this are ssh which asks if you want sshd or not and inetd which does
not ask but simply doesn't enable the more useless and easily exploited
services like chargen and echo.  In fact, I didn't even KNOW vickery ran a
publicly accessible http server, it seems to have been pulled in by a task
package.  Having to explicitly enable things is better I think.

-- 
Joseph Carter <[EMAIL PROTECTED]>                <-- That boy needs therapy
 
I never thought that I'd see the day where Netscape is free software and
X11 is proprietary.  We live in interesting times.
        -- Matt Kimball

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to