Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a fairly new PC. When I first bought it, I set it to dual boot Windows XP and OpenSUSE Linux. When OpenSUSE died (strictly just X and/or KDE) for no clear reason, it was the final straw that broke the camels back after no end of driver problems, configuration problems etc.

Linux was mostly my internet operating system anyway, truth told, with most other stuff done in Windows XP - but with me no longer willing to trust that on the internet (ethernet drivers disabled) for the last few years.

Luckily, I got a good price on a legal copy of Windows 7 Home Premium.

When I installed Windows 7, it refused to recognise Windows XP in the bootloader. I didn't worry too much - I replaced OpenSUSE with Ubuntu, and used Grub for the multi-booting.

I've now ended up with the following partitions on my hard drive...

1 : 100GB : Windows XP main partition - Drive C in WinXP, not mounted in Win7
2 : 100MB : Windows 7 reserved - not mounted in anything
3 : 100GB : Windows 7 main partition - Drive C in Win7, not mounted in WinXP
4 : ...
  4a : 166GB : Data partition - Drive G in WinXP and Win7
  4b : 100GB : Ext3 partition for Ubuntu

However, now that I'm using Windows 7 and I've converted all my backup stuff (Firefox profile moved to Win7 etc) I no longer need or want Linux installed - I'd rather have a bigger shared data partition. I haven't even booted into Linux in weeks now. Windows 7 has taken on the role of web-browser host, and although the pretties are probably no better than KDE (I really must find a phase-of-the-moon widget - er, sorry, gadget) the driver issues and most configuration hassles just don't happen any more. The only configuration hassle I've had for Windows 7 is basically what I'm describing here.

The thing with each operating system seeing itself as drive C, and not seeing the other OS main partition at all, was initially because of another oddity in how Windows 7 installed, but it's also a nice scheme IMO and now I want to keep it that way.

So... I want rid of Linux (actually, it'll probably live on in VirtualBox, but not as a main operating system). But Grub stores needed files in that Linux partition. I could revert to the Windows 7 bootloader (the usual boot-the-CD and fixmbr, fixboot trick presumably works for Win7, or something similar) but I already know that that doesn't detect my Windows XP.

I've tried to do some research. One thing I found was GRUB4DOS and WINGRUB. What I found with those is that GRUB4DOS itself really is for DOS - not Windows. And the most recent download for WINGRUB is dated 2004, and doesn't seem to be compatible with Windows 7.

I found various rescue boot disk images etc, such as Rescatux. I've found several ways to repair GRUB with these, provided that I have a Linux install. It's very likely that I'm missing something, though, as it seems the power tools for these things just dump you into a virtual terminal to use command-line tools without much indication of what tools are available or how to use them. Possible the neatest trick in these things is including a working internet connection and web browser, but since I couldn't find the help I needed even with that...

I used to be happy enough editing boot.ini in Windows XP - but there is no boot.ini in Windows 7, and I haven't had much luck trying to work out the Windows 7 way.

Finally, EasyBCD seemed like the magic I needed. I installed it, and it seemed very easy to add Windows XP to my boot menu - but then it told me that it couldn't find Windows XP. Apparently, Windows XP must be in a partition that's mounted in Windows 7 and given a drive letter. It can't recognise, and won't reference, that unmounted partition.

Can anyone recommend a solution that will work for this? And because I don't have a credit card, so paying online is virtually impossible, any software needs to be free - at least for trying, so I only have to go through the hassle of finding some other way to pay when I know it'll work.

share|improve this question
The "Linux isn't ready for the desktop" commentary isn't really relevant, and will just cause some unnecessary debate. – Hyppy Jul 24 '11 at 14:34
@Hyppy - my experience is that without the context, I'll get loads of "just dump Windows and use Linux" comments anyway - it's a no-win thing when you want to do something (with good reason) that is against some groups religious views. Note - I've been using Linux for years, and as I said, will probably carry on using it as a virtual machine guest O/S (where driver issues are non-issues). A policy of never mentioning the problems won't stop people quickly discovering them for themselves. – Steve314 Jul 24 '11 at 14:40
Halfway reading your question I kept thinking "I'm so recommending EasyBCD for this", until you say it doesn't recognize unmounted partition. So, when booting to Windows 7, it's Disk Management also refuse to mount the XP partition? – Martheen Cahya Paulo Jul 24 '11 at 14:55
@Martheen - when I originally installed Windows 7, the Windows XP partition was mounted in Win7, but as drive D or E or something. It still wasn't recognised by the bootloader. I used the disk manager to remove the drive letter later (it's confusing to have the same partition as sometimes C, sometimes E or whatever). One possible option is that I might simply re-mount the WinXP partition in Win7 to keep EasyBCD happy - but I'd prefer to avoid that if possible. One thing I've found is that some things install stuff in unexpected places - but not if those places aren't visible. – Steve314 Jul 24 '11 at 15:18
it's a no-win thing when you want to do something (with good reason) that is against some groups religious views - You're just digging the hole deeper. Linux doesn't have a problem, or Ubuntu would be here asking how to get off your drive. You have a problem, one that you want the Linux "enthusiasts" to fix for you. You should have left it "I'd like to remove Linux" if you weren't looking to stir the pot. You'll get a better response if you edit your question to tone down the rhetoric. – Joe Internet Jul 24 '11 at 15:48

