SlideShare ist ein Scribd-Unternehmen logo
1 von 20
INSIGHT

           INTO

“LINUX BOOTING PROCESS”

               By,
       Hardeep Singh Bhurji

                              1
BOOTING

In the early days, bootstrapping a computer meant
feeding a paper tape containing a boot program or
manually loading a boot program using the front panel
address/data/control switches. Today's computers are
equipped with facilities to simplify the boot process, but
that doesn't necessarily make it simple.


                                                        2
LINUX BOOT PROCESS




                     3
BIOS
When a system is first booted, or is reset, the processor executes code at a well-
known location. In a personal computer (PC), this location is in the basic input/output
system (BIOS), which is stored in flash memory on the motherboard.

The central processing unit (CPU) in an embedded system invokes the reset vector to
start a program at a known address in flash/ROM.

The computer begins the boot sequence by resetting the CPU. This sets several
registers to fixed values and then executes the code found at a specific address. This
address is mapped in hardware to a ROM chip that contains the BIOS.

Your BIOS will usually provide you with a way to tell it about the different hardware
that is attached. These settings are stored in the CMOS

The BIOS provides a number of routines and services that are mostly useless to the
Linux kernel. A large part of the BIOS exists to support legacy systems like DOS.
There is an obvious advantage here to eliminating this excess code and the
LinuxBIOS project shows just how much advantage there is

                                                                                     4
There are basically four things the BIOS does at this point.


 The Power On Self Test, or POST routine runs to find certain hardware
  and to test that the hardware is working at a basic level.

 Hardware devices are initialized. PCI devices need to be given
  IRQs, input/output addresses and a table of these devices is then displayed
  on-screen.

 The BIOS must search for an operating system on the various media that
  is supported. This usually occurs by searching for a boot sector on the
  devices that are specified in the CMOS.

 Once a valid boot sector has been found, it is copied into RAM and then
  executed.


                                                                                5
BOOT SECTORS
Stage 1 Bootloader:

A hard disk can have a boot sector in the first sector of the drive (which is known
as the Main Boot Record) or in the first sector of a primary partition.

The primary boot loader that resides in the MBR is a 512-byte image containing
both program code and a small partition table .The first 446 bytes are the primary
boot loader, which contains both executable code and error message text. The next
sixty-four bytes are the partition table, which contains a record for each of four
partitions (sixteen bytes each). The MBR ends with two bytes that are defined as
the magic number (0xAA55). The magic number serves as a validation check of
the MBR.


                                                                                6
7
STAGE 2 BOOTLOADER
The secondary, or second-stage, boot loader could be more aptly called the kernel loader.
The task at this stage is to load the Linux kernel and optional initial RAM disk.
The first- and second-stage boot loaders combined are called Linux Loader (LILO)

LILO is too large to fit into a single sector, so it is loaded in stages. It's progress can be
tracked by the letters it prints on the screen. The first stage loader is what is found in the
boot sector. It simply prints out an "L" and then loads the second stage loader. Once the
second stage loader has been loaded, LILO prints an "I" and then executes the second
stage. The second stage loader prints an "L" and then attempts to read a map file from
disk. This map file tells LILO what operating systems are available. The map file is
created when the 'lilo' command is executed at the command prompt or when one installs
Linux. If the map file loads properly and is not corrupt, LILO prints out an "O", showing
that it has successfully loaded.

Disadvantage : When LILO is told to boot a Linux kernel it reads it directly from the
disk. It knows the kernels location because of information found in the map file. Because
LILO requires this map file to point to a hard-coded location on the hard drive, as soon as
one moves the kernel or the disk geometry changes, LILO needs to be run to generate a
new map file.
                                                                                            8
GRUB BOOT LOADER
The GRand Unified Bootloader, otherwise known as 'GRUB', was written to address
the need for a standard method of booting an operating system. This standard is
known as the "Multiboot Specification" and GRUB is capable of booting a
compatible kernel.
Instead of using raw sectors on the disk, as LILO does, GRUB can load a Linux
kernel from an ext2 or ext3 file system.

GRUB also boots in stages due to it's size. Stage 1 is what is present in the main boot
record and merely loads the next stage. Stage 1.5 is also quite small, but is able to
understand filesystems. Depending what filesystem contains the Stage 2 loader, a different
Stage 1.5 is used.




                                                                                        9
GRUB BOOT LOADER
Stage 2 is the meat of the loader and contains many features and options that can be
explored. Because GRUB understands partitions and filesystems, it can load a kernel
that it wasn't told about previously. No map file is necessary and GRUB does not need
to be re-run after installing a new kernel.

