Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Monday, July 5, 2010

ntldr boot object in the BCD of dual boot systems

The core boot files of Vista and Seven are the same but there are some operational differences. This page will examine the areas where the two operating systems deviate. Full testing of Seven and the updating of the entire site is still in progress, so be cautious.
Generalizing the Windows7 BCD
The instructions on the Vista Cloning Page for Generalizing the BCD can almost all be used with Windows7. Of course you should only generalize a BCD that is on the same partition as the Win7 or Vista operating system it is for. If you are using the MS bootmanager to dual or multiboot then you cannot generalize boot Objects in the BCD that are for operating systems on partitions other than the bootmanager partition, (the System partition). If you have separate System and Boot partitions for your Win7 install then you should not attempt to generalize its BCD. The new Win7 “System Reserved” mini system partition takes the BCD out of the OS and so you cannot generalize the BCD for such a Win7 install. If you need to clone or move Win7 to other partitions or drives then it would be easiest to avoid the use of a separate system partition, otherwise you will have to “re-specialize” the relevant boot Objects in the BCD after each OS move.
There is a new BCD element value for Win7 that makes the MS boot manager (bootmgr) go hunting across partitions for a bootable Windows operating system. The Windows sysprep tool will set the necessary BCD Elements to “Locate” and this allows for the copying of hard drives or the cloning of Win7 in tandem with a System Reserved partition. I've found it has limited scope however and is of little use in multiboot machines that have various OSes and drives. It only works on systems that have a simple setup where the desired Win7 install is in the correct position to be the first OS discovered. I have not yet seen a way to use the BCDEdit.exe tool to set the “Locate” value in the BCD and wonder if it has even been programmed in. If you know otherwise then please share. feedback. I would suspect it can be done with the WMI Provider, or you could sysprep a Win7 install and save the modified BCD.
Locate Value
The syspreped Win7 BCD – showing the appropriate Elements set to “locate”
The {memdiag} Object is also set to Locate, but the new WinRE boot Object is completely removed from the BCD, then replaced during first bootup of the syspreped operating system. no longer missing
A misleading and unhelpful error message in Vista has been replaced in Seven with just an unhelpful message. Be thankful for small mercies I suppose, at least the new message will no longer send people down a blind alley. Now you are just pointed gestured in the direction of hundreds of alleys and left to make your own wrong turns.
“The boot selection failed because a required device is inaccessible.”
See the MBR and Vista Boot Files pages for the likely cause of this message. Substitute it for “winload.exe ………is missing or corrupt”.
Most times that people see the old message in Vista it has nothing to do with winload.exe being missing or corrupt. In Seven when I break any part of the boot sequence, including just removing or corrupting winload.exe, it is the new message that I see. I did however have an instance of the old message appearing and I can’t explain or repeat it. It happened just once on one machine while breaking and fixing BCDs, so I suspect it was a cross-over to a Vista install somewhere on one of the drives, but please let me know if you see it with Seven. feedback

The ntldr boot Object in the BCD
Inside Vista’s default BCD store there is always an ntldr boot Object already defined and waiting to be used for a dualboot arrangement with a legacy WinNT operating system. In Win7 the ntldr object is no longer a standard inclusion and will only be created if dualboot with an old WinNT is actually configured at install time.
For people who go against the Microsoft grain and add XP after Vista, but still want to use the MS boot manager, it takes one command to add ntldr to the Vista boot menu.
bcdedit /displayorder {ntldr} /addlast (or if preferred /addfirst)
With Windows 7 it will require three extra commands:
bcdedit /create {ntldr} /d “Windows XP”
bcdedit /set {ntldr} device partition=X:
bcdedit /set {ntldr} path \ntldr
bcdedit /displayorder {ntldr} /addlast

Where X is the drive letter of the Win7 partition, as currently seen by the environment from where you are editing the BCD - (usually C:).
Of course this is only if you have installed XP entirely to its own partition and prevented it from taking over the Win7 partition. You also have to manually move copies of the XP boot files ntldr, boot.ini and NTDETECT.COM into the root of Seven.
If you have allowed the creation of the new Win7 mini system partition then you would copy the XP boot files there instead. You would also have to set the {ntldr} device Element accordingly - X would then be the drive letter of the mini system partition. Of course if working from inside Win7 the mini partition won’t be assigned a drive letter so you will have to use the Volume number. If the mini partition is the first partition on the hard drive then it will be Volume1
bcdedit /set {ntldr} device partition=\Device\HarddiskVolume1
The {ntldr} device Element would be the same as the {bootmgr} device Element.
Win7 BCD 
Whole drive sector-by-sector cloning
If you make a complete sector-by-sector clone of a drive containing Vista then you will duplicate the disk signature and the partition offset and so you will not have to modify the BCD to get Vista booting, because it will already contain the correct information. Be aware however that you cannot have two hard drives on the same computer with identical disk signatures. If you boot any WinNT operating system when there are two drives with the same signature then one of the signatures will be automatically changed. If you do clone a Vista drive in this way and need both drives connected at the same time then generalizing the BCD before cloning, or re-specializing or generalizing the BCD on the affected drive, will fix the problem. This has always been an issue when cloning entire hard drives containing WinNT, but before Vista a signature change could in many cases not cause an issue and so may have went unnoticed.

No comments: