Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is the "bootable flag" needed in today's distributions? If not, then Why is it still in the installers? What is it exactly?

share|improve this question
2  
If someone downvotes he or she should write why. –  Nils Oct 29 '11 at 20:55
add comment

2 Answers

up vote 8 down vote accepted

The boot flag is from ancient times, where you would indicate an MBR partition record as bootable, so you could indicate where the boot loader resided.

On modern OS'es this is widely unused, as the MBR consists of a minimal stage loader which bootstraps either into its own partition or jumps to another area on the disk where the boot loader code is kept. (An MBR can contain either executable code or the boot partition table among other things. See also this link to an article about the MBR).

As an example, GRUB is written into the MBR and boots whatever partition you choose.

See also this (quite small) Wikipedia page about the boot flag: en.wikipedia.org/wiki/Boot_flag

share|improve this answer
    
GRUB does not need to be written into the MBR though, and can be loaded by the legacy MBR. –  Ignacio Vazquez-Abrams Oct 30 '11 at 4:07
    
@IgnacioVazquez-Abrams Correct, all it needs is a boot sector loader of whatever partition. I didn't want to immerse into GRUB functionality too much, as this question was about boot flags and MBR, and not about GRUB per se. –  polemon Oct 30 '11 at 5:02
add comment

Every operating system that uses some kind of PC-derived hardware needs to be booted.

This starts with an ancient, OS-independent bootstrap-search which is initiated by the BIOS (basic input output system) of the PC or server.

That BIOS-piece of code tries to load the MBR from the first suitable boot-device. The search order for the boot-device is configurable in the BIOS-setup: which (disk) device first, which next and so on.

The "legacy" MBR tries to find the first primary partition that is marked as bootable and checks wether there is a short magic hex-code on that partition.

If the hex-code is found the rest (the bootstrap loader) is executed by the bios. Here begins the booting of the operating system - may it be DOS, Windows, Linux, ...

share|improve this answer
1  
-1. It is not the BIOS that checks to see if a partition is bootable. –  Ignacio Vazquez-Abrams Oct 30 '11 at 4:06
    
The BIOS attempts to load the MBR (displaying No Operating System if the proper magic number isn't found), and then the MBR takes it from there. The legacy MBR looks for the active primary partition, but other MBRs (grub, lilo, etc.) may choose to act differently. –  Ignacio Vazquez-Abrams Nov 6 '11 at 22:06
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.