Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-21-2002, 11:22 AM   #1
Member (10 bit)
 
LordofEchoSide's Avatar
 
Join Date: Jun 2002
Posts: 614
Send a message via AIM to LordofEchoSide
Question Master Boot Records

Why do I have two?
LordofEchoSide is offline   Reply With Quote
Old 11-21-2002, 12:29 PM   #2
Mondsreitersmann
 
Nuclear Krusader's Avatar
 
Join Date: Jul 1999
Location: Skingrad
Posts: 8,781
How many HDs do you have?
__________________
Darum still, füg' ich mich, wie Gott es will. Nun, so will ich wacker streiten, und sollt' ich den Tod erleiden, stirbt ein braver Reitersmann.
Nuclear Krusader is offline   Reply With Quote
Old 11-21-2002, 12:40 PM   #3
Member (10 bit)
 
LordofEchoSide's Avatar
 
Join Date: Jun 2002
Posts: 614
Send a message via AIM to LordofEchoSide
2
LordofEchoSide is offline   Reply With Quote
Old 11-21-2002, 01:26 PM   #4
Member (14 bit)
 
reboot's Avatar
 
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
Kinda answered your own question then...
__________________
Black holes are where God divided by zero...
Cheers, Jim

Jims Modems
reboot is offline   Reply With Quote
Old 11-21-2002, 01:42 PM   #5
Member (10 bit)
 
LordofEchoSide's Avatar
 
Join Date: Jun 2002
Posts: 614
Send a message via AIM to LordofEchoSide
yeah, I figued that as soon as it was asked
LordofEchoSide is offline   Reply With Quote
Old 11-21-2002, 01:49 PM   #6
Member (13 bit)
 
Join Date: Oct 2000
Location: Scotland
Posts: 4,700
I thought it depended on the partitions.

The file system must be able to recognize the partitions so information about the location of beginning and end of each partition is stored in the first sector (number 0), which is called Master Boot Record (MBR).

However, regular boot records (BR) are stored in the beginning of each partition on the disk(s).

So if you have one OS and two HDs, each with two partitions, then the MBR would be on the boot drive (usually C: in Win9x - but could be any letter in XP) and each subsequent partition has a BR at the beginning of the partition.

Of course, if you have a Windows dual-boot system, then each OS would have it's own MBR and BR(s).

Last edited by mike breck; 11-21-2002 at 01:54 PM.
mike breck is offline   Reply With Quote
Old 11-21-2002, 01:57 PM   #7
Member (10 bit)
 
David_Jones's Avatar
 
Join Date: May 2000
Location: New Zealand
Posts: 546
MBRs - Each disk needs one?

Hi Mike,

I think you still need an MBR at the start of each physical disk too, but feel free to correct me if that is not correct.

It is stored in the first sector on the first side of the first cylinder (in that notation), and is normally 512 bytes long (assuming 512 byte sector size).

Interestingly, it seems that the remainder of that first side is then left unused, thereby always 'wasting' 62 sectors (31,744 bytes) on each disk.

Not a lot I grant you, but interesting nevertheless.

However, I digress.

David.

Last edited by David_Jones; 11-21-2002 at 02:00 PM.
David_Jones is offline   Reply With Quote
Old 11-21-2002, 02:20 PM   #8
Member (13 bit)
 
Join Date: Oct 2000
Location: Scotland
Posts: 4,700
Hmm... I'm not sure David.

If the Slave drive has an extended partition with two logical drives, then the partitions just become extensions of the boot drive i.e. just as if they existed on the first HD.

If they did exist on the first HD, then they would just have BRs.

So the question is, does a slave drive have a MBR or does it just have a BR which the MBR on the boot drive reads.

Come on Reboot - settle my pain on this one - otherwise I won't sleep tonight.
mike breck is offline   Reply With Quote
Old 11-21-2002, 02:24 PM   #9
Member (12 bit)
 
Markoman01027's Avatar
 
Join Date: Jul 2002
Location: Easthampton, Massachusetts
Posts: 2,633
WHen you make a partition with your Slave Drive, you will automaticly create a Boot Record. I believe David is right..Each Physical Disk will have it's own MBR.
Markoman01027 is offline   Reply With Quote
Old 11-21-2002, 03:55 PM   #10
Member (13 bit)
 
