Chapter 3. Boot Process, Init, and Shutdown
57
If you need to alter the command line arguments to the kernel, see Chapter 4. For information on
changing the runlevel at the GRUB or LILO prompt, see Section 3.5.
Once the second stage boot loader has determined which kernel to boot, it locates the corresponding
kernel binary in the
/boot/
directory. The proper binary is the
/boot/vmlinuz 2.4.x xx
file that
corresponds to the boot loader's settings. Next the boot loader places the appropriate initial RAM
disk image, called an initrd, into memory. The
initrd
is used by the kernel to load any drivers not
compiled into it that are necessary to boot the system. This is particularly important if you have SCSI
hard drives or are using the ext3 file system
1
.
Warning
Do not remove the /initrd/ directory from the file system for any reason. Removing this directory
will cause your system to fail with a kernel panic error message at boot time.
Once the kernel and the initrd image are loaded into memory, the boot loader hands control of the
boot process to the kernel.
3.2.3. The Kernel
When the kernel loads, it immediately initializes and configures the computer's memory. Next it con 
figures the various hardware attached to the system, including all processors and I/O subsystems, as
well as any storage devices. It then looks for the compressed
initrd
image in a predetermined lo 
cation in memory, decompresses it, mounts it, and loads all necessary drivers. Next it initializes file
system related virtual devices, such as LVM or software RAID before unmounting the
initrd
disk
image and freeing up all the memory it once occupied.
After the kernel has initialized all the devices on the system, it creates a root device, mounts the root
partition read only, and frees unused memory.
At this point, with the kernel loaded into memory and operational. However, with no user applications
to give the user the ability to provide meaningful input to the system, not much can be done with it.
To set up the user environment, the kernel starts the
/sbin/init
command.
3.2.4. The
/sbin/init
Program
The
init
program coordinates the rest of the boot process and configures the environment for the
user.
When the
init
command starts, it becomes the parent or grandparent of all of the processes that start
up automatically on a Red Hat Linux system. First, it runs the
/etc/rc.d/rc.sysinit
script, which
sets your environment path, starts swap, checks the file systems, and so on. Basically,
rc.sysinit
takes care of everything that your system needs to have done at system initialization. For example,
most systems use a clock, so on them
rc.sysinit
reads the
/etc/sysconfig/clock
configuration
file to initialize the clock. Another example is if you have special serial port processes which must be
initialized,
rc.sysinit
will execute the
/etc/rc.serial
file.
The
init
command then runs the
/etc/inittab
script, which describes how the system should be
set up in each SysV init runlevel
2
. Among other things, the
/etc/inittab
sets the default runlevel
and dictates that
/sbin/update
should be run whenever it starts a given runlevel
3
.
1. For details on making an initrd, see the section about converting to an ext3 file system in the Official Red
Hat Linux Customization Guide.
2. For more information on SysV init, see Section 3.5. For more about init runlevels, see Section 3.6.
3. The update command is used to flush dirty buffers back to disk.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

tomcat hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved