VuULF Dot Com Geek, Tweak and Game

31Dec/080

How To Install Windows XP on a Windows Vista Machine (Part 4)

Step 4: Editing the Boot Configuration Database (BCDEdit)

These are the final few steps that you will need to perform in order to allow you to boot from both Windows XP and Windows Vista on the same machine, without having to switch back and fourth between drives in the BIOS. Hopefully, you still have your Computer Management screen up and an Administrative Command Prompt. If not, just refer back to STEP 3 to open those again, if you don't recall how it is done.

Administrative Command Prompt with NotepadIn the administrative console (command prompt), unless you had to open it again, type c: or whatever the drive letter is that corresponds to your Windows Vista installation. You will probably be in c:\Windows\System32 so we will want  to change the directory to the root of the drive. To do this, simply type 'cd c:\', replacing c with your drive lettter for Windows Vista, and removing the quotes, then hit enter. Now we will need to edit the boot.ini file which we copied to your Vista drive. Type 'notepad.exe boot.ini'.

Original Boot.iniHere is where things get a little bit confusing. We need to tell boot.ini on which drive Windows Vista lives, even though we use this file to boot Windows XP. This is because the bootloader is located on the Windows Vista drive and is not accessed from the Windows XP drive. You will have to look at the partition table again on the management console. You now need to find the Drive number that Windows Vista is installed on. In our example this drive was drive 1 and Windows XP was on drive 0. Because the bootloader is on the Windows Vista drive, we need to tell boot.ini to find the loader on the first partition of the same drive that Vista is on. If your Windows Vista installation is on drive 0 then you shouldn't have to make changes, but if it is on a different drive number then we will need to change the value of rdisk in the boot.ini file. In our example, the Vista installation is on drive 1 so we will have to change the boot.ini values of the rdisk to 1 in both the default and operating system sections. If you don't change both values, then you will get a second bootloader option for Windows XP, one working and one not, so make sure to change both rdisk values if you have to. As I mentioned, though, if your Vista is located on disk 0 then you will not have to make these changes. You should end up with a boot.ini file that looks like the following. Make sure you save your changes, if you had to make any, and exit notepad.

Edited Boot.iniAs you can see in the image above, we have changed the value of rdisk from 0 to 1.

Now we come to the final steps of the installation. Here you have to perform a series of commands in an administrative console which will install Windows XP into the Boot Configuration Database. BCDEdit is a handy little tool which will allow you to enter the values needed to create a multiboot environment. You can use this command to install a Linux boot partition or any other boot partition, however that is beyond the scope of this article, so we will stick with Windows XP.

BCDEdit CommandsBack at the Administrative Console, and at the root of your Windows Vista hard drive (c:\ presumably), we need to know two things. What would you like the bootloader to display as the operating systems name? and What hard drive letter does Windows XP reside on? The following commands (duplicated in the image to the left) need to be issued in order to install the OS into the BCD.

bcdedit /create {ntldr} /d "Windows XP"

This command installs only the name of the operating system that you wish to add to the BCD. You can replace Windows XP for whatever it is you want the OS to show up as in the bootloader. Make sure to note that you need braces around ntloader and you need quotes around the OS description. Next command.

bcdedit /set {ntldr} device partition=g:

This command tells the booloader where to find Windows XP. You will have to replace g: with the hard drive letter corresponding to the hard drive that holds your Windows XP installation. Don't forget to add the colon after the drive letter, and do note the space between device and partition. Next and final commands.

bcdedit /set {ntldr} path \ntldr
bcdedit /displayorder {ntldr} /addlast

The first command tells the Windows Vista bootloader where to find the ntldr file. The second command tells the Windows Vista bootloader to list Windows XP as an entry and to place the Windows XP entry at the end of the available operating systems list at boot time - this step is not optional, Windows XP will not show up in the list if you do not issue this command.

