Debian Admin

Debian/Ubuntu Linux System Administration Tutorials,Howtos,Tips

  • RSS Feed

    subscribe to the Debian Admin RSS feed
  • Sponsors



    • Cheap Web hosting services
  • Categories

  • Meta

  • Support Debian Admin

    Amount $:
    Website(Optional):

  • Sponsors

  • Archives



The Linux Boot Process Explained

Posted by Admin on September 23rd, 2006

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

The beginning of the boot process varies depending on the hardware platform being used. However, once the kernel is found and loaded by the boot loader, the default boot process is identical across all architectures.

The following are the main stages involved in Linux boot process.This process applied debian,ubuntu and most of linux Distributions

BIOS (basic input/output system)

Master Boot Record (MBR)

LILO (Linux Loader ) or GRUB (GRand Unified Bootloader)

Kernel

init

Run Levels

Now we will have a look at each stage in detailed

BIOS

Load boot sector from one of

Floppy

CDROM

Hard drive

The boot order can be changed from within the BIOS. BIOS setup can be entered by pressing a key during boot up. The exact key depends varies, but is often one of Del, F1, F2, or F10.

(DOS) Master Boot Record (MBR)

DOS in the context includes MS-DOS, Win95, and Win98.

BIOS loads and execute the first 512 bytes off the disk (/dev/hda)

Standard DOS MBR will

look for a primary partition (/dev/hda1-4) marked bootable

load and execute first 512 bytes of this partition

can be restored with fdisk /mbr from DOS

LILO

does not understand filesystems

code and kernel image to be loaded is stored as raw disk offsets

uses the BIOS routines to load

Loading sequence

load menu code, typically /boot/boot.b

prompt for (or timeout to default) partition or kernel

for “image=” (ie Linux) option load kernel image

for “other=” (ie DOS) option load first 512 bytes of the partition

Reconfiguring LILO

One minute guide to installing a new kernel

copy kernel image (bzImage) and modules to /boot and /lib/modules

edit /etc/lilo.conf

duplicate image= section, eg:

image=/bzImage-2.4.27

label=27

read-only

man lilo.conf for details.Click here for man page of lilo.conf

run /sbin/lilo

reboot to test

GRUB

Understands file systems

config lives in /boot/grub/menu.lst or /boot/boot/menu.lst

For more information check GRUB man page

Kernel

initialise devices

(optionally loads initrd, see below)

mounts root filesystem

specified by lilo or loadin with root= parameter

kernel prints: VFS: Mounted root (ext2 filesystem) readonly.

runs /sbin/init which is process number 1 (PID=1)

init prints: INIT: version 2.83 booting

can be changed with boot= parameter to lilo, eg boot=/bin/sh can be useful to rescue a system which is having trouble booting.

initrd

Allows setup to be performed before root FS is mounted

lilo or loadlin loads ram disk image

kernel runs /linuxrc

load modules

initialise devices

/linuxrc exits

“real” root is mounted

kernel runs /sbin/init

init

reads /etc/inittab (see man inittab which specifies the scripts below check man page )

Run boot scripts:

debian: run /etc/init.d/rcS which runs:

/etc/rcS.d/S* scripts

/etc/rc.boot/* (depreciated)

run programs specified in /etc/inittab

For more available options check init man page

Run Levels

0 halt

1 single user

2 Full Multi-User mode (default)

3-5 Same as 2

6 Reboot

Default is defined in /etc/inittab, eg:

id:3:initdefault:

The current runlevel can be changed by running /sbin/telinit # where # is the new runlevel, eg typing telinit 6 will reboot.

Run Level programs

Scripts in /etc/rc*.d/* are symlinks to /etc/init.d

Scripts prefixed with S will be started when the runlevel is entered, eg /etc/rc5.d/S99xdm

Scripts prefixed with K will be killed when the runlevel is entered, eg /etc/rc6.d/K20apache

X11 login screen is typically started by one of S99xdm, S99kdm, or S99gdm.

Run programs for specified run level

/etc/inittab lines

1:2345:respawn:/sbin/getty 9600 tty1

Share/Save/Bookmark

Random Posts

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
Rodney's Kontera DynamiContext Plugin plugged in.
adult cam chat free web - adult chat live - adult chat room - adult chat rooms for free - adult incest chat - adult sex chat room - adult sex chat rooms - adult sex chat - adult video live chat - adult webcam chat - adult xxx cams - all sex webcam - amateur lesbian cam - amateur sex webcams - amateur webcam sex - amateur webcam videos - amateur webcam - anal sex on web cam - arabic sex webcam - asian adult webcams - asian porn web cam - asian porn webcam - babes nude webcams - best free sex cams - black adult webcam - black booty cam - black girls on webcams - busty teen webcams - cam amateur gay - cam chat live sex free - cam chat with girls - cam free live sex web - cam free live show - cam gay live web - cam girls chat - cam girls live - cam girls planet - cam live free girls - cams girls nude - cartoon sex webcams - chat free adult - chat girl webcam - chat live nude - chat sex online free - chat xxx free live - completely free sex chat - couple sex webcams - couples sex web cams - cruising for sex chat - cyber sex babe - cyber sex comics - cyber sex for free - cyber sex girl - cyber sex lesbian - cyber sex teens - cyber sex websites - dirty sex webcams - fee webcam sex - female sex cams - free adult porn cams - free adult video chat room - free adult video chat - free adult web cam chat - free adult web cam live - free adult web cam - free adult web cams - free adult webcam porn - free amateur cams - free anal sex webcams - free asian sex web cams - free chat online sex - free chat with cam - free cyber sex sites - free fuck web cam - free gay adult chat - free gay webcam sex - free hardcore porn chat - free hardcore sex web cam - free home web cam - free japanese sex cams - free lesbian porn live - free lesbian sex web cams - free live nude webcams - free live sex web cam - free live video chat room - free live video sex chat - free live web cam chat - free live web cam girl - free nude sex cam chat - free online adult cams - free online porn cams - free online sex webcam - free online web cam chat - free private webcam sex - free sex chat cyber - free sex chat line - free sex chat webcams - free sex nude webcams - free sex on web cam - free sex web cam girls