PDA

View Full Version : Master Boot Code


Chris S
09-02-2001, 10:35 AM
I have been reading about HD structures and the boot process on the fantastic PC Guide web site, and have a quick question. On this page http://www.pcguide.com/ref/hdd/file/struct.htm I found this information.

"Master Boot Code: The master boot record contains the small initial boot program that the BIOS loads and executes to start the boot process. This program eventually transfers control to the boot program stored on whichever partition is used for booting the PC."

I was wondering if someone could tell me how this "initial boot program" in the MBR get's there and what the name of the file is?? I have been learning about NTs boot process and wondered if perhaps ntldr was an example of one of these initial boot programs??

Any info would be gratefully received.

TIA - Chris

pjungwirth
09-03-2001, 04:00 PM
I don't know about NT, but on linux this program is most often LILO.

In DOS/Windows (but maybe excepting NT), can't you type fdisk /mbr to put the standard windows boot code into the MBR? Or does that command just *zero* the MBR?

I don't think the program shows up as a file on any filesystem. Since the beginning of the disk is always reserved for this program, your first partition begins after that reserved space. This is why, unlike most partitions, the first partition doesn't start on a cylinder boundary.

Again, I don't know about NT, but in linux you have to run a special program (confusingly called lilo) to write LILO to the MBR (or to a partition boot record, if you prefer). This program reads information in another file called lilo.conf to determine what info to put in the MBR, but neither file actually *is* what's in the MBR.

Confused yet?

Paul
~{:-)