Join Date: Oct 2000
Location: Scotland
Posts: 4,700
Let me make my terminology a little clearer. Different sources can use different terminology.

The MBR can also be called the Master or Primary Partition Table.

Boot Records (BR) in an Extended Partition are also known as Extended Boot Records (EBR), Partition Tables, or Extended Partition Tables.

If we consider MBR, in a simplified way, as a combination of the Boot Record and Partition Table, then one of it jobs is to identify the additional Partition Tables that exist on the HD(or HDs, if there is a slave HD). The MBR is linked in a chain to all the other existing Partition Tables, where each Partition Table points to the next link in the chain.

So, if the second HD was set up with an Extended Partition, and the Partition Table in the MBR on boot drive is linked to all the other Extended Partition Tables, why would you need two "Master"BRs?

The first MBR will identify all the partitions on both HDs thro the EBRs or Tables - whatever you wish to call them.
mike breck is offline   Reply With Quote
Old 11-21-2002, 08:42 PM   #11
Member (10 bit)
 
David_Jones's Avatar
 
Join Date: May 2000
Location: New Zealand
Posts: 546
Hi Guys,

I haven't got a machine to hand with two disks so I cannot check for myself.

Has anyone got one to have a look?

I'd really like to know now that it has come up!!

Of course, it is still possible that if you have an MBR on a slave disk, it might not be (strictly) necessary, but the converse would be compelling evidence (assuming it works!)

Thanks,

David.
David_Jones is offline   Reply With Quote
Old 11-22-2002, 10:00 AM   #12
Member (14 bit)
 
reboot's Avatar
 
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
I have 3 HD's, and they all contain a "MBR" aka Partition table.
reboot is offline   Reply With Quote
Old 11-23-2002, 06:36 AM   #13
Member (13 bit)
 
Join Date: Oct 2000
Location: Scotland
Posts: 4,700
Reboot, is this a multi-boot system with a different OS on each HD? If it is, then I would expect each HD to have a MBR.

How can we tell the difference between a MBR and a BR?

I must admit, I have come across one reply in a Users Group that says each Physical HD must have a MBR.

However I cannot find an "authoritative" source that states that in a situation where you have several HDs, running one OS, with extended parititons containing logical drives, each physical HD has a "Master Boot Record" as opposed to just a "Boot Record.

I know that each "Logical drive" has to have a Boot Sector, Boot Record, FAT, and Root Directory.

But if you have an Primary DOS partition on HD1 and Extended DOS partitions on the subsequent HDs - does it necessarily follow that each HD has to have it's own MBR on the first "physical" sector of every drive?

It may be that each physical HD DOES have a MBR, but in the situation I've described above, only the first one is bootable and the others are potentially bootable but inactive. The first MBR reads them in the chain as it does the normal Boot Records.

Although, if that is so, it does have interesting implications for how Boot Sector Virii and Drive Overlay programs work. Do they just apply themselves to the first MBR or all the MBRs.

I'm not pretending to know the answer to the MBR question. I'm merely teasing out the arguements and theory.

As David says, it's quite interesting.
mike breck is offline   Reply With Quote
Old 11-24-2002, 12:47 AM   #14
Member (10 bit)
 
David_Jones's Avatar
 
Join Date: May 2000
Location: New Zealand
Posts: 546
Theory: Each physical disk must have to have its own MBR

Hi Guys,

In thinking about this further, I now believe that I can state a theory (it is only such) that each physical disk MUST have its own MBR.

This is my thinking (I have tried to identify fact from theorising - feel free to pick apart my theory, and tell me that my facts are wrong!):


FACT: The MBR records the positions of each of the partitions, including extended partitions that may contain multiple logical volumes.

FACT: Each exended partition has its own MBR (Extended MBR I think it is called?)

FACT (?): The first EMBR of an extended partition contains a reference to show the total length of the first logical volume, and also the total length of the extended partition. This information let the machine know where the second (if any) logical volume begins.

FACT: Each subsequent EMBR contains a reference to where the following EMBR resides on the disk.

Theory: It seems reasonable to assume that these references will be in either CHS or LBA format.

Theory: There is no way for CHS or LBA format to describe the fact that a subsequent partition resides on a different disk.

Conclusion: The second (and subsequent) disk MUST have to have its own MBR else there is no way for the machine to know where to find the first extended partition that is not on disk zero.


