Download OOS Chapter 2 Part 2

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
F3036 OPEN SOURCE OPERATING SYSTEM
CHAPTER 2: PART 2
UNDERSTAND BOOT LOADERS IN LINUX
What is Boot Loaders ?
 A boot loader, also called a boot manager, is a small program that places
the operating system (OS) of a computer into memory.
 When a computer is powered-up or restarted, the basic input/output
system (BIOS) performs some initial tests, and then transfers control to
the master boot record (MBR) where the boot loader resides.
 Most new computers are shipped with boot loaders for some version of
Microsoft Windows or the Mac OS. If a computer is to be used
with Linux, a special boot loader must be installed.
Linux Boot Loader
 For Linux, the two most common boot loaders are known as :
1) LILO (Linux Loader)
2) GRUB (Grand Unified Boot loader)
LILO (Linux Loader)
 LILO comes as standard on all distributions of Linux.
 As one of the older/oldest Linux boot loaders, its continued strong
Linux community support has enabled it to evolve over time and stay
viable as a usable modern-day boot loader.
 Some new functionality includes an enhanced user interface.
Making LILO your boot loader
 What you will need to do to use LILO as your boot loader
depends on whether you are installing the OS fresh or have
already installed Linux and are planning on moving to LILO.
 If you're starting fresh, you can jump straight to the Configuring
LILO section.
 If you already have a Linux distribution installed, you usually get
an option to install and configure LILO (and can boot your
machine into your new Linux install).
LILO: Initial boot process
 When LILO initially loads, it brings up in order each of the letters -- L-I-L-O. If all the letters come up, the first
stage boot was successful. Anything less indicates a problem:
1) L: The first stage boot loader has been loaded. If LILO stops here, there were problems loading the second stage
boot loader. This is usually accompanied by an error code. The common problems at this stage are media
problems or incorrect disk parameters specified in your lilo.conf file.
2) LI: The second stage boot loader has been loaded. LILO halting at this point indicates the second stage boot
loader could not be executed. Again, this can be due to problems similar to just L: loading or if the boot.b file
has been corrupted, moved, or deleted.
3) LIL: The second stage boot loader has now been executed. At this point, media problem could again be
responsible or the map file (as specified in the lilo.conf file) could have had problems finding the descriptor
tables.
4) LIL?: Loaded to the same point as above. This usually means the second stage boot loader loaded at an incorrect
address, caused most likely by boot.b being in a different place than specified in the lilo.conf file.
5) LIL-: Loaded to the same point as above. Problem loading the descriptor table, most likely due to a corrupt
descriptor table.
6) LILO: LILO has successfully loaded with no errors.
GRUB (Grand Unified Boot Loader)
 More recently, the GRand Unified Boot loader (commonly known as GRUB)
seems to have outshine LILO.
 GNU GRUB is actively developed by the Free Software Foundation and
based on the original GRUB program, originally created by Erich Stefan
Boleyn.
GRUB: Features
 GRUB is now being replaced by GRUB2.
 The original GRUB is being renamed to GRUB Legacy; apart from fixing bugs,


1)
2)
3)
4)
it will no longer be actively developed.
GRUB2 will be a complete rewrite of the original boot loader.
To date, the following features are the core of the changes:
Replacement of Stage 1.5 with the creation of a compact core image
Support for dynamic loading to the core image
Trend towards making the overall GRUB framework object oriented
Support for different hardware architectures and different platforms (other
than Linux)
Making GRUB your boot loader
 As with LILO, the steps you will need to perform to use GRUB as your
active boot loader depend on whether you are installing the OS fresh or
have already installed Linux and are planning on moving to GRUB.
 If you're starting fresh, you can jump straight to the Configuring
GRUB section.
 If you already have a Linux distribution installed, you usually get an
option to install and configure LILO (and can boot your machine into
your new Linux install).
 For existing Linux users wanting to migrate to GRUB, get the latest
version of GRUB .
GRUB: Initial boot process
 When GRUB initially loads, like LILO it loads its first stage from the MBR.
 Once this has loaded, it then enters an intermediate stage between the




common boot loader stages one and two (or for argument's sake, Stage 1.5).
Stage 1.5 is present to enable regular file system access to the GRUB
configuration files in /boot/grub rather than accessing using disk blocks.
We then enter stage two of the boot loader where GRUB loads the grub.conf
file.
You should now see the GRUB GUI. For any native Windows user, this seems a
much more friendly experience than that of LILO.
User should now be looking at a screen giving them two options: to boot into
Red Hat Linux or to boot into Windows XP. By default, it will load Linux.
LILO vs. GRUB
 All boot loaders work in a similar way to fulfill a common purpose. But
LILO and GRUB do have a number of differences:
1) LILO has no interactive command interface, whereas GRUB does.
2) LILO does not support booting from a network, whereas GRUB does.
3) LILO stores information regarding the location of the operating systems
it can to load physically on the MBR. If you change your LILO config
file, you have to rewrite the LILO stage one boot loader to the MBR.
Compared with GRUB, this is a much more risky option since a
misconfigured MBR could leave the system unbootable. With GRUB, if
the configuration file is configured incorrectly, it will simply default to
the GRUB command-line interface.