Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am in need of help.

Recently i studied about the booting sequence of Linux OS and one of my colleague mentioned that it has 2 bootloaders. Stage 1 bootloader and Stage 2 Bootloader. He also mentioned that MBR is the Stage 1 bootloader and GRUB/LILO is the stage 2 bootloader. What is the use of having 2 bootloaders, why can't we have it united as a single bootloader?

share|improve this question
1  
How is the MBR a bootloader? A bootloader can be stored in the MBR. –  terdon Dec 5 '12 at 14:30
    
He mentioned me so.... He mentioned me that MBR is a first bootloader and GRUB/LILO is a second bootloader. –  Rajan Chennai Dec 5 '12 at 14:31
    
@RajanChennai - Ask what your friend means exactly. Your using the wrong terms. The MBR is not a bootloader. –  Ramhound Dec 5 '12 at 18:42
    
Yes. The MBR data is technically called a bootstrapper or "chainloader" (though that one begets confusion with the GRUB2 parameter), not a bootloader. –  WindowsEscapist Dec 5 '12 at 19:03
add comment

1 Answer 1

You may find this post informative. Here is the most relevant section:

What is a boot loader?

Most simply, a boot loader loads the operating system. When your machine loads its operating system, the BIOS reads the first 512 bytes of your bootable media (which is known as the master boot record, or MBR). You can store the boot record of only one operating system in a single MBR, so a problem becomes apparent when you require multiple operating systems. Hence the need for more flexible boot loaders.

The master boot record itself holds two things -- either some of or all of the boot loader program and the partition table (which holds information regarding how the rest of the media is split up into partitions). When the BIOS loads, it looks for data stored in the first sector of the hard drive, the MBR; using the data stored in the MBR, the BIOS activates the boot loader.

Due to the very small amount of data the BIOS can access, most boot loaders load in two stages. In the first stage of the boot, the BIOS loads a part of the boot loader known as the initial program loader, or IPL. The IPL interrogates the partition table and subsequently is able to load data wherever it may exist on the various media. This action is used initially to locate the second stage boot loader, which holds the remainder of the loader.

The second stage boot loader is the real meat of the boot loader; many consider it the only real part of the boot loader. This contains the more disk-intensive parts of the loader, such as user interfaces and kernel loaders. These user interfaces can range from a simple command line to the all-singing, all-dancing GUIs.

Boot loaders are usually configured in one of two ways: either as a primary boot loader or as a secondary boot loader. Primary boot loaders are where the first stage of the boot loader is installed on the MBR (per the previous description). Secondary boot loaders are where the first stage of the boot loader is installed onto a bootable partition. A separate boot loader must then be installed into the MBR and configured to pass control to the secondary boot loader.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.