As I say, it is only the result of my (hopefully) logical reasoning - I cannot prove it, nor provide an external reference (but I am looking!).

David.
David_Jones is offline   Reply With Quote
Old 11-25-2002, 10:08 AM   #15
Member (14 bit)
 
reboot's Avatar
 
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
David, your theory(s) sound sound to me.
3 hd's, 5 operating systems, 10 partitions in all (C through L), 3 MBR/EMBR's.
reboot is offline   Reply With Quote
Old 11-25-2002, 01:20 PM   #16
Member (10 bit)
 
David_Jones's Avatar
 
Join Date: May 2000
Location: New Zealand
Posts: 546
Hi Reboot,

Are all your partitions primary (non extended)?

Its just that I would expect any extended partitions to have their own EMBR, and hence the total MBRs + EMBRs would be more than three (one for each disk, plus one for each extended partition at least).

On the other hand, perhaps I need to go find a dark corner and sit there for a while....

David.
David_Jones is offline   Reply With Quote
Old 11-25-2002, 02:36 PM   #17
Member (14 bit)
 
reboot's Avatar
 
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
Each MBR/EMBR contains all the information on all the partitions on THAT drive.
3 drives, 3 primary partitions, 2 active (a neat trick huh?), and the rest are extended.
The MBR resides on the primary active partition of Drive 0.
All EMBR's reside on the primary partition of Drive 1, and Drive 2.
That covers all extended partitions and logical drives in the system.
Of course my system is a bit different, having two MBR's, one on Drive 0 (mainboard IDE) , and the other on Drive 0 (ATA controller) as well, depending on boot sequence. Two drives are on the ATA133 controller, and the other is on the mainboard. That's how I got two active partitions.

and if you think that's confusing...then I add a 4th drive as secondary master on mainboard IDE and make it primary active, then change the boot order in BIOS and end up with more partitions than I have fingers...plus the CD-ROM, CDRW, and DVD...
reboot is offline   Reply With Quote
Old 11-25-2002, 04:42 PM   #18
Member (13 bit)
 
Join Date: Oct 2000
Location: Scotland
Posts: 4,700
Well, done David. I guess you're right.

I have two HDs.

The Primary Master has a Primary DOS Partition (Active) with an Extended DOS partition containing two Logical drives

The Slave has an Extended DOS partition with three Logical drives.

With Norton Diskeditor, I opened up Sector 1 on each HD and the first 139 bytes of executable code existed on both. Apart from the variation in the last 66 bytes which is the Partition Table, both were identical.

After hours of searching, I can tell you there are actually very few references to Extended MBRs. Here is one - unfortunately I did not save the source.

"Extended partition appears like an ordinary partition in MBR (it occupies space) and inside it has a table similar to partition table in MBR, called EMBR (Extended MBR), which lists partititions enclosed in the extended partition.

Inside of extended partition you can have one more FAT partition and the reference to the next extended partition, then another FAT, and so forth, as long as you have drive letters for them (D:, E:, F:, ... ). All those partitions have special name: logical drives, on contrary to the first FAT partition C:, listed in MBR, which is primary partition. "

Now for EBRs within each Logical drive:

"Primary partitions are listed in the MBR while partitions within the extended partition each have their own EBR.
The MBR (Master Boot Record) is an example of a Partition Boot Record. Each logical volume (or drive) in the extended partition also has a Partition Boot Record.

These are referred to by Microsoft as Extended Boot Records (EBRs). These have the same format as an MBR but contain no program code, just a partition table and the ending 2-byte signature."

(http://home.att.net/~rayknights/pc_boot/glossary.htm)

However, I must say, after hours of searching, I was unable to find a good explanation of the functions of a EMBR if you're not multi-booting . Apart from supplying four lines of code for the Partition Table for the HD, it doesn't seem to do anything else.
The 139 bytes of executable code and 80 bytes of error messages are not used.

It just ends up being part of the chain of Partition Tables and sub-Partition Tables linked to the MBR. So when you think about, a Master Partition Table on Disk 2 would do the same job.

What is interesting is whether Drive Overlay programs and Virii make changes to all existing MBRs or just the MBR on Disk 1 on the Primary Controller.

I would assume they just target Sector 1, of HD Disk 1, otherwise you'd have to FDISK /MBR every MBR to repair them.
mike breck is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:21 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2