If there are several OSes in a computer, how does the bootstrap program know which one to load? Is it the same in a Mac?

link|improve this question

74% accept rate
feedback

2 Answers

up vote 1 down vote accepted

The BIOS is hard-coded to load the first 512 bytes of Hard Disk 0 into memory and run the code at byte offset 0.

That code will typically load the first some bytes of the active partition on the same disk. The code in the partition bootsector will then locate and run a boot file from somewhere on the disk.

link|improve this answer
feedback

The bootstrap loader always sits in the first sector of the hard disk, and that's where the BIOS will try to load. Said bootstrap loader usually consists of instructions that amount to "Load a bigger bootloader including a table of entry points for various operating systems from these sectors."

link|improve this answer
The bootstrap loader isn't in the BIOS? – OSX NINJA Aug 27 '10 at 22:15
The phrase can have different meanings, I guess. I always use "bootstrap loader" to mean the one on the hard disk. In any case, the process goes as I described. – CarlF Aug 29 '10 at 3:26
feedback

Your Answer

 
or
required, but never shown

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