Your best bet is to make an XP CD and a Windows 7 dvd. In short, you need to make the XP partition bootable.

Copy the files from the XP CD boot folder into the root directory of the XP partition.

Use diskpart to mark the XP partition as active.

  1. Open a command prompt
  2. type diskpart
  3. type list disk then select disk number
  4. type list partitions then select partition number
  5. type active

This sets your XP partition as the bootable partition

Boot into the WIndows 7 DVD and select repair

It should modify the bootloader to list WIndows 7 and XP now.

share|improve this answer
I'll give it a try tomorrow. At present, the active partition is the 100MB reserved partition - I had to set that to get Windows 7 SP1 to install. I'd have thought Windows XP was active before I installed Windows 7, but it's possible that OpenSUSE or Ubuntu had set things differently, explaining why XP wasn't picked up straight away. – Steve314 Jul 24 '11 at 22:52
This hasn't worked out so good (though not a disaster, it could have been). My Windows 7 install disk seems to have been "simplified" by Toshiba, meaning fewer setup options and no repair. I created a repair CD (backup and restore control panel) and after several loops with that (using bootrec a lot, and some automated repairs to fix a "missing or corrupt bootloader") finally got Windows 7 to boot directly. However, it flat out refuses to recognise the XP partition. If the XP partition is active, that boots. If 7 is active, that boots. But I can't get a boot menu to choose with. – Steve314 Jul 25 '11 at 13:59
Also, the Windows 7 repair disk seems to have deleted the Ubuntu partition without warning or reason. I don't care, but that looks a lot like a deliberate act of Linux-hating vandalism. – Steve314 Jul 25 '11 at 14:00
Ok, I was assuming you were using a vanilla Windows 7 disk. It is going to get A LOT more difficult with an OEM disk. . . – surfasb Jul 25 '11 at 15:48
+1 because this got me trying stuff, but the which-partition-is-active thing didn't help much, so I'm going to accept my own answer - complete with the confused bits. But I do feel guilty about it ;-) – Steve314 Jul 26 '11 at 21:11
up vote 1 down vote accepted


After the comments left on surasbs answer, I've finally found the method to solve this issue. Warning though - the Ubuntu partition got deleted along the way, without any warning or good reason. Have backup images before trying to do this kind of thing, IOW. Clonezilla can image most Linux partitions.


If you're lucky, you'll have repair options built into your Windows 7 Install DVD. If you're unlucky, someone like Toshiba will have "simplified" your DVD for you. In that case, you can still create a repair boot CD...

Control Panel -> System and Security -> Backup and Restore
Create a system repair disc

The Windows 7 main partition must be marked as active (disk management) before you start, or else some of the repair stuff won't work.

So, booting from the repair CD, I needed to use the console for some things, in particular the following commands...

bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

I also needed to then run the automatic repair option, to fix a "missing or corrupt bootmanager".

This got me as far as having Windows 7 boot correctly, but had also trashed my Ubuntu partition. I noticed that if I marked my Windows XP partition as active (disk management), Windows XP would boot on the next boot, and by marking Windows 7 active I could then reboot back into Windows 7.

To get a boot menu, I found a link, and came up with the following instructions...

It's possible to adapt these instructions to avoid using the drive letter. To find out how to refer to the partition, use...

list volume

The adapted command I needed was...

bcdedit /set {ntldr} device partition=\Device\HarddiskVolume1

However, the result I got still wasn't working, though. In desperation, I resorted to assigning my Windows XP partition a drive letter, using EasyBCD to edit the boot menu, then removing the drive letter from that partition.

However, I noticed that EasyBCD uses the path \NST\ntldr rather than \ntldr. I don't really know what's going on with that - it looks like the different path is something that EasyBCD sets up itself... See - "The Mechanics of NTLDR and EasyLDR"

So I don't really know why the bcdedit approach didn't work, but for the moment, I have a working boot menu so I'm happy.

share|improve this answer

I suggest downloading your architecture's version of Parted Magic from:

Simply burn to a cd as .iso - then (making sure your bios settings are set to boot from cd) boot the disk. No need to install - it will run from memory. You will see some icons on your desktop, clicky the one for gparted and look at (more than likely) your /dev/sda drive...this should have all of your partitions listed on can remove the un-needed ones (i.e. Ext3) and resize the ones you want to keep. Although it can cause issues resizing partitions, I have never encountered this problem, using this software extensively myself. If the problem still persists after removal of old partitions, make sure the "boot flag" is set to boot your windows boot loader.

share|improve this answer
Deleting/resizing partitions isn't the problem - I have tools. But the Grub bootloader needs some files that are in the Linux partition. Revert to the Windows 7 bootloader, and that wasn't recognising Windows XP when I first installed 7, so I don't expect it will now either. Basically, if I do the partition changes without solving the bootloader issues, I'll end up with an unbootable system. – Steve314 Jul 24 '11 at 22:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .