Jump to content











Photo
* * - - - 1 votes

MBR and OS independence


  • Please log in to reply
8 replies to this topic

#1 ktp

ktp

    Silver Member

  • Advanced user
  • 727 posts

Posted 22 April 2008 - 02:25 PM

I remember having read jaclaz's remark in one the post: the MBR (structure/code) is OS-independent. This seems OK for me.
Now I find out that mbrfix utility at http://www.sysint.no...ting/mbrfix.htm
can put Vista-specific code in the MBR.

MbrFix /drive <num> fixmbr {/vista}		Update MBR code to W2K/XP/2003 or Vista

If /vista is used with the fixmbr command, a Windows Vista MBR is written instead of a Win2000/XP/2003 MBR. The Vista MBR should work with the other OS&#39;es as well.


Question: why does Vista need specific code? What does this specific code do (in difference with NT/XP partition) ?
Does this mean mbrfix work only for NT/XP/Vista partition only? This is completely in contradiction of OS-independence nature of the MBR.

#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12,309 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 22 April 2008 - 02:42 PM

I remember having read jaclaz's remark in one the post: the MBR (structure/code) is OS-independent. This seems OK for me.
Now I find out that mbrfix utility at http://www.sysint.no...ting/mbrfix.htm
can put Vista-specific code in the MBR.

MbrFix /drive <num> fixmbr {/vista}		Update MBR code to W2K/XP/2003 or Vista

 If /vista is used with the fixmbr command, a Windows Vista MBR is written instead of a Win2000/XP/2003 MBR. The Vista MBR should work with the other OS&#39;es as well.


Question: why does Vista need specific code? What does this specific code do (in difference with NT/XP partition) ?
Does this mean mbrfix work only for NT/XP/Vista partition only? This is completely in contradiction of OS-independence nature of the MBR.

First allow me as 'well known Vista hater' the statement:
If you use Vista, blame yourself and reinstall Linux or W2000! (I intentionally do not say 'XP')

Now serious: IMHO:

The meaning 'for all OSs' is still valid. But the new 'Vista MBR' has some Vista specific contents. It is still fully compatible to previous OSs.
Something like this usually happens when introducing new stuff: The environment which has been sufficient for a long time, has to be extended to support some new requirements ...
And that sometimes offers a menu to the user to do a choice ...

Peter

#3 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 22 April 2008 - 05:48 PM

But the new 'Vista MBR' has some Vista specific contents.


Has it? :lol:

Maybe it has "better" code, but the "scope" of a MBR still remains that of loading the bootscter of the Active partition, I haven't had the time/occasion to check the Vista MBR but I don't think it can have anything "specific".

Since MBRfix can now produce it, I'll have a look and report what I can find. :thumbup:

jaclaz

#4 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12,309 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 22 April 2008 - 06:02 PM

Has it? :lol:

Maybe it has "better" code, but the "scope" of a MBR still remains that of loading the bootscter of the Active partition, I haven't had the time/occasion to check the Vista MBR but I don't think it can have anything "specific".

Since MBRfix can now produce it, I'll have a look and report what I can find. :thumbup:

jaclaz


Jaclaz,
You know that (in this area) I'm stupid, and maybe I again confuse MBR and boot sector.

But:
Anywhen I installed Vista for test onto a (removable frame) hdd other than my c:

And it gave me some unwanted boot options into my c:

And I only could remove the remainder of this installation by using http://www.vistabootpro.org/

Serious question of a fool: Is that independent from MBR?

Peter

#5 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 22 April 2008 - 09:05 PM

Serious question of a fool: Is that independent from MBR?


Yep, it is.

But I do understand your perplexities as very often the three main parts of a hard disk are WRONGLY "exchanged" and very oftten the bootsector is confused with the MBR.

The Master Boot Record is called "Master" as there is one MBR on each drive, no matter how many partitions (read drive letters) are there on the drive.
It is the first absolute sector on the drive.

There are as many bootsectors as there are partitions (read drive letters) on the drive, the bootsector is the first sector of a partition.

If there is an Extended partition, there is also a EMBR (sometimes called EPBR), but this is out of the scope of this post.

I can recommend you the reading of this:
http://www.ranish.com/part/primer.htm
of which there is was a German version too:
http://web.archive.o...t/primer_de.htm
(courtesy of the Wayback Machine)

Some examples:
LINUX (original - almost any modern distro uses a bootmanager):
1.BIOS loads first sector of the disk
2.the code in the first sector of the disk (called MBR or Master Boot Record) calls first sector of Active partition (called the bootsector)
3.the code in the bootsector calls LiLo (Linux Loader) or other loader
4.LiLo (or other loader) boots the Linux Kernel

