jump to navigation

Linux Boot Process August 11, 2005

Posted by Coolguy in Linux.
trackback
  • When a PC is booted it starts running a BIOS program which is a memory resident program on an EEPROM integrated circuit.
  • The BIOS program will eventually try to read the first sector on a booting media such as a hard or floppy drive
  • The boot sector contains a small program that the BIOS will load and attempt to pass run control to
  • This program will attempt to read the operating system from the disk and run it
  • LILO is the program that Linux systems typically use to give users a choice of operating systems to run.
  • It is usually installed in the boot sector which is also called the master boot record
  • If the user chooses to boot Linux, LILO will attempt to load the Linux kernel

Boot process

  • LILO will have a timeout period for the user to press the TAB key. If the user does not press the TAB key before the timeout occurs, LILO will run the default operating system selected when it was installed
  • the user presses the TAB key, LILO will present the user with a choice of systems to boot from based upon the labels and images as set up in the /etc/lilo.conf file that controlled the last LILO install
  • Lines in this file are
  • # Boot up Linux by default:
  • default=Linux
  • image=/boot/vmlinuz
  • label=Linux
  • Since the Linux kernel is installed compressed, containing a small program to de-compress itself, it will uncompress itself.
  • If the kernel recognizes that the system has a video card which supports some special text modes (such as 100 columns by 40 rows), Linux may ask which mode to use
  • The kernel checks the hardware (hard disks, floppies, network adapters, etc), and configures some of its device drivers, while outputting messages about its findings
  • The kernel will try to mount the root filesystem.The location of the filesystem is configurable at compilation time, with the rdev program, or with LILO. The filesystem type is detected automatically.
  • If mounting the root filesystem fails, the kernel will panic and halt the system. The root filesystem is usually mounted read-only so that the filesystem can be checked while it is mounted
  • The kernel starts the program “init” which becomes process number 1. Init will start the rest of the system

The Init Program

  • Kernel will start a program called init, if it finds it
  • The init process reads the file “/etc/inittab” and uses this file to determine how to create processes
  • init is always running and can dynamically do things and run processes based upon various signals

More:

http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlbootproc.html

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: