Help - Search - Members - Calendar
Full Version: Techie Help: MBR and Boot Sector saves,
The CD Forum > After Hours > Rest of the World
chuckr
Here's the story:
Got the Windows 7 RC download, burned ISO to DVD and getting ready for install.

BUT, I anticipate MS rewriting my MBR/BS area with their new 'Vista-like' boot code
and would like to be prepared to overwrite his 'new stuff', if I have to.
I will initially trust his 'resetting' the boot with the xxx /nt52 command (I think it was),
but I want to be ready, just in case.

So, I've saved the first 64 sectors off of PHYSICALDRIVE0, thinking that's where he'll probably 'do his damage'.
I saved as filename '_PhysDrv0_Sec0-63.bin.

Confirmed by file readback that the first 512 bytes is the MBR, with the 4 partition table entries, and that
the last 512 bytes 'look like' the Boot Sector for the first partition, C:, (0x7E00-0x7FFF):
0x7E04 = "NTFS" and the ASCII messages are clearly visible:
A disk read error occurred
NTLDR is missing
NTLDR is compressed
Press Ctrl+Alt+Del to restart
(There is no 0x8000 in the saved file)

Also made a _PhysDrv0_Sec0-62.bin, exempting the Boot-Sector itself...

When I tried the Vista RC, I ran into "major damage" with the HDD first sectors - it may have been because I
started to install the 64-bit version, etc.
Which I will not do with Win7. (After burning 64-bit DVD, a "Windows Setup" dialog box popped up about the
DVD install disc isn't -compatible- with my version of Windows, etc.) So, I'll forget that (for now) and let the
Athlon 2x do his 32-bit thing for a while longer...

My question is this:

N/A at this time... See Below:

(Been Here, done this:) smile.gif
The intent is to (hard-wire) boot, via the BIOS, an external USB HDD (the tera),
and start running my regular XP Pro off of that USB HDD.
Then insert the 32bit Install DVD and start the install from it,
hoping that he'll install to a nice fresh 'extended' partition on the USB HDD... (like XP Pro did, last week)

(Well, the hoping in vain - He does NOT install to USB or Firewire devices) thumbdown.gif

I assume he'll write his initial 'setup' files on C:\ (root) as usual, $whatever$...
(He did...)

(Didn't get this far, didn't do this:) sad.gif
But, even if this works out, I just -know- that he's gonna write the new-style boot-up code on the "SystemDrive"
which is my normal C: internal HDD. So, I wanna be prepared for that.

(Didn't get this far, didn't do this:) sad.gif
Surely, he'll modify my 'boot.ini' for the arc-path, but that's no biggie.
---------------------------------------------------------------------

Since the "Attachment Editor" is here:

Click to view attachment

And, the sad story. Compared to XP Pro, who didn't balk at all, Win 7 did:

Click to view attachment
jaclaz
I seem not to make head or tail of your post w00t.gif, so I'll just give you two semi-random hints.
  1. Vista, Server2008 and Windows7 do not use BOOT.INI
  2. A suitable way to install Windows 7 for tests is given here:
    http://www.msfn.org/board/index.php?showtopic=129475&hl=


jaclaz
chuckr
QUOTE (jaclaz @ May 6 2009, 01:52 AM) *
I seem not to make head or tail of your post w00t.gif,

That's just the disk platter ones and zeros.
Don't worry about it.
QUOTE
so I'll just give you two semi-random hints.
  1. Vista, Server2008 and Windows7 do not use BOOT.INI
  2. A suitable way to install Windows 7 for tests is given here:
    http://www.msfn.org/board/index.php?showtopic=129475&hl=

jaclaz

Bloody Excellent !!! thumbsup.gif

That link was perfect to get him to install and run, as a vdisk.
Worked like a charm. thumbup.gif

He did write to the MBR, though. It's different now.
Will also have to check the boot sectors and see what's changed there.

Now when I power up, I get the new Windows Boot Manager screen. (BCD?)
Says: Choose an OS to start, or press TAB to select a tool:

_Earlier Version of Windows
_Windows 7
_Start GRUB for DOS

Tools:
__Windows Memory Diagnostic

I now have a new hidden \boot\ folder on my C:\ drive. It contains 24 language folders and some files,
BCD.LOG, BOOTSTAT.DAT, and memtest.exe.
QUOTE
[*]Vista, Server2008 and Windows7 do not use BOOT.INI

Well, in a way, Windows 7 RC does now, because if you click on
_Earlier Version of Windows,
you get -exactly- your regular boot.ini on the screen...

Don't know if this is new with the 'vdisk' approach, or is new from Win7 RC version.
Also don't know if Win7 Beta ever had this.

I saw in a MSDN post that you didn't have 'vhd' formats:
VHD Format Specification:
http://technet.microsoft.com/en-us/virtual...r/bb676673.aspx

Thanks, jaclaz
jaclaz
No, that's normal even with Vista/Server2008.

The BCD (that you may consider a worsened version of BOOT.INI) is a simple text file a Registry Hive w00t.gif that holds, in a human unreadable manner, the same kind of info the BOOT.INI held.

When Vista/2008/Windows 7 installs, it adds to it's own bootmanager BOOTMGR configuration file (/boot/BCD) the info to chainload your old NTLDR.

See these:
http://www.multibooters.co.uk/bootmgr.html
http://www.multibooters.co.uk/multiboot.html

Your booting sequence changed from this:




to this (when you choose Windows 7 - Vista is the same):





or this (when you choose XP):



jaclaz
chuckr
OK, The "Official" results are in:

1. the MBR IS altered, and the executable code in the MBR is different.
2. the boot sector for partits 2 and 3 are NOT altered (even tho my 'vdisk' was put on my partit 3).

3. the boot sector for partit 1 (my normal C:) was altered, both with different executable "boot code" and
ASCII references to "bootmgr" vice "ntldr"...

I have a 'byte-by-byte' differential of both the MBR and the boot sectors.

I need a good "Dis-assembler", for some decent analysis - any recommendations ?

(Translations:)
I say: MBR
They say: pt (mbr) IPL
(There is only one 'IPL' = the "hard-wired" code that the processor enters, after coming out of his 'power-on' Reset.)
That is the INITIAL Program Load -- Semantically, no other IPL exists (in my mind).

I say: boot sector
They say: (PBR), Partition Boot Record... biggrin.gif
paraglider
Don't know why you seem so surprised that Vista / w2008 / Win7 updated the MBR. It uses a totally different boot mechanism and boot loader so it had no choice but to update the MBR. If you use a boot manager its easy to reinstall your boot manager after installing vista / win7. I use Boot-US. I just rerun the installer for the boot manager after the install has completed and all works fine. You have to be careful as some boot managers don't play nicely with the bcd boot mechanism.
jaclaz
QUOTE (paraglider @ May 10 2009, 02:35 PM) *
It uses a totally different boot mechanism and boot loader so it had no choice but to update the MBR.


Well, no.

The MBR is OS agnostic.

Vista/7 has however a new MBR to make it compatible with BitLocker.

See here:
http://www.911cd.net/forums//index.php?sho...1242&st=138
http://www.multibooters.co.uk/mbr.html

A "normal" MBR has the ONLY chore of chainloading the bootsector of the active partition.

jaclaz
chuckr
QUOTE (paraglider @ May 10 2009, 06:35 AM) *
Don't know why you seem so surprised...

Not surprised, knew it was coming and wanted to 'be prepared'...

QUOTE
A "normal" MBR has the ONLY chore of chainloading the bootsector of the active partition.

And, to issue the 'Error msges', when it 'hits the fan'... heh-heh. biggrin.gif

Thanks again for the excellent links, jaclaz ... (How does he do it?)

If anybody's interested, found this as freebie disassembler (Belgium).
Just DL'ed, and will have to check 'er out:
http://www.hex-rays.com/idapro/idadown.htm
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.