Primary and secondary boot loaders

bootbootloader

From http://www.ibm.com/developerworks/library/l-bootload/index.html

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.

Should "first" in "Secondary boot loaders are where the first stage of the boot loader is installed onto a bootable partition" be "second" instead?

Where is the secondary boot loader stored? Not in MBR where the primary boot loader is stored?

What is "a separate boot loader" in the last sentence? Is it the primary or secondary boot loader?

is the primary boot loader the same concept as the initial program loader (IPL, mentioned in the same link)?

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.

Thanks!

Best Answer

There is an ambiguity in that text actually. Primary boot loader doesn't mean the first stage of a boot loader, and secondary boot loader doesn't mean the second stage of a boot loader.

First stage of a boot loader is the program resides in MBR data which holds partition information and capability to handle very basic disk I/O operations those cannot accomplish to fully load the O.S since MBR boot loader code size is limited to 448-bytes for standart MBR records (lower for spesific O.S implementations, since partition table holds 4*16-Bytes)

First stage of the boot loader's job is to simply load the second stage which now nows the O.S spesifics and it has much more code space. As far as I remember, NTFS second boot loader has 16 512-bytes sectors to load O.S kernel, 8-KBytes.

Primary and secondary terms come in where there are multiple O.S.es to choose to boot. Each O.S has its boot loader that has first and second stages, each boot loader should start from stage one since the primary boot laoder in MBR shouldn't be expected to know about spesifics of the second stages in every boot loader.

Second stages are stored on the beginning of the partition itself which is called VBR, Volume Boot Record.

When there is one O.S to boot, MBR program (IPL) is the first stage and VBR program is the second stage. When there are multiple O.Ss, MBR program becomes the first stage of the primary boot loader, that stage know there are some code in some partition which is second stage to fully load the whole menu and options, and loads it. That second stage knows about the partitions which has VBR, and continues with VBR, now VBR became secondary boot loader.

Yes, I said "each boot loader should start from stage one since the primary boot laoder in MBR shouldn't be expected to know about spesifics of the second stages in every boot loader.". It is why VBR code also has MBR code in itself, too. Windows VBR codes have it.

Related Question