UNIX System Administration Handbook - Evi Nemeth [28]
The config files in /etc/rc.config.d can be rather confusing, although they are generally well commented. Table 2.4 gives a short explanation of some of the more commonly modified files.
Table 2.4 Commonly modified HP-UX config files in /etc/rc.config.d
a. See nettl(1M), nettlconf(1M), and nettlgen.conf(4) for more information.
For most of these files, the default values are usually OK. The most common files that you might need to touch are probably netconf, netdaemons, and perhaps nddconf.
Red Hat startup scripts
Startup scripts are one of the things that distinguish Linux distributions from each other. Debian uses startup scripts that are very similar to Solaris’s, and Slackware uses scripts that are similar to FreeBSD’s. Red Hat uses a hybrid of the SystemV and BSD systems, with a few twists thrown in just to make life difficult for everyone.
Red Hat’s scripts are a complicated mess; they contain many comments such as
# stupid hack, but it should work
and
# this is broken!
Red Hat’s init is fundamentally of the SysV ilk. At each run level, init invokes the script /etc/rc.d/rc with the current run level as an argument. /etc/rc.d/rc usually runs in “normal” mode, in which it just does its thing, but it can also run in “confirmation” mode, in which it asks you before it runs each individual startup script. Use the chkconfig command to manage the links in the run-level directories.
Red Hat also has an rc.local script much like that found on FreeBSD. rc.local is the last script run as part of the startup process. It’s best to avoid adding your own customizations to rc.local; use the SystemV-style facilities instead.
Here’s an example of a Red Hat startup session:
[kernel information]
INIT: version 2.77 booting
Welcome to Red Hat Linux
Press 'I' to enter interactive startup.
Mounting proc filesystem [ OK ]
Setting clock (utc): Fri Mar 10 07:16:41 MST 2000 [ OK ]
Loading default keymap [ OK ]
Activating swap partitions [ OK ]
...
Once you see the “Welcome to Red Hat Linux” message, you can press the ‘i’ key to enter confirmation mode. Unfortunately, Red Hat gives you no confirmation that you have pressed the right key. It blithely continues to mount local filesystems, activate swap partitions, load keymaps, and locate its kernel modules. Only after it switches to run level 3 will it actually start to prompt you for confirmation:
Welcome to Red Hat Linux
Press 'I' to enter interactive startup.
Mounting proc filesystem [ OK ]
Setting clock (utc): Fri Mar 10 07:16:41 MST 2000 [ OK ]
Loading default keymap [ OK ]
Activating swap partitions [ OK ]
Setting hostname redhat.synack.net [ OK ]
Checking root filesystem
/dev/hda1: clean, 73355/191616 files, 214536/383032 blocks [ OK ]
Remounting root filesystem in read-write mode [ OK ]
Finding module dependencies [ OK ]
Checking filesystems [ OK ]
Mounting local filesystems [ OK ]
Turning on user and group quotas for local filesystems [ OK ]
Enabling swap space [ OK ]
INIT: Entering runlevel: 3
Entering interactive startup
Start service kudzu (Y)es/(N)o/(C)ontinue? [Y]
Interactive startup and single-user mode both begin at the same spot in the booting process. When the startup process is so broken that you cannot reach this point safely, you can use a rescue floppy to boot.
You can also pass the argument init=/bin/sh to LILO to trick it into running a single-user shell before init even starts.4 If you take this latter tack, you will have to do all the startup housekeeping by hand, including manually fscking and mounting the local filesystems.
Most configuration of Red Hat’s boot process should be achieved through manipulation of the config files in /etc/sysconfig. These files are similar in concept and execution to those found in /etc/rc.config.d in HP-UX, though there are fewer files and more options in each file. Table 2.5 summarizes the function of the items in the /etc/sysconfig directory.
Table 2.5 Files and subdirectories of Red Hat’s /etc/sysconfig directory
Several of these items merit additional