Master Boot Record

1) What r the things stored in MBR?
2) Is Master Boot Record stored in the Harddisk or EPROM on motherbrd?
3) How the Processor know where/how to load the operating system?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

1. It contains the whole partition table for that hard drive and master boot code for loading OS into your system.

2. It is stored in the FIRST sector of the drive (cylinder 0, head 0 sector 1).
The EPROM on your mainboard store only BIOS code.

3. The partition table also contains info where OS boot record (a.k.a. DOS boot sector) is. (Generic) Master boot code will load OS's boot record up and run it.
What r the things stored in MBR?
the master boot record contains these files, (, Drivespace.bin, lo.sys, Msdos.sys, )
The master boot record is stored on the  sector 0 ,of the Hard disk...

How the Processor know where/how to load the operating system? your guess is as good as mine but heres a little something I copyed that might make sence to you....

Computer operations are performed in the CPU/processor, which contains the LOGIC CIRCUITS for arithmetic and logical operations and for control of the other units that make up a computing system. The CPU also contains the registers, a relatively small number of storage locations that can be accessed faster than main storage and are used to hold the intermediate results of calculations. The main storage is contained in the storage unit, or memory, of the computer. each of which contains thousands of SEMICONDUCTORS.  Random access memory (RAM), which both can be read from and written to,

hope this answers at least some of your question.....James
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

: vipat
didnt mean to say anything that you have said, your comment wasn't showing when i typed mine ( i type slowwwww )
Hihi, what a pretty joke! How does MBR  keep all of those 3 files in it?
Hi reece,

Q1 : What r the things stored in MBR?
A1 : MB contains information about your
     DISK like :
     - OEM name and version
     - bytes per sector
     - sector per cluster
     - reserved sector
     - number ofcopies FAT
     - maximum number of root dir entries
     - total number of sector in logical image
     - media descriptor type
     - number of sectors in FAT
     - number of sector per track
     - number of heads
     - number of hidden sector.

Q2 : Is Master Boot Record stored in the Harddisk or EPROM on motherbrd?
A2 : MBR stored in HARDDISK but not on
     EPROM or MotherBoard

Q3 : How the Processor know where/how to load the operating system?
A3 : CPU know to load the operating system caused it's controlled by ROM-BIOS

disregard my comment , dont think my brain was kicked in gear on this one..
the bootsector is only 255 bytes long, you would have a good time trying t fit them all into it :)

The BIOS then sees if a byte is a $80 is present at a certain offset, on the floppy if then it can not see one, it will try the HD, then CD / Zip etc etc.. been a while since i di stuff like this, so it may not be 100% accurate, but hey you can look for yourself... once its found a bootsector....

The bootsector then is loaded at $7C00 (Off the top off my head) then, it goes into memory, you boot sector then contains fat and stuff etc etc but the most important part is setting up memory so that programs can be loaded, then Io.sys is loaded, in turn loads the rest as Trekie pointed out..., Drivespace.bin, lo.sys, Msdos.sys.... I have had a go with my own bootsector, way too hard (at the time) to understand for me....

ITs fun :)

But John has it covered, i as just adding additional info :)
i think somone has spilt coffie on my keyboard, having to hit keys for them to work!

Craig C.
reece, please reject his answer.

johnsavior, your answer is really wrong. Why?
- The vital logical DOS disk information you said are stored in DBR, not in MBR! FAT is native file system on DOS, not on the other OSs. (ex: Linux).
- BIOS knows where OS stored in disk from partition table, which is stored in MBR, right?

Don't you believe? try using some direct disk access utils such as Norton Utilities's DISKEDIT.EXE (It's old but it still worked) and checking out the 2 sectors.
recceAuthor Commented:
No one seem to know how the processor know how to load OS.
processor->BIOS->MBR->harddisk OS ?

Where is BIOS stored? EPROM?
It's a complex process.  BIOS data is stored in EPROM and in CMOS equivalents.  The CPU, once it gets a signal that power is available, loads an "address" into one of the Registers, the location of WHERE the next instruction can be found -- somewhere in the BIOS -- which, in turn provides a "next address".  A whole cascade of these operations occur to verify that the machine is working, memory is available, where in memory to store certain functions, etc., etc.
I'll approach it with recollections as well, for your q: looks to be more on theory than precision programming.

1) What things are there?
a) signature (hex) for 'validity' of O/S used.
b) code. not much in that small space. This is just the first little bit to get the system going. Just enough to locate the real boot sectors and its (their) more elaborate bootup code. With some minimal error checking.
c) error text. Not much, perhaps something like "incorrect disk". No room for a lot here
d) the disk info including partition table. A list perhaps like johnsavior (I am not reviewing at moment). For your familiarity, it has the numbers you employ for setting up to four partition tables with fDisk, including all of its options like which partition is 'active', in that you want to boot up into that one with its O/S. It has the disk 'logical' geometry info here to help locate the next sectors to load and execute.

2) MBR is first sector of 1st HD. This is not called logical sector zero, for other programs get to access logical sectors. It is before that, and often called 'absolute' sector zero.

3) How does it know? It is bios. But mfr may vary. As I recall, a while back if I left a non-boot disk in drive a: , the machine would try to load its boot program(s) [no mbr] but the "invalid system" message came from the code in MBR.  The BIOS now has other options for order of bootup, sometimes offering disable of floppy boot or giving a boot from CD a higher priority - if found present.  When you tell BIOS which to goto, that is what makes it decide where to go. That information is maintained in 'volatile' memory, such that you will retain a h/w option to undo. It may be CMOS needing low power battery use like your time-of-day information.  But not the partitioning information. That remains on the HD where it will follow with your data if you move it to another machine. You won't lose that without a battery. It remains stored.
>> Where is BIOS stored? EPROM?
It is stored in a big fat chip or two of non-valatile memory. It is only programs which never change, so it is 'usually' referred to as ROM.  Due to needs to maintain updates more frequently than our desire to physically remove and change chipsets, many BIOS are really less like ROM.  They have many using 'flashing' for example to provide a BIOS upgrade. [do that wrong and you may now need a new chipset]
>how the processor know how to load OS.
>processor->BIOS->MBR->harddisk OS ?

