Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Kitty Hooch

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 93 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       The  boot sequence varies in details among systems but can
       be roughly divided to the following  steps:  (i)  hardware
       boot,  (ii) OS loader, (iii) kernel startup, (iv) init and
       inittab, (v) boot scripts.  We will describe each of these
       in more detail below.

       After  power-on  or hard reset, control is given to a pro­
       gram stored on read only memory (normally PROM). In PC  we
       usually call this program the BIOS.

       This  program  normally  makes  a  basic  self-test of the
       machine and accesses non-volatile memory to  read  further
       parameters.  This  memory in the PC is battery-backed CMOS
       memory, so most people refer to it as the  CMOS,  although
       outside  of  the  PC  world,  it  is  usually called nvram
       (non-volatile ram).

       The parameters stored in the nvram vary  between  systems,
       but  as  a  minimum, the hardware boot program should know
       what is the boot device, or which devices to probe as pos­
       sible boot devices.

       Then  the  hardware  boot  stage accesses the boot device,
       loads the OS Loader, which is located on a fixed  position
       on the boot device, and transfers control to it.

       Note:  We  do  not  cover here booting from network. Those
              who want to investigate this subject  may  want  to
              research: DHCP, TFTP, PXE, Etherboot.

   OS Loader
       In PC, the OS Loader is located in the first sector of the
       boot device - this is the MBR (Master Boot Record).

       In most systems, this primary loader is very  limited  due
       to  various  constraints. Even on non-PC systems there are
       some limitations  to  the  size  and  complexity  of  this
       loader,  but  the size limitation of the PC MBR (512 bytes
       including the partition table) makes it almost  impossible
       to squeeze a full OS Loader into it.

       Therefore,  most operating systems make the primary loader
       call a secondary OS loader which may be located on a spec­
       ified disk partition.

       In  Linux  the  OS  loader is normally lilo(8) or grub(8).
       Both of them  may  install  either  as  secondary  loaders
       When the kernel is loaded, it initializes the devices (via
       their drivers), starts the swapper (it is a  "kernel  pro­
       cess",  called kswapd in modern Linux kernels), and mounts
       the root file system (/).

       Some of the parameters that may be passed  to  the  kernel
       relate  to  these  activities  (e.g:  You can override the
       default root file  system).  For  further  information  on
       Linux kernel parameters read bootparam(7).

       Only then the kernel creates the first (user land) process
       which is numbered 1. This  process  executes  the  program
       /sbin/init, passing any parameters that weren't handled by
       the kernel already.

   init and inittab
       When  init  starts  it  reads  /etc/inittab  for   further
       instructions.   This  file  defines  what should be run in
       different run-levels.

       This gives the system  administrator  an  easy  management
       scheme,  where  each run-level is associated with a set of
       services (e.g: S is single-user, on 2  most  network  ser­
       vices  start, etc.). The administrator may change the cur­
       rent run-level via init(8) and query the current run-level
       via runlevel(8).

       However,  since  it is not convenient to manage individual
       services by editing this file, inittab only  bootstraps  a
       set  of  scripts  that  actually start/stop the individual

   Boot Scripts
       Note:  The following description applies to SYSV-R4  based
              system,  which  currently  covers  most  commercial
              Unices (Solaris, HPUX, Irix, Tru64) as well as  the
              major  Linux  distributions  (RedHat,  Debian, Man­
              drake,  Suse,  Caldera).  Some  systems  (Slackware
              Linux,  FreeBSD, OpenBSD) have a somewhat different
              scheme of boot scripts.

       For each managed service (mail, nfs  server,  cron,  etc.)
       there  is  a  single  startup script located in a specific
       directory (/etc/init.d in most versions of  Linux).   Each
       of  these  scripts  accepts  as a single argument the word
       'start' -- causing it to start the service,  or  the  word
       accept  other "convenience" parameters (e.g: 'restart', to
       stop and then start, 'status' do display the service  sta­
       tus).  Running  the script without parameters displays the
       (thereby starting the service). All links with names  that
       begin  with  'K' are being called with the argument 'stop'
       (thereby stopping the service).

       To assert order withing the same run-level, the  names  of
       the  links contains order-numbers. Also, to make the names
       clearer, they usually ends with the name  of  the  service
       they refer to. Example: the link /etc/rc2.d/S80sendmail is
       starting the sendmail service on runlevel 2. This is  hap­
       pening   after  /etc/rc2.d/S12syslog  is  run  but  before
       /etc/rc2.d/S90xfs is run.

       To manage the boot order and run-levels, we have to manage
       these  links.   However,  on many versions of Linux, there
       are tools to help with this task (e.g: chkconfig(8)).

   Boot Configuration
       Usually the daemons started may optionally receive command
       line  options  and parameters. To allow system administra­
       tors to change these parameters without editing  the  boot
       scripts  themselves,  configuration  files are used. These
       are located in a  specific  directory  (/etc/sysconfig  on
       RedHat systems) and are used by the boot scripts.

       In  older Unices, these files contained the actual command
       line options for the daemons, but in modern Linux  systems
       (and  also  in HPUX), these files just contain shell vari­
       ables. The boot scripts in /etc/init.d source the configu­
       ration files, and then use the variable values.


       /etc/init.d/, /etc/rc[S0-6].d/.  /etc/sysconfig/


       inittab(5),   bootparam(7),  init(8),  runlevel(8),  shut­

                            2002-06-07                    BOOT(7)
Help us cut cost by not downloading the whole site!
Use of automated download sofware ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and therefore is expressedly prohibited. For more details on this, take a look here



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can help in many different ways.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.08 Seconds