Jump to content











Photo
- - - - -

Questions about boot code and architecture dependency


  • Please log in to reply
5 replies to this topic

#1 Zimmy

Zimmy

    Member

  • Members
  • 76 posts
  •  
    United States

Posted 03 September 2013 - 11:06 AM

I have quite a bit of experience with Windows and computers in general, but a couple of questions came up today for which I have no answer.
 
1. Are boot sectors and master boot records for Windows, or for that matter operating systems in general, architecture specific? As an example, if I'm using a 32 bit build of Win7PE, could the 32 bit versions of BootSect and MBRFix be used to repair the boot code for a 64 bit version of Windows? I'm assuming that the boot configuration data store is more likely to be architecture specific. Or is that incorrect?
 
2. Are boot sectors created with the version of BootSect included with 7 compatible with 8? And what about the Vista/7 MBR code generated by MBRFix?
 
Thanks in advance for any assistance.


#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 September 2013 - 12:29 PM

A MBR and a PBR are very different beasts.

 

A "normal" MBR has one (and only one) scope, that of looking into the partition table (embedded in it), find the active (primary) partition among the 4 possible entries and load the PBR (or VBR or bootsector) of that partition.

 

ALL MBR's are "OS agnostic" in theory.

In practice Windows 7 (because of the introduction of bitlocker) made the *need* for a "special" MBR code to be compatible with bitlocker.

Yet the code is "backwards" and "sideways" compatible with any other OS.

 

The PBR behaviour is very different, besides containing the BPB (Bios Parameter Block) with all the needed information on the filesystem, it normally invokes the OS loader, IO.SYS or Winboot.sys (which are BOTH main system file and OS loader) for DOS and win9x/Me, NTLDR (which is both OS loader and boot manager) in NT systems up to 2003, BOOTMGR (which is more properly a bootmanager since it loads Winload.exe which is the actual OS loader) on Vista  :ph34r: and later.

 

So, PBR is normally "OS dependent".

 

In the Linux world, since a boot manager is always used (GRUB, GRUB2, Syslinux, etc.) things may change.

GRUB and GRUB2 can be (and often are) installed (partially)  to the MBR (+hidden sectors), in this cases the MBR os not "OS agnostic" but not even "OS dependent", it is "bootmanager dependent".

Same goes for grub4dos (if installed to the MBR+hidden sectors).

Syslinux, on the other hand uses a (very plain) "normal" MBR code and installs some code loader in the PBR. 

In this case (and when GRUB, GRUB2 or grub4dos are as well invoked in the PBR) the PBR becomes "OS agnostic" BUT "boot manager dependent",

 

 

I had no occasion/reason to examine in detail the MBR and PBR's made for Windows 8, but since the latest version of bootsect.exe still have only two switches (/NT52 and /NT60 ) like the previous Windows 7 version:

http://technet.micro...7(v=ws.10).aspx

http://technet.micro...y/hh824948.aspx

I would say that there are NO differences with Windows 8 (which wouold also be strangely logical as all the push is - senselessly :frusty: - towards EFI/UEFI and GPT).

 

:cheers:

Wonko



#3 Zimmy

Zimmy

    Member

  • Members
  • 76 posts
  •  
    United States

Posted 03 September 2013 - 12:50 PM

Some of what you said is a bit beyond me, but thank you. I'm still not sure that I have an answer to my first question LOL. Or if it is there, I think you may have gone over my head. So would using the 32 bit versions of BootSect and MBRFix work for a 64 bit installation of Windows?



#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 September 2013 - 02:15 PM

Some of what you said is a bit beyond me, but thank you. I'm still not sure that I have an answer to my first question LOL. Or if it is there, I think you may have gone over my head. So would using the 32 bit versions of BootSect and MBRFix work for a 64 bit installation of Windows?

Well, you started with:

 

 

I have quite a bit of experience with Windows and computers in general, but a couple of questions came up today for which I have no answer.

 

the answers were tailored to this preamble ;).

 

 

 

1. Are boot sectors and master boot records for Windows, or for that matter operating systems in general, architecture specific? 

 

No.

Let's see if I can make it clearer :):

 

In any Windows NT:

The scope of the MBR is ONLY to invoke a PBR (this is NOT 32 bit or 64 bit specific), more exactly the PBR of the Active (primary) partition in the partition table.

The scope of the PBR is ONLY to invoke a OS loader (this is NOT 32 bit or 64 bit specific BUT it will be "OS specific" and "filesystem specific").

The OS loader will have a "real mode" part (again NOT 32 bit or 64 bit) and a "protected mode" part (that might be 32 or 64 bit specific).

 

 

 

2. Are boot sectors created with the version of BootSect included with 7 compatible with 8? And what about the Vista/7 MBR code generated by MBRFix?
 

Yes, and yes (AFAIK and as per the given reasons).

 

:cheers:

Wonko



#5 Zimmy

Zimmy

    Member

  • Members
  • 76 posts
  •  
    United States

Posted 03 September 2013 - 02:25 PM

Thank you Wonko. Although I will conclude by stating that experience does not necessarily imply knowledge of all things relating to a particular subject.



#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 September 2013 - 02:53 PM

Thank you Wonko. Although I will conclude by stating that experience does not necessarily imply knowledge of all things relating to a particular subject.

Well, it depends ;):

Experience: that most brutal of teachers. But you learn, my God do you learn.

You must have been one of the very few lucky ones that never had to deal with a corrupted MBR/PBR or anyway unbootable system :ph34r: (for whatever reasons), or you would have learned about these topics, the hard way :(.

:cheers:
Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users