Yes, more like
processor->BIOS->harddisk OS

Processor knows RAM location to kick off bios. Bios knows to get only one sector of HD and run it. It has no clue on the content being MBR or whatever. That is to keep its loading up program similar to diskette (which has no MBR).

The harddisk recognizes it is MBR then loads up the boot-up programs beginning in the logical first sector (according to its table of HD information) which are really similar to the bootup programs on the diskette.

So MBR can in theory point to four different operating systems (user choices) residing in four different 'partitions'.  Your choice of which boot sector (O/S) should be enabled through products like fDisk.

Does that help any? Or confuse   :(
-Dude the BIOS is on an EPROM ...YES!
-Bois starts..loads extended info in RAM...Connects to BIOS listed startup device (Hard Disk)...Hard disk has boot files ....OS boots... If you need more than that the read a freaken book.
Answer is "Bois starts" ? what of "goils starts"?
Answer is that books are freaken? Which in mind?
What is "loads extended info in RAM" - from what book?
If you have heard of topic of
"Master Boot Record"
I fail to see how Proposal correlates MBR
I agreed with SunBow , too. How I can find where those info he refering are?

I'd proposed my 1st comment as an answer, which I think it is the best words to this question. :-I
Tim HolmanCommented:
>No one seem to know how the processor >know how to load OS.

Using NT as an example :

Intel boot sequence

·      POST
·      BIOS reads MBR from HDD, this contains NTLDR.  If a SCSI without its own BIOS is in use, a driver is loaded from NTBOOTDD.SYS file.
·      NTLDR -  switches processor to 32 bit flat model, starts minifile system & reads BOOT.INI
·      If DOS / Windows selected, a DOS boot sector is loaded from BOOTSEC.DOS, otherwise NT loads.
·      NTLDR calls NTDETECT.COM – tests & detects hardware, displays error messages if problems found and then passes control to NTOSKRNL.EXE
·      NTOSKRNL loads HAL.DLL to mask interrupts / exceptions from kernel
·      SYSTEM hive loaded into HKLM (WINNT\SYSTEM32\CONFIG\SYSTEM)
·      Kernel initialised, creates HARDWARE hive, SYSTEM drivers loaded.  DRIVERS.EXE from resource kit will say what’s loaded
·      Services loaded (eg AUTOCHK), SOFTWARE hive loaded, AUTO drivers loaded
·      Windows started, user logs on, LastKnownGood set.

RISC boot sequence

·      Looks for OSLOADER.EXE > NTKRNL > HAL > SYSTEM. Simpler, OSLOADER replaces NTLDR and NTDETECT.
·      Hardware config downloaded from non volatile RAM

Damn... If only Housenet hadn't got there first, with his perfect A grade answer that's bound to be accepted in order for him to get the points...

johnsavior, Now I revisit, your A1 does filing system info, such as also needed for diskettes.  I think you referring to Boot sector, also present on floppies, not the Partition Sector (MBR).

>> 1) What r the things stored in MBR?
Code, Signature, and THE table having the items of fDisk:

For Exactly Four Partitions, each has:

a) Where it Begins
b) Where it ends
c) How big it is
d) Whether Bootable (only one can be active)
e) Operating System using it (Dos, Unix etc.), for M$.O/S the code is usually associated with one of its types of FAT usage
f)  Locator for the Boot Program for that Partition

Note that all this is compressed into 16 bytes. This small area for counting, locating, and sizing underlies some of the problems associated with larger hard drives.

The code part has minimal checks on its own sector contents, for example: is there a partition that is to be booted. If there are none, it will provide brief error on screen.

vipat, I had agreed your 1st was likley better also, tho' it missed a few points it did cover bases more concisely than respondees such as I. Sometimes more words can confuse people, but i oft err on side or more is better. Still, I would have moved on had recce not continued with a "nobody knows"...
recce, is this a homework question?.....
recceAuthor Commented:
Housenet, ur ans is too brief.
Please tell me this:
1) How BIOS decide to load from driveA or driveC? The code use to ID this.

2) From the small 16 bytes (if I am not wrong), which sector, cylinder, etc, where can I find the no. of partitions, which drive to load, what type of FAT is used, etc?

Don't tell me to read from a freaken book!

I will increase pts for good ans.
From my record, I have always given either A grade or just reject ans.
recce, Sorry i did not notice your return.  I thought your interest lay more general. To ask for specific code would need refinement. It is also unlike how I originally read requests. If you have some interest in programatically retrieving the likes of the 16 bytes, and if the links vipat provide are insufficient, please state after viewing them. I'll try to get the time to visit them myself tomorrow. I am less literate on any new methods partitioners may embed beyond the original four. With these newer huge gigabyte drives, some things may be different.

If we missed it, the tradition was that the first sector went to the MBR, while the next logical sector (for boot) was not the next physical sector, but the first one in the next track, leaving a gap for some later potential use (?).
recce, I just checked vipat links, I think you have been dealt good justice there for about anything you want to do with MBR. Satisfied now?
recceAuthor Commented:
Adjusted points from 100 to 150
recceAuthor Commented:
vipat, thanks a lot
increase 50pts for u.
Thanks a lot to others who contributed
recceAuthor Commented:
vipat, please lock on
Recce, simple accept his comment as an answer...... See it in light gree on the green bar?....
recceAuthor Commented:
thanks craig_capel.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.