~  CHAPTER 7:    BOOTING AND SHUTTING DOWN  ~

 

 

As operating systems have become more complex, the process of starting up and shutting down

has become more comprehensive.  Anyone who has undergone the transition from the straight

DOS-based system to a Windows-2000 based system has experienced this transition firsthand.

 

LILO

 

Lilo short for Linux Loader, is a boot manager.  It allows you to boot multiple operating systems,

provided each system exists on its own partition.

Under PC-based systems, the entire boot partition must also exist beneath the 1024-cylinder

boundary.

 

Configuring LILO

 

The LILO configuration file is /etc/lilo.conf.  In most cases, you won’t need to modify the file in

any significant way.

The timeout= 50 command tells LILO to wait for 50 deciseconds (5 seconds) before selecting

the default boot image and starting the boot process.  Therefore 1550 = longertime before boots

up.

 

NOTE: Although DOS and Windows are the most common “other” operating systems in a dual-

boot configuration, they are not the only options you have.  LILO can be used to boot any other

operating system that understands partitions.

 

 

Additional LILO Options

 

In addition to the options discussed above, a number of other options can be placed in the

lilo.conf file.  This section describes the most common options.

 

 

*** See page 153, REVIEW for the EXAM ***

 

Adding a New Kernel to Boot

 

Version 2.4.5-15  is split up into 3 sections.  The middle one or the second 4 is the one to take

notice of.  If this is an even number the Kernel is stable or example 2.4 will be stable.  If it was

.5 (odd #, it is experimental)

Running LILO

 

 

 

======================================================================

 

linux7.html                                                      PAGE 2                                                      2002/07/16

 

 

 

Now that you are familiar with your /etc/lilo.conf file, it’s time to actually run the LILO boot

manager program and let it do its important work.  Usually this is a relatively uneventful process.

 

·        [root@ford^/boot]#^lilo

·        Added linux ^*

·        Added dos

 

 

The Steps of Booting

 

Kernel Loading.  Once LILO has started and you have selected Linux as the operating system

o boot, the very first thing to get loaded is the kernel.  Keep in mind that no operating system

exists in memory at this point, and PCs have no easy way to access all of their memory.

 

Kernel Execution.  With the kernel in memory, it can begin executing.  At the very minimum,

the kernel must have enough code to set up its virtual memory subsystem and root file system.

 

The init PROCESS.  The init process is the first non-kernel process that is started, and therefore

it always gets the process ID number of 1. init reads it configuration file, /etc/inittab, and

determines the runlevel where it should start.

 

The runlevel values are as follows:

 

0          Halt the system

1          Enter single-user mode (no networking is enabled)

2          Multiuser mode, but without NFS

3          Full multiuser mode (normal operation)

4          Unused

5          Same as runlevel 3, except using an X-Windows login   

            rather than a text-based login.

6          Reboot the system.

 

 

Writing your Own rc Script

 

You can enter K = Kill

You can enter S = Start

All services end with the letter d = daemon  (eg) named

 

 

 

 

======================================================================

 

linux7.html                                                      PAGE 3                                                      2002/07/16

 

 

 

Enabling and Disabling Services

 

At times, you may find that you simply don’t need a particular service to be started at boot

time.  This is especially true if you are considering Linux as a replacement for a Windows

NT File and Print server.

 

As described in the preceding sections, you can cause a service not be started by simply

renaming the symbolic link in a particular runlevel directory; rename it to start with a K

instead of an S.

 

While getting your feet wet in the process, however, you may find the graphical interface,

ksysv, easier to deal with.  Although it was designed for use with the KDE environment, it

will work with the default installed GNOME environment under Red Hat Linux 6.0

This service is not available on version Linux 7.1, only 7.3.

 

 

Odds and Ends of booting and Shutting Down

 

Starting up and shutting down a Linux server is always troubling.  This is because typical

Linux server run for very long periods of time without needing to reboot and thus, when

they do need a reboot, something bad has usually happened.

Luckily, Linux can self-recover. 

 

 

fsck!

 

The File System Check (fsck) tool is automatically run on every boot.  Its purpose is similar

to that of Windows’ Scandisk:  to check and repair any damage on the file system before

continuing the boot process.  Because of its critical nature, fsck is traditionally placed very

early in the boot sequence.

 

 

“I Only See ‘LI” When I Boot!  What Happened?”

 

This is one of the more aggravating situations because it seems like you did everything right –

what the heck happened?  Thankfully, LILO makes an effort to tell us where the problem is

based on the number of characters it prints of the “LILO” string.

The most common of these errors is when LILO only prints the first two characters of the

string (“LI”) and then stops.  When this happens, it is usually the case that the entire boot

partition does not exist in the first 1024 cylinders.  Unfortunately, that means having to

repartition your disk and reinstalling Linux.

As you are installing Linux again, be sure that the first partition you select to boot from exists

completely below the 1024-cylinder mark.  This is due to a limitation in LILO that has been

corrected in newer versions but has not been widely made available in new Linux distributions

as Red Hat.

 

 

 

======================================================================

 

linux7.html                                                      PAGE 4                                                      2002/07/16

 

 

 

Booting into Single-User (“Recovery”) Mode

 

Under Windows, the concept of “Recovery Mode” was borrowed from a long time UNIX

feature of booting into single-user mode.

To boot into single-user mode, you must be at the lilo: prompt that is presented to you at boot

time.You will find that most services will not be running at this time.

 

 

SUMMARY:

 

operating systems as well, most notably the many variants of Windows.