DOS/Win9x/Me:
1.BIOS loads first sector of the disk
2.the code in the first sector of the disk (called MBR or Master Boot Record) calls first sector of Active partition (called the bootsector)
3.the code in the bootsector calls IO.SYS
4.IO.SYS boots DOS

NT/2K/XP/2003
1.BIOS loads first sector of the disk
2.the code in the first sector of the disk (called MBR or Master Boot Record) calls first sector of Active partition (called the bootsector)
3.the code in the bootsector calls NTLDR
4.NTLDR reads BOOT.INI and, depending on what is chosen either:
a. boots a NT/2K/XP/2003 system
b. calls a bootsector file

VISTA
1.BIOS loads first sector of the disk
2.the code in the first sector of the disk (called MBR or Master Boot Record) calls first sector of Active partition (called the bootsector)
3.the code in the bootsector calls BOOTMGR
4.BOOTMGR reads Boot Configuration Database (BCD) and, depending on what is chosen either:
a. calls Winload.exe that boots Vista
b. calls NTLDR (see above for NT/2K/XP/2003)
c. calls some other loader

As you can see, differences only start AFTER step 2. in the above examples.

The "normal" PC booting sequence is well detailed here:
http://www.pcguide.c...Sequence-c.html

This article explains VISTA booting rather well:
http://ezinearticles...o...w&id=794745

Using a bootmanager/bootloader like grub4dos the sequence may be different, and it depends on how grub4dos is installed, as grub4dos can work also as a MBR and can bypass the bootsector code alltogether.

To sum up:
Linux:BIOS->MBR->bootsector->loader->OSDOS:BIOS->MBR->bootsector->OSNT/2K/XP/2003BIOS->MBR->bootsector->bootmanager(NTLDR)->choice->loader(NTLDR again)->OS                                                   |                                                   ->bootsector file ->whatever it doesVISTABIOS->MBR->bootsector->bootmanager(BOOTMGR)->choice->loader(Winload.exe)->OS                                                   |                                                   ->bootmanager(NTLDR)->(see above)

I hope the above is clear enough, and not too confusing....:lol:

jaclaz

P.S.: Just found a possible explanation of the changes in the Vista MBR code:
http://www.multibooters.co.uk/mbr.html

A Larger IPL
Historically the Microsoft MBR bootcode (the IPL - Initial Program Loader) mainly just checks the partition table to see which partition is marked as the active one on the disk and then passes control to the OS bootcode in the PBR (Partition Boot Record) of that active partition. It can generate only a few error messages, which you can see after the bootcode and before the disk signature. The Vista bootcode (in yellow) in the MBR has grown in size slightly over that of XP, but still only occupies no more than the space before the disk signature on the very first sector of the drive. I have looked for but not found one single byte in any of the free sectors between the MBR and the first partition.
The purpose of the extra code is not clear, but it seems it may be mainly to do with the BitLocker drive encryption system. This MS white paper asking computer suppliers not to hook their recovery systems into the MS bootcode gives some insight. I have tried replacing the Vista bootcode in the MBR with that of XP, Win98, Linux's Grub and with that of four other MBR bootmanagers. Unsurprisingly, in all cases Vista boots just fine. It's too early to say for sure but this suggests that the extra code is not actually a required part of the IPL and as in previous Windows it remains OS-Independent, as least when a Trusted Platform Module and BitLocker are not being used.



#6 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10,120 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 22 April 2008 - 10:30 PM

I think that pretty much explains the reason for adding extra code on the MBR portion.

Good find Jaclaz! :lol:

#7 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 22 April 2008 - 11:00 PM

I think that pretty much explains the reason for adding extra code on the MBR portion.

Good find Jaclaz! :lol:


Well, actual merit goes to cdob, that referenced the page here:
http://www.911cd.net...o...1242&st=138

jaclaz

#8 ktp

ktp

    Silver Member

  • Advanced user
  • 727 posts

Posted 23 April 2008 - 12:55 PM

To confirm the above:
In the MBR code specific to Vista set by mbrfix, one can find a string "TCPA" : Trusted Computing Platform Architecture.
(search Google for other explanations).

#9 ktp

ktp

    Silver Member

  • Advanced user
  • 727 posts

Posted 23 April 2008 - 03:34 PM

Vista seems to support EFI, and its BCD (boot configuration data) uses GUID. A little search shows an interesting article on GPT, EFI, MBR, BIOS. Max OS X Leopard supports EFI/GUID.
What I remember :-): EFI uses GPT, while BIOS uses MBR.

GUID Partition Table (GPT)
http://en.wikipedia....Partition_Table

Master Boot Record
http://en.wikipedia....ter_boot_record

A more accessible opinion (at least for me) on GPT :
The woes of a GUID Partition Table
http://www.daniweb.c.../entry1598.html




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users