Windows optimize

Use Bootsect to extract Vista or Windows 7 from a dual-boot configuration

You can use the Bootsect command to remove the Windows Boot Manager and its Boot Configuration Data system from the boot partition of a hard drive and replace it with Windows XP’s NTLDR boot management system. Greg Shultz shows you the Bootsect commands required to extract Microsoft Windows Vista or Windows 7 beta from a dual boot configuration.

I recently dug out one of the spare hard drives that I use on my test system to see what was on it. I discovered that it contained a dual-boot configuration consisting of Microsoft Windows XP and a late beta version of Windows Vista. The original boot partition of the drive contained XP, and Vista was installed on a second partition. Of course, this meant that Vista had installed its Windows Boot Manager and its Boot Configuration Data system on the boot partition.

I wanted to get rid of the Vista partition as well as its Windows Boot Manager system so that I could use XP and have access to the full hard disk. My first thought was to simply reformat the hard disk and then reinstall XP; however, the more I thought about that plan of action, the more it sounded like too much work. I was about to remove that particular hard disk and try another from the box when I remembered something about the Bootsect command.

After doing a bit of investigation, I found what I was looking for -- the instructions listing the complete command line for using the Bootsect command to remove the Windows Boot Manager and its Boot Configuration Data system from the boot partition and replace it with XP's NTLDR boot management system. Taking the next step, I discovered that the same command line will also work to remove Windows 7 Beta from a dual-boot configuration with XP.

In this Microsoft Windows Vista and Windows 7 Report, I'll show you how to use the Bootsect command to extract Windows Vista or Windows 7 Beta from a dual-boot configuration.

This blog post is also available in PDF format in a TechRepublic download.

Getting started

The Bootsect command can be found on either the Windows Vista or Windows 7 Beta DVD in the Boot folder. The first thing that you need in order to perform this procedure is the appropriate DVD.

To begin, boot the system into the original operating system -- the one on the first partition. Then, insert the DVD into the drive. As soon as you do, press and hold down the [Shift] key in order to prevent the DVD splash screen from appearing. Once the DVD has spun up, you can release the [Shift] key, and you are now ready for the next step.

Running Bootsect

You can launch the Bootsect command from a Command Prompt or by using the Run command. Since the latter is quicker, just press [Windows]+R to open the Run dialog box. When the Run dialog box appears, type the following command line in the Open text box:

X:\Boot\Bootsect.exe /nt52 ALL /force

Where X is the drive letter assigned to your DVD drive.

For example, if your DVD drive letter is D: your Run dialog box will look like the one shown in Figure A.

Figure A

You can launch the Bootsect command from the Run dialog box.

When you click OK, you'll momentarily see a Command Prompt window, and the operation will instantly remove the Windows Boot Manager system and its Boot Configuration Data from the boot partition. At this point, remove the DVD from the drive, and you can then restart the system.

When the system restarts, you'll see that the Windows Boot Manager no longer appears and the system boots directly into XP.

Cleaning up

To continue cleaning up, you will have to remove a couple of backup files from the root directory as well as remove the Vista or Windows 7 files from the second partition. You'll find the Boot.BAK and Bootsect.BAK files in the root directory, as shown in Figure B. You can delete them; they are system files so you will be prompted to confirm the delete operation.

Figure B

You can select and delete both of the leftover backup files.

Now that the Vista or Windows 7 Beta Windows Boot Manager is removed from your XP system, you can use partition software to reformat the second partition, merge it back into the first partition, set up another dual-boot configuration, or use it some other way.

What's your take?

Do you have either Windows Vista or Windows 7 Beta set up in a dual-boot configuration with Windows XP? Will you use this technique to remove it? What partitioning software do you use? As always, if you have comments or information to share about this topic, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

TechRepublic's Windows Vista and Windows 7 Report newsletter, delivered every Friday, offers tips, news, and scuttlebutt on Vista and Windows 7, including a look at new features in the latest version of the Windows OS. Automatically sign up today!

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

21 comments
bshimmin
bshimmin

How do you get rid of the XP partition instead of Vista or Windows 7?

neiatererei
neiatererei

how about when dual booting with Ubuntu 9.04 and you want to remove Windows Vista which is on the boot sector or the primary partition?

program2be
program2be

Will this work if I have an XP boot sector I wish to remove and put the boot sector and a Vista 64 bit which runs great for me. XP was not working so I switched to Vista 64 bit. Can I move the boot to the Vista drive?

Jacky Howe
Jacky Howe

to apply the master boot code that is compatible with NTLDR. I'm using Diskpart to manipulate my Partitions on larger drives these days. I also use Gdisk from Symantec. Both have there uses.

snooper
snooper

