BOOT LOADER
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.
How does
GRUB work?
When a computer boots, the BIOS transfers
control to the first boot device, which can be a hard disk, a floppy disk, a
CD-ROM, or any other BIOS-recognized device. We'll concentrate on hard disks,
for the sake of simplicity.
The first sector on a hard is called the
Master Boot Record (MBR). This sector is only 512 bytes long and contains a
small piece of code (446 bytes) called the primary boot loader and the
partition table (64 bytes) describing the primary and extended partitions.
By default, MBR code looks for the partition
marked as active and once such a partition is found, it loads its boot sector
into memory and passes control to it.
GRUB
replaces the default MBR with its own code.
Furthermore, GRUB works in stages.
Stage 1 is
located in the MBR and mainly points to Stage 2, since the MBR is too small to
contain all of the needed data.
Stage 2
points to its configuration file, which contains all of the complex user
interface and options we are normally familiar with when talking about GRUB.
Stage 2 can be located anywhere on the disk. If Stage 2 cannot find its
configuration table, GRUB will cease the boot sequence and present the user
with a command line for manual configuration.
Stage 1.5
also exists and might be used if the boot information is small enough to fit in
the area immediately after MBR.
The Stage architecture allows GRUB to be large
(~20-30K) and therefore fairly complex and highly configurable, compared to
most bootloaders, which are sparse and simple to fit within the limitations of
the Partition Table.
For Linux, the two most common boot loaders are known as LILO (LInux LOader) and LOADLIN (LOAD LINux). An
alternative boot loader, called GRUB (GRand Unified Bootloader), is used with Red HatLinux. LILO is the most popular boot loader among computer users that
employ Linux as the main, or only, operating system. The primary advantage of
LILO is the fact that it allows for fast boot-up. LOADLIN is preferred by some
users whose computers have multiple operating systems, and who spend relatively
little time in Linux. LOADLIN is sometimes used as a backup boot loader for
Linux in case LILO fails. GRUB is preferred by many users of Red Hat Linux,
because it is the default boot loader for that distribution.
GRUB (GRand Unified Bootloader) is a boot loader package developed to support multiple operating
systems and allow the user to select among them during boot-up.
GRUB is a bootloader (can also be
spelled boot loader) capable of loading a variety of free and proprietary
operating systems. GRUB will work well with Linux, DOS, Windows, or BSD. GRUB
stands for GRand Unified Bootloader.
GRUB can be run from or be installed to any device (floppy disk, hard
disk, CD-ROM, USB drive, network drive) and can load operating systems from just
as many locations, including network drives. It can also decompress operating
system images before booting them.
What about LILO?
You may have heard about another Linux bootloader called LILO (stands
for LInux LOader). While a sensible option for many Linux users, I believe that
GRUB is a better choice, for several reasons:
1. LILO supports only up to 16 different boot
selections; GRUB supports an unlimited number of boot entries.
2. LILO cannot boot from network; GRUB can.
3. LILO must be written again every time you change
the configuration file; GRUB does not.
4. LILO does not have an interactive command
interface.
0 comments:
Post a Comment