Examples include reiserfs_stage1_5 (to load from a Reiser journaling file system) or
e2fs_stage1_5 (to load from an ext2 or ext3 file system). When the stage 1.5 boot
loader is loaded and running, the stage 2 boot loader can be loaded.

With stage 2 loaded, GRUB can, upon request, display a list of available kernels
(defined in /etc/grub.conf, with soft links from /etc/grub/menu.lst and /etc/grub.conf).

You can select a kernel and even amend it with additional kernel parameters.
Optionally, you can use a command-line shell for greater manual control over the
boot process.



                                                                                       10
KERNEL
Many Linux distributions are shipping default kernels that support as much
hardware as possible. In the past this has meant that the kernel image would be
huge, containing support for as many bootable devices as possible. They were
unable to make the kernel completely modular because sometimes these
modules would be needed to mount the filesystem that contained the module

The solution was to have the kernel load an initial RAM disk image, also
known as an 'initrd' image, that contained many of the modules that would be
needed to boot. Most of these modules will be SCSI controller drivers and
support for various filesystems.

At this point, the BIOS has selected the boot device and it's boot sector has
been loaded. The boot manager nows loads the kernel image and possibly an
initial RAM disk image. Once loaded into RAM, the kernel is executed and the
setup code runs.


                                                                             11
KERNEL
The kernel must initialize any devices the system has. Even devices that have been
initialized by the BIOS must be reinitialized. This provides portability and robustness by
ensuring that each system has been initialized in a similar fashion, independent of the
BIOS.

The next step that is performed by the setup code is switching the CPU from Real Mode
to Protected Mode. Once in Protected Mode, privilege levels are assigned to running
processes. This allows the operating system to be protected from normal user programs.

The setup code now loads the compressed kernel and calls the decompress_kernel()
function. It is at this point that you will see the "Uncompressing Linux..." message
printed on the screen.

The kernel will now begin printing a large number of messages on the screen as it
initializes the scheduler, irqs, console, hardware, etc. This is done in the start_kernel()
function and nearly every kernel component is initialized by this function.
The kernel_thread() function is called next to start init. The kernel goes into an idle
loop and becomes an idle thread with process ID 0.

                                                                                        12
KERNEL
When the bzImage (for an i386 image) is invoked, you begin at
./arch/i386/boot/head.S in the start assembly routine . This routine does some
basic hardware setup and invokes the startup_32 routine in
./arch/i386/boot/compressed/head.S. This routine sets up a basic environment
(stack, etc.) and clears the Block Started by Symbol (BSS). The kernel is then
decompressed through a call to a C function called decompress_kernel (located
in ./arch/i386/boot/compressed/misc.c). When the kernel is decompressed into
memory, it is called. This is yet another startup_32 function, but this function is
in ./arch/i386/kernel/head.S.

In the new startup_32 function (also called the swapper or process 0), the page
tables are initialized and memory paging is enabled. The type of CPU is detected
along with any optional floating-point unit (FPU) and stored away for later use.
The start_kernel function is then invoked (init/main.c).


                                                                               13
14
During the boot of the kernel, the initial-RAM disk (initrd) that was loaded
into memory by the stage 2 boot loader is copied into RAM and mounted.
This initrd serves as a temporary root file system in RAM and allows the
kernel to fully boot without having to mount any physical disks.

Since the necessary modules needed to interface with peripherals can be part
of the initrd, the kernel can be very small, but still support a large number of
possible hardware configurations.

After the kernel is booted, the root file system is pivoted (via pivot_root)
where the initrd root file system is unmounted and the real root file system is
mounted.




                                                                               15
INIT
The first program that is run under the kernel is init. This program is always
process 1. The Linux kernel can be told which program to use as init by
passing the "init=" boot parameter. If this parameter is not specified, then
the kernel will try to execute '/sbin/init', '/etc/init', '/bin/init' or '/bin/sh' in
that order. If none of these exist, then the kernel will panic.

There are alternatives to using the init included with your system. You can
actually place any executable in place of init. If one was building an
embedded system, they could replace init with a program written in C that
would run faster and could be streamlined for the system. The script based
startup used by most systems is much easier to use, though, because of how
easy it is to make changes.




                                                                                 16
INIT
Most systems use System V init. This system starts by running the init program. The
init program reads it's configuration from the 'inittab' file that is located in the 'etc'
directory. This file is where runlevels come into existence. By editing this file, one
could make their system use only three runlevels or could add some if they wished.

The main settings that are necessary are the specifying of the default runlevel. There
is also a line specifying a script to run before all the others, like setting up localnet
and mounting filesystems.
Many of the entries are also specified with 'respawn'. This parameter tells init to
continually execute this program whenever the previous one exits. When one logs out,
init respawns the getty process to allow another login.




                                                                                         17
RUN LEVEL SCRIPTS
Linux generally has eight runlevels. Runlevel 0,1,6 and S are reserved for
specific functions.

No scripts are run when entering runlevel S. It is for this reason that runlevel S
is not meant to be entered directly with an already running system.

At this point init is running and a default runlevel has been specified. The initial
sysinit script has been run which has done things like setup networking, set the
time, check filesystems and then mount them. A swap file will be mounted at
this point as well. init now calls the script for the default runlevel.

This script and pretty much all the other boot scripts, are located in '/etc/init.d'.
Each runlevel is given a directory to hold scripts for that runlevel and these
directories are labeled rc0.d, rc1.d, rc2.d up to rc6.d. But having a copy of
every script in each runlevel would be an administrative nightmare for
maintaining, so these directories contain symbolic links that point to the real
scripts. The real scripts are located in the '/etc/init.d' directory.

                                                                                   18
FINISHING UP

Once init finishes with the startup scripts, it runs a getty process on each
terminal specified in inittab. Getty is what you see when you are logging in.
Once you enter your username, the getty process runs login, which in turn
asks for your password.




                                                                            19
THANKS


         20

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!
 
Booting
BootingBooting
Booting
 
Kernel Module Programming
Kernel Module ProgrammingKernel Module Programming
Kernel Module Programming
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKB
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Bootloaders
BootloadersBootloaders
Bootloaders
 
U boot-boot-flow
U boot-boot-flowU boot-boot-flow
U boot-boot-flow
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting process
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Linux startup
Linux startupLinux startup
Linux startup
 
linux device driver
linux device driverlinux device driver
linux device driver
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
 
Kernel module programming
Kernel module programmingKernel module programming
Kernel module programming
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Tour
 
Booting process by Amar singh
Booting process by Amar singhBooting process by Amar singh
Booting process by Amar singh
 

Ähnlich wie An Insight into the Linux Booting Process

Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloadingArpita Gupta
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting ProcessMike Wang
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in LinuxSiddhesh Palkar
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processsagarpdalvi
 
linux boot process ,kernal and file system
linux boot process ,kernal and file systemlinux boot process ,kernal and file system
linux boot process ,kernal and file systempethkarakash3898
 
3996234.ppt
3996234.ppt3996234.ppt
3996234.pptKdpKumar
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processTeja Bheemanapally
 
Linux boot process
Linux boot processLinux boot process
Linux boot processbrusnigin
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explainedLinuxConcept
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System AdministrationSreenatha Reddy K R
 

Ähnlich wie An Insight into the Linux Booting Process (20)

Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting Process
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in Linux
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
linux boot process ,kernal and file system
linux boot process ,kernal and file systemlinux boot process ,kernal and file system
linux boot process ,kernal and file system
 
3996234.ppt
3996234.ppt3996234.ppt
3996234.ppt
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
 
Ch04
Ch04Ch04
Ch04
 
Booting
BootingBooting
Booting
 
Booting
BootingBooting
Booting
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Linux booting sequence
Linux booting sequenceLinux booting sequence
Linux booting sequence
 

