Jump to content

Drive Order


NATO

Recommended Posts

ETA I feel like I have a problem, I do not know what I am doing, I only do what I am being told but don't know what's going on behind the scenes

Maybe you are not very familiar with the theory and operation of booting a NT based system.

Brief "crash course" :w00t: :

All "MS" Operating System are quite "arrogant".

When you install them they give you NO option but "automagically" take possession of your hard disk and do to it whatever they see fit.

The standard booting sequence (for windows NT up to Server2003) is the following:

BIOS->MBR->active primary partition bootsector-> NTLDR-> BOOT.INI choices -> loading of the NT OS

The BIOS just reads the MBR (first sector of first disk in boot sequence).

The MBR contains CODE (that normally only loads the first sector of the active primary partition in the partition table) and DATA (the partition table, the Disk Signature, the Magic bytes)

The PBR (Partition Boot Record) or VBR (Volume Boot Record) or bootsector is the first sector of the partition loade dby the MBR. It contains as well some DATA (the so called BPB or Bios Parameter Block containng info on the volume, the filesystem, etc.) and some CODE (the code for a NT system load or chainloads NTLDR, we will call this code "NT52" you'll understand later why).

With Vista :ph34r: (and following, like 7) the booting sequence remained the same BUT the actual files involved changed:

BIOS->MBR->active primary partition bootsector-> BOOTMGR-> \boot\BCD[1],[2] choices -> loading of the NT OS

The MBR uses slightly different code, but to the SAME effect (simply loads the first sector of the active primary partition in the partition table)

The PBR has different code that loads BOOTMGR (we will call this code "NT60", you'll understand later why)

[1] Normally when you install Vista :ph34r: or later over a disk that has already a BOOT.INI the choices in there are "imported" automatically in the \boot\BCD, but it depends on the exact way the install was performed (on what was actually "visible" during the install)

[2] The BOOTMGR doesn't read only the \boot\BCD, but also (if existing on the same partition) the BOOT.INI, BUT it "discards" each and every entry involving an arcpath (like multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect) and ONLY reads those pointing to a file (like C:\grldr="grub4dos")

There is an utility bootsect.exe that can be used with parameters:

/NT52 <- this will re-write the PBR CODE (leaving the PBR DATA "as is") with one pointing to NTLDR

/NT60 <- this will re-write the PBR CODE (leaving the PBR DATA "as is") with one pointing to BOOTMGR

Most probably when you re-installed 7 you have hidden the partition where XP was or however the previous XP installation was not detected and was not added to the \boot\BCD.

The PBR CODE was re-written anyway pointing to BOOTMGR.

The "i only get a black and white menu with option of loading Win7 or grub4dos." is likely a "merge" of the contents of the \boot\BCD (ONLY the Windows 7) and of the BOOT.INI (only grub4dos, since arcpaths entries are ignored).

It is easy to verify this, just add to the BOOT.INI a line like:

C:\afakeentry="A Fake Entry"

and see if it is added to the "black and white menu with option of loading Win7 or grub4dos".

If you can re-cap your current situation of disks I might be able to provide specific instructions on how to solve the problem

, in the meantime you can try selecting grub4dos in the choice you get, then press c to get to command prompt and at it:

grub>

type:

root
chainloader /ntldr
boot

pressing [ENTER] after each command.

You should be able to boot to XP "as before" (i.e. see all the choices you have in BOOT.INI.

When you run the "root" command, grub4dos should provide you with the disk/partition number, like (hd0,0), and when you run the "chainloader /ntldr" it should provide info like "Will boot NTLDR from.....". Please jolt down these info before issuing the "boot" command and post them.

jaclaz

Link to comment
Share on other sites


If you can re-cap your current situation of disks I might be able to provide specific instructions on how to solve the problem

Oh no, not before I've studied your crash couse w/instructions. Maybe I'll know what to do the next time!

roffen

Link to comment
Share on other sites

I've always made it a point to know what I am talking about and you seem to be of the same kind!

Everything was as predicted, and the XP was OK!

root (hd0,0)

chainloader /ntldr Will boot ntldr drive = 0x80, partition = 0x0 (didn't write down the hidden value)

boot

menu was

XP

XP music

Fake entry

grub4dos

Menu was green, I had added green earlier in my atttempts at sleuthing.

I presume the agent responsible for the merger belongs to Win7?

I suppose what do I do next is bootset /NT60 but I await a go before doing it,

I can manage my system using your method in the meantime.

Edited by Roffen
Link to comment
Share on other sites

I suppose what do I do next is bootset /NT60 but I await a go before doing it,

No, it's the other way round.

The new install of Windows 7 ran ("virtually", what was actually ran was another program):

 bootsect.exe  /NT60 C:

the result is that the bootsector is currently of the "NT60 type" that consequently loads BOOTMGR (and from it \boot\BCD).

To "revert" you need to run (from the booted windows 7 and AFTER having verified that the C: drive letter belongs to first partiton of first hard disk, aka the (hd0,0) you got from the grub4dos command):

 bootsect.exe  /NT52 C:

the result will be a bootsector of the "NT52 type" that consequently loads NTLDR (and from it BOOT.INI).

Before running it, do read the related articles on technet, though the good guys at MS managed to have an "older" article with a "higher" number and mixed (as usual) the minds of 3/4 to 4/5 of readers by using the (completely wrong) adjective "master" talking of the partition boot record code, do read the comments to this article:

http://technet.microsoft.com/en-us/library/cc749177(v=ws.10).aspx

and further mixed mattters with the "7" version of the article (since the new switch /mbr was introduced):

http://technet.microsoft.com/en-us/library/dd744577(v=ws.10).aspx

jaclaz

Link to comment
Share on other sites

To "revert" you need to run (from the booted windows 7 and AFTER having verified that the C: drive letter belongs to first partiton of first hard disk, aka the (hd0,0) you got from the grub4dos command):

I wil do as you said, I just found the quoted sentence somewhat ambiguous;)

I think what it means is

1.Booting XP, verify that the C: drive letter belongs to first partiton of first hard disk, aka the (hd0,0) you got from the grub4dos command

2. To "revert" you need to run from the booted windows 7: bootsect.exe /NT52 C:

(the result will be a bootsector of the "NT52 type" that consequently loads NTLDR (and from it BOOT.INI).

bootsect.exe /NT52 C:)

Edited by Roffen
Link to comment
Share on other sites

I think what it means is

1.Booting XP, verify that the C: drive letter belongs to first partiton of first hard disk, aka the (hd0,0) you got from the grub4dos command

2. To "revert" you need to run from the booted windows 7: bootsect.exe /NT52 C:

(the result will be a bootsector of the "NT52 type" that consequently loads NTLDR (and from it BOOT.INI).

bootsect.exe /NT52 C:)

No. :no:

Drive letter assignnment may vary depending on which system is booted, it might be the same in your configuration, but you need to make sure that the "right" partition gets the "right" drive letter under the OS under which you will run bootsect.exe (which is the Windows 7), or alternatively change the C: drive letter in the suggested command to the one assigned to the (hd0,0), or, still alternatively, run the command from the XP (it should run as well but you will need to either copy to the XP the bootsect.exe program - which comes with Vista :ph34r: and Windows 7 but that is NOT included in the XP - or run it from a command prompt after having navigated to the Windows 7 System directory).

To recap:

  1. there is NOT a bootsect.exe in XP
  2. it should run from XP alright nonetheless
  3. you need to run it (up to you deciding if running it from XP or 7) with the RIGHT drive letter (the one that is assigned to that partition under the booted os under which you run the tool)

jaclaz

Link to comment
Share on other sites

Boot XP: C:

Boot 7: C:

Since no bootsect .exe could be found (Win7 Home Premium), I downloaded one listed as a WIn7 version.

Running from command window generated no message, only return to command prompt, and nothing have changed.

Guess it is kaputt or something funny, no response when I type bootsect /help

Found this but am unable to get WAIK.

bootsect and windows xp

If you're running Windows xp and want bootsect you can get it from the WAIK, it is located at "Windows AIK\Tools\PETools\x86\bootsect.exe". You can then copy it to the "%systemroot%\system32" directory and use it from the command line.

* Yes you need to install WAIK on your computer to get bootsect.exe

Edited by Roffen
Link to comment
Share on other sites

Strange that it is not in Home Premium :unsure:

There is no "real" need to install and not even to download the "full" WAIK, just for the record, it is possible to often get "parts" of it, but it is more complex.

You can do with another tool, bootpart:

http://www.winimage.com/bootpart.htm

Unzip the bootpart.exe in a convenient path, let's say C:\bootpart.

Boot to the XP.

Open a command prompt and navigate to c:\bootpart (or whatever).

issue the command:

BOOTPART

(without parameters), you should see a list of the drives, then run:

BOOTPART WINNT BOOT:C:

No WAIT, your volume is NTFS, right?

Then bootpart will not do.

You'll need to either download the whole WAIK or use the httpdisk driver, see:

http://reboot.pro/topic/13049-extract-files-out-of-waik-without-downloading-whole-waik-first/

http://reboot.pro/topic/13049-extract-files-out-of-waik-without-downloading-whole-waik-first/?p=114118

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Uh-oh, looks pretty messy.

And in the end, I don't find any WAIK for XP.

And bootsect doesn't work in WIn7?

And I might try the version I have with /help on another WIn7 installation just to find out if it is a Home version problem.

And ...

Link to comment
Share on other sites

All right, I found the options very cumbersome and would require more work than simply getting the entier pack.

So I downloaded, burned DVD and setup with install of .NET Framework and msxml 6.0.

Installe WAIK on aonther drive, didnt want all that mess on the SSD, found the 32bit version of bootsect and am now going to test if it reponds to /help,

then I'll have to find out if I should use 52 or 60. (On XP, first partition).

All right, much ado but not for nothing; i hope. This time it responded to /help. Hooray!

recap:

I will run - as I have to, under XP.

There I type bootsect /NT52 C:

C: is the root of partition wher XP was installed.

C: also is the root of the partition where Win 7 was - and is - installed.

But I do nothing till i hear from you... Am scared and don't think prayers work on computers. Maybe they will on quantum computers; they are right around the corner. With a capacity matching that of the whole universe. Why not, we already have desktop particle accelerators.

Edited by Roffen
Link to comment
Share on other sites

You still seem to be not fully "convinced" or have fully grasped the concepts, trying to be more explicit.

You can run bootsect from either of XP or 7, as long as that drive is the one which gets the letter C:.

As a matter of fact, there is NO WAIK for XP (and if it were it would not contain bootsect.exe), bootsect.exe was evidently developed AFTER XP (because all NT based systems up to XP/2003 ONLY used the "NT52" bootsector code) in order to fix the possible issue that Vista :ph34r: (which is the first NT based OS using the "NT60") install may cause.

By pure chance the bootsect.exe that you got (from the Windows 7 WAIK) runs as well in prior systems (both Vista :ph34r: and XP), but it was "designed" to run under 7.

Since now when you boot you get to the BOOTMGR->\boot\BCD choices, you have NOW the NT60 bootsector and you want to CHANGE that to the NT52 one, so that instead when booting you get to the NTLDR->BOOT.INI choices.

To recap, if you run:

bootsect /NT60 C:

NOTHING will change as the command will re-write over your current bootsector code an identical one.

if you run:

bootsect /NT52 C:

the bootsect.exe will replace your current bootsector code with the one invoking NTLDR (which is what you want).

jaclaz

Link to comment
Share on other sites

Good, I think i've absorbed most of what that, and it seems there was nothing to be afraid of, it is always posible to revert from 60 to 52 and vice versa?

Yes, as long as you can boot :angel:whistle: .

But don' t worry :) you are set in such a way that you can always boot *something* :yes: with any of the two bootsector codes in effect.

And even in the case of Murphy's Law events, like (say) a power outage in the exact split millisecond the code is being written to the disk, there is always a way back by booting to the Windows 7 DVD, or to a USB stick, etc.

jaclaz

Link to comment
Share on other sites

I believe an aging brain is responsible for some difficulty in getting a clear picture from written explanations. Much of what I was doing in my life before the Intel 4004 used lots of diagrams.

I would like to make (may even try)some diagrams of what is located where and how it relates to it's surroundings in the boot process and (as with multiboot) how they may be inter-related to other, neighbouring "entities" in the same clade.

(A group of organisms, such as a species, whose members share homologous features derived from a common ancestor.)

Or something like that.

Edited by Roffen
Link to comment
Share on other sites

I believe an aging brain is responsible for some difficulty in getting a clear picture from written explanations. Much of what I was doing in my life before the Intel 4004 used lots of diagrams.

I would like to make (may even try)some diagrams of what is located where and how it relates to it's surroundings in the boot process and (as with multiboot) how they may be inter-related to other, neighbouring "entities" in the same clade.

Well there are a few pre-made ones.

Looky here:

http://www.multibooters.co.uk/multiboot.html

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...