You can now close all of your windows, and reboot your machine. You should be greeted with a menu that lets you choose your operating system and will be able to boot into either Windows Vista or Windows XP. Enjoy!

-=[V]=-

31Dec/080

How To Install Windows XP on a Windows Vista Machine (Part 3)

Step 3: Transferring System Files

You should now be able to boot into Windows XP and work in that, but you don't have any access to Windows Vista, save maybe being able to see the hard drive in Windows XP. Now we have to undo all of the stuff we did in the BIOS which will allow you to be able to boot back into Windows Vista, however, you won't be able to boot into Windows XP yet. Refer back to Part 2 to refresh you memory about the changes we made in BIOS. Basically, the most important change we have to make, is in the Hard Disk Drive area on the Boot tab. You will need to reorder you hard drives so that the Vista boot drive is again at the top. Check your device boot priority and make sure either the CD/DVD drive or the Vista drive is in the top of the boot order. (Note: It is handy to leave the CD/DVD drive at the top and the Windows Vista drive second in case you want to boot from a bootable CD such as a Live Linux distribution, Norton Ghost, or an OS Installation CD). Verify you have your boot information correct and then save and exit from the BIOS setup. You should now test to see that you will boot into Windows Vista. If you don't boot to Vista, double check your settings and try again.

Now that we are back in Windows Vista, you will need to open up your management console and take a look at where everything is located in respect to how Windows sees it. To do this simply click start then right click on Computer in the right pane of the start menu and click Manage. Because this can affect system wide settings, you will need to confirm the action to UAC by clicking Continue.

Windows Vista Managment ConsoleYou should now have a window on your screen that is similar to the image on the left. Here you need to remember a few things. First you need to remember the drive letter that Windows XP is installed on. If you didn't label the drive specifically, the Windows Vista drive should be the one that says Boot beside the healthy status. It may say a few other things, such as page file, etc, as well, but boot should be in there somewhere. Now you should have the letter of the Windows XP hard drive, in the example here, this will be 'G:'. You will also want to note which physical identifier the hard drive has. Below the list of drives you will see the partition bars labeled Disk 0, Disk 1 and so on, for all of your physical drives. Our Windows XP installation resides on Disk 0, so we will also want to remember that.  Yours may be on Disk 1 or another drive, so just make sure you know which number corresponds to your installation.

Administrative Command PromptMinimize the Management console and open up an Administrative Command Prompt. To do this, click Start, All Programs, Accessories and right click on Command Prompt then click Run As Administrator. Again, you will need to authorize the action via Continue on UAC. This will open up a black command prompt window like the one pictured on the left.

Administrative Command Prompt With CommandsNow that we have an administrative command console open we will have to execute a number of commands to grant us access and change the visibility of some files we will need on the Windows XP hard drive. First off, to make sure you are on the right drive, type the letter of the drive which holds Windows XP then a colon and hit enter. So for our example this would be: 'G:' (without the quotes). Now we have to set some attributes of the needed system files on the Windows XP hard drive. We need access to three specific files; ntldr, ntdetect.com and boot.ini. There are few system files on that hard drive at the moment so we can just globally modify the files. In the Command prompt type 'attrib -s -h *.*' and then hit enter. Now, should you do a 'dir' you will be able to see these files. We now need to copy those three files over to the hard drive that holds Windows Vista, this should be c:, but sometimes it can be different, although highly unlikely. So, we now have to copy those three files. Type the following commands, replacing <drive> with the corresponding drive letter for your Windows Vista installation, don't forget the colons after the drive letter.

'copy ntldr <drive>:'
'copy ntdetect.com <drive>:'
'copy boot.ini <drive>:'

We have now made copies of the files we will need in Windows Vista in order to make the Windows XP installation bootable, although we are not wuite done yet. Before we continue, let's change the attributes of those files back to hidden system files. This time we type 'attrib +s +h *.*' to reset the system and hidden attributes. We are now done this part of the process, only one more step remains.

PART 4