An Insight into the Linux Booting Process

  • 1. INSIGHT INTO “LINUX BOOTING PROCESS” By, Hardeep Singh Bhurji 1
  • 2. BOOTING In the early days, bootstrapping a computer meant feeding a paper tape containing a boot program or manually loading a boot program using the front panel address/data/control switches. Today's computers are equipped with facilities to simplify the boot process, but that doesn't necessarily make it simple. 2
  • 4. BIOS When a system is first booted, or is reset, the processor executes code at a well- known location. In a personal computer (PC), this location is in the basic input/output system (BIOS), which is stored in flash memory on the motherboard. The central processing unit (CPU) in an embedded system invokes the reset vector to start a program at a known address in flash/ROM. The computer begins the boot sequence by resetting the CPU. This sets several registers to fixed values and then executes the code found at a specific address. This address is mapped in hardware to a ROM chip that contains the BIOS. Your BIOS will usually provide you with a way to tell it about the different hardware that is attached. These settings are stored in the CMOS The BIOS provides a number of routines and services that are mostly useless to the Linux kernel. A large part of the BIOS exists to support legacy systems like DOS. There is an obvious advantage here to eliminating this excess code and the LinuxBIOS project shows just how much advantage there is 4
  • 5. There are basically four things the BIOS does at this point.  The Power On Self Test, or POST routine runs to find certain hardware and to test that the hardware is working at a basic level.  Hardware devices are initialized. PCI devices need to be given IRQs, input/output addresses and a table of these devices is then displayed on-screen.  The BIOS must search for an operating system on the various media that is supported. This usually occurs by searching for a boot sector on the devices that are specified in the CMOS.  Once a valid boot sector has been found, it is copied into RAM and then executed. 5
  • 6. BOOT SECTORS Stage 1 Bootloader: A hard disk can have a boot sector in the first sector of the drive (which is known as the Main Boot Record) or in the first sector of a primary partition. The primary boot loader that resides in the MBR is a 512-byte image containing both program code and a small partition table .The first 446 bytes are the primary boot loader, which contains both executable code and error message text. The next sixty-four bytes are the partition table, which contains a record for each of four partitions (sixteen bytes each). The MBR ends with two bytes that are defined as the magic number (0xAA55). The magic number serves as a validation check of the MBR. 6
  • 7. 7
  • 8. STAGE 2 BOOTLOADER The secondary, or second-stage, boot loader could be more aptly called the kernel loader. The task at this stage is to load the Linux kernel and optional initial RAM disk. The first- and second-stage boot loaders combined are called Linux Loader (LILO) LILO is too large to fit into a single sector, so it is loaded in stages. It's progress can be tracked by the letters it prints on the screen. The first stage loader is what is found in the boot sector. It simply prints out an "L" and then loads the second stage loader. Once the second stage loader has been loaded, LILO prints an "I" and then executes the second stage. The second stage loader prints an "L" and then attempts to read a map file from disk. This map file tells LILO what operating systems are available. The map file is created when the 'lilo' command is executed at the command prompt or when one installs Linux. If the map file loads properly and is not corrupt, LILO prints out an "O", showing that it has successfully loaded. Disadvantage : When LILO is told to boot a Linux kernel it reads it directly from the disk. It knows the kernels location because of information found in the map file. Because LILO requires this map file to point to a hard-coded location on the hard drive, as soon as one moves the kernel or the disk geometry changes, LILO needs to be run to generate a new map file. 8
  • 9. GRUB BOOT LOADER The GRand Unified Bootloader, otherwise known as 'GRUB', was written to address the need for a standard method of booting an operating system. This standard is known as the "Multiboot Specification" and GRUB is capable of booting a compatible kernel. Instead of using raw sectors on the disk, as LILO does, GRUB can load a Linux kernel from an ext2 or ext3 file system. GRUB also boots in stages due to it's size. Stage 1 is what is present in the main boot record and merely loads the next stage. Stage 1.5 is also quite small, but is able to understand filesystems. Depending what filesystem contains the Stage 2 loader, a different Stage 1.5 is used. 9
  • 10. GRUB BOOT LOADER Stage 2 is the meat of the loader and contains many features and options that can be explored. Because GRUB understands partitions and filesystems, it can load a kernel that it wasn't told about previously. No map file is necessary and GRUB does not need to be re-run after installing a new kernel. Examples include reiserfs_stage1_5 (to load from a Reiser journaling file system) or e2fs_stage1_5 (to load from an ext2 or ext3 file system). When the stage 1.5 boot loader is loaded and running, the stage 2 boot loader can be loaded. With stage 2 loaded, GRUB can, upon request, display a list of available kernels (defined in /etc/grub.conf, with soft links from /etc/grub/menu.lst and /etc/grub.conf). You can select a kernel and even amend it with additional kernel parameters. Optionally, you can use a command-line shell for greater manual control over the boot process. 10
  • 11. KERNEL Many Linux distributions are shipping default kernels that support as much hardware as possible. In the past this has meant that the kernel image would be huge, containing support for as many bootable devices as possible. They were unable to make the kernel completely modular because sometimes these modules would be needed to mount the filesystem that contained the module The solution was to have the kernel load an initial RAM disk image, also known as an 'initrd' image, that contained many of the modules that would be needed to boot. Most of these modules will be SCSI controller drivers and support for various filesystems. At this point, the BIOS has selected the boot device and it's boot sector has been loaded. The boot manager nows loads the kernel image and possibly an initial RAM disk image. Once loaded into RAM, the kernel is executed and the setup code runs. 11
  • 12. KERNEL The kernel must initialize any devices the system has. Even devices that have been initialized by the BIOS must be reinitialized. This provides portability and robustness by ensuring that each system has been initialized in a similar fashion, independent of the BIOS. The next step that is performed by the setup code is switching the CPU from Real Mode to Protected Mode. Once in Protected Mode, privilege levels are assigned to running processes. This allows the operating system to be protected from normal user programs. The setup code now loads the compressed kernel and calls the decompress_kernel() function. It is at this point that you will see the "Uncompressing Linux..." message printed on the screen. The kernel will now begin printing a large number of messages on the screen as it initializes the scheduler, irqs, console, hardware, etc. This is done in the start_kernel() function and nearly every kernel component is initialized by this function. The kernel_thread() function is called next to start init. The kernel goes into an idle loop and becomes an idle thread with process ID 0. 12
  • 13. KERNEL When the bzImage (for an i386 image) is invoked, you begin at ./arch/i386/boot/head.S in the start assembly routine . This routine does some basic hardware setup and invokes the startup_32 routine in ./arch/i386/boot/compressed/head.S. This routine sets up a basic environment (stack, etc.) and clears the Block Started by Symbol (BSS). The kernel is then decompressed through a call to a C function called decompress_kernel (located in ./arch/i386/boot/compressed/misc.c). When the kernel is decompressed into memory, it is called. This is yet another startup_32 function, but this function is in ./arch/i386/kernel/head.S. In the new startup_32 function (also called the swapper or process 0), the page tables are initialized and memory paging is enabled. The type of CPU is detected along with any optional floating-point unit (FPU) and stored away for later use. The start_kernel function is then invoked (init/main.c). 13
  • 14. 14
  • 15. During the boot of the kernel, the initial-RAM disk (initrd) that was loaded into memory by the stage 2 boot loader is copied into RAM and mounted. This initrd serves as a temporary root file system in RAM and allows the kernel to fully boot without having to mount any physical disks. Since the necessary modules needed to interface with peripherals can be part of the initrd, the kernel can be very small, but still support a large number of possible hardware configurations. After the kernel is booted, the root file system is pivoted (via pivot_root) where the initrd root file system is unmounted and the real root file system is mounted. 15
  • 16. INIT The first program that is run under the kernel is init. This program is always process 1. The Linux kernel can be told which program to use as init by passing the "init=" boot parameter. If this parameter is not specified, then the kernel will try to execute '/sbin/init', '/etc/init', '/bin/init' or '/bin/sh' in that order. If none of these exist, then the kernel will panic. There are alternatives to using the init included with your system. You can actually place any executable in place of init. If one was building an embedded system, they could replace init with a program written in C that would run faster and could be streamlined for the system. The script based startup used by most systems is much easier to use, though, because of how easy it is to make changes. 16
  • 17. INIT Most systems use System V init. This system starts by running the init program. The init program reads it's configuration from the 'inittab' file that is located in the 'etc' directory. This file is where runlevels come into existence. By editing this file, one could make their system use only three runlevels or could add some if they wished. The main settings that are necessary are the specifying of the default runlevel. There is also a line specifying a script to run before all the others, like setting up localnet and mounting filesystems. Many of the entries are also specified with 'respawn'. This parameter tells init to continually execute this program whenever the previous one exits. When one logs out, init respawns the getty process to allow another login. 17
  • 18. RUN LEVEL SCRIPTS Linux generally has eight runlevels. Runlevel 0,1,6 and S are reserved for specific functions. No scripts are run when entering runlevel S. It is for this reason that runlevel S is not meant to be entered directly with an already running system. At this point init is running and a default runlevel has been specified. The initial sysinit script has been run which has done things like setup networking, set the time, check filesystems and then mount them. A swap file will be mounted at this point as well. init now calls the script for the default runlevel. This script and pretty much all the other boot scripts, are located in '/etc/init.d'. Each runlevel is given a directory to hold scripts for that runlevel and these directories are labeled rc0.d, rc1.d, rc2.d up to rc6.d. But having a copy of every script in each runlevel would be an administrative nightmare for maintaining, so these directories contain symbolic links that point to the real scripts. The real scripts are located in the '/etc/init.d' directory. 18
  • 19. FINISHING UP Once init finishes with the startup scripts, it runs a getty process on each terminal specified in inittab. Getty is what you see when you are logging in. Once you enter your username, the getty process runs login, which in turn asks for your password. 19
  • 20. THANKS 20