what i found that was annoying was with an Win XP & Vista Ultimate dual boot setup is that you cant then select XP in the boot options, it doesnt recognise xp anymore to boot from.. Grrrr

larryhyman
larryhyman

You could also use you XP CD, boot from, start in recovery console and use the command fixmbr; Fixmbr Command Syntax: fixmbr (device_name) device_name = This is where you designate the exact drive location that a master boot record will be written to. If no device is specified, the master boot record will be written to the primary boot drive. Fixmbr Command Examples: fixmbr \Device\HardDisk0 In the above example, the master boot record is written to the drive located at \Device\HardDisk0. fixmbr In this example, the master boot record is written to the device that your primary system is loaded onto. If you have a single installation of Windows installed, which is normally the case, running the fixmbr command in this way is usually the right way to go.

garage_dba
garage_dba

That's all good info, but what if you want to get rid of the older OS? I have win2000 server on one drive and win2008 server on another. I have not used win2k for months but Windows insists on backing it up since it is the 'system' drive. I want to blow it away and just boot from the win2k8 partition on the other drive. Not sure if the boot stuff would end up on the 2k8 drive or the other drive. What would be the safest procedure?

pgit
pgit

I've always use fixmbr for this. It's easier to lay hands on a XP disk than vista, most manufacturers don't give out disks with new hardware anymore. Of course this entails the recovery console, and if admin passwords are an issue (as in forgotten) there's some command line fun ahead to wipe them. The benefit of this method is it's done withing the operating system. The potential drawback is it's done within the operating system... what if the problem is nothing will boot? Good tip, though. Bookmarked, with thanks.

a_vanderson
a_vanderson

We downloaded Win7 Rc1 from Microsoft...no CD/DVD...tried it, didn't care for it...got rid of it...but now am stuck with the dual boot still on the system. How do we get back to Xp's original boot system without having a dvd???

jmbrasfield
jmbrasfield

Run a tri-boot system of XP, Vista and Linux all on separate hard drives. Installed each opsys independently on that drive while the other drives were unplugged. Can boot to which ever system I want at bootup (f8), mostly Linux, occasionally XP, can't remember the last time I used Vista. No need for boot managers, each drive has it's own. Not even aware of the other opsys. If I want to get rid of one of the three, I boot into one of the other two and quick format the third, bye bye.

Seaghost
Seaghost

I have installed many a dual boot system, but, have never used this method to remove it. All I did was to open autoexec.bat, or config.sys, can't remeber which one at this very moment, and remove the line of text that refers to the second operating system. Then click on save, then close, and viola, all is back to normal. I have not had a system yet that this option has not worked on, and I have been doing this for many years. I am not saying that your option is wrong, just a little long winded is all.

Mark W. Kaelin
Mark W. Kaelin

Do you have either Windows Vista or Windows 7 beta set up in a dual boot configuration with Windows XP? Will you use this technique to remove it? What partitioning software do you use?

ivex321
ivex321

Probably the best way to do this is you boot into Symantec ghost or any other disk clone service and clone the win 7 partition onto XP and later format the cloned partition and merge it with first , win 7 partition :-).

The Lush
The Lush

My Vista (primary partition) is all kinds of messed up, it shows nothing other than a black screen, but my Win 7 RC partition is perfect. How can I delete the Vista install and keep 7?

seanferd
seanferd

config.sys, or boot.ini will not remove a boot manager/loader.

jwbrew1
jwbrew1

msconfig.exe, Boot, Delete. Restart. Done.

vwbug1968
vwbug1968

Isn't it easier to use EasyBCD from http://neosmart.net/ to manage your dual-boot XP and Vista/Win7 and also restore the XP boot loader?

Jacky Howe
Jacky Howe

Seeing that you may have only recently installed W7 I would Back it up and reinstate the drive with Darik's Boot and Nuke. Then do a fresh install of W7. http://dban.sourceforge.net/ Autonuke should do it as it runs through 3 times writing 0's and 1's.

bvjones59
bvjones59

config.sys and Autoexec.bat truly will not work with later versions of Windows. XP creates ntldr, as the article says, and now Vista/Win7 has another entire process, which messes with XP's setup and does not revert nicely. I'm definitely bookmarking this link! I tried awhile back to remove a Vista beta from my tri-boot system, and got it off okay, but still haven't gotten my XP drive quite right again: when shutting down, it actually stops at "it is now safe to turn off..." How's that for a dinosaur?

John82654
John82654

Can you give a little more info?

seanferd
seanferd

I used to like to mod the startup/shutdown screens, but there hasn't been much of a point with XP. Haven't seen a shutdown screen hang out for very long. I do like Bginfo for a startup screen, though. So you actually have to power down with the switch? Sounds like something isn't communicating with the ACPI. The machine can't be that old. :) See this: http://support.microsoft.com/kb/810903