Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 system with 2 sata drives and I chooose which drive to boot from in the bios setup. One sata drive has win7 and the other has dual boot ubuntu 10 with XP. Having a dual boot with XP is a pain so I want to add another sata hard drive and move ubuntu 10 to the new drive and delete the ubuntu dual boot from xp so I can choose which drive I want to boot up into. How do I move the ubuntu from the current dual boot drive to the new drive so when I boot up into the xp drive, it only comes up in xp?

share|improve this question

This is actually more complicated than you might think. The problem is that XP knows nothing at all about other operating systems, and is totally unaware of Linux, and is unable to dual boot it. So, when Linux is installed with XP, it replaces the Windows boot loader with GRUB, which can dual boot just about anything. There is an inherent danger here for a novice, which is that the Windows boot loader is no longer present in the Master Boot Record (MBR). This is the little bit of code that is read on startup, and has only enough intelligence to branch to a more detailed startup program, part of GRUB which is on the Linux partition.

If you take away the Linux partition, then Windows will no longer boot. It's not hard to fix if you know how, but most people do not. So, the first thing not to do is to delete your Linux partition until you have something to replace it with. This isn't necessarily a problem, but it's definitely something you want to understand.

If you are careful whenever you install Linux on a 2nd drive, you can instruct it to install the boot loader on the 2nd hard drive's MBR, so you can then remove either drive and the other will still boot. But, that's too late for now, until you replace the Windows boot loader on the 1st drive. This can be done in a few ways, but some people are simply not capable of doing it for some reason.

I used to do it using a DOS bootable CD with fdisk on it. You can usually find and download this. Then, you can simply boot the CD, and run "fdisk /mbr", and this will replace GRUB and make only Windows Bootable. Another way is to use the Windows XP repair disk and run FIXMBR, or something similar. I've never done it this way. You can also find boot disks online that will automatically fix it for you. I've done this, but I don't remember the site - I'm assuming you can search as easily as me, or maybe someone will fill in some details.

In the future, you can possibly disable the Windows drive when you install Linux, to make sure it doesn't get changed again, then when done, enable it. It's possible the windows drive will get added to the menu in the future, but it will only show up if you boot from the Linux drive, and never will be the default, so it's no big deal.

Moving Linux is actually much easier than windows, in that it's actuall possible. :)

Do you really need to move it to a new drive? You can copy the disk by booting from the Live CD, then installing GRUB on the MBR of that drive. The easiest way to do that is to make a "System Rescue CD", which is a free product from that can do this sort of thing automatically. Or, you can install Ubuntu from the CD onto this drive, then copy all the directories to it from the old drive, when booting from a live CD. Just make sure you copy all files, including hidden files. It's a little risky, but it's doable.

There are several ways to copy a disk; you can do it from gparted using copy and paste, which I've done many times successfully. You can also just copy your home directories to a new installation, then reinstall any programs, and probably get most all of your settings. I usually selectively copy a lot of things from an old to a new installation (usually from my home directory, and /etc).

If you need more help or details, you'll have to ask. I don't really know how much you need right now, and I'm not really patient enough for a step by step guide.

share|improve this answer

You need to do two things. Copy your ubuntu installation to the new disk and repair the MBR of the Windows XP disk.

To copy your Ubuntu install to the new disk, see How to replace my disk without having to rebuild my Ubuntu install?

To restore your Windows XP to boot correctly, you'll have to boot into the Recovery Console. Insert and boot from your Windows XP install CD. Wait until you get to a menu that ask if you want to enter Recovery Console and then press R to do so. It will search and ask which windows installation, choose the Windows XP installation.It will then ask for your administrator password (the same password you use when logging into XP), enter it or just press enter if you don't use a password for XP. Next it should finish booting to a prompt in the recovery console. Once you are at the prompt, type fixmbr and press enter. Once finished remove your XP CD, type exit and press enter.

Set your bios to boot from that drive and verify it will indeed boot straight to XP. If it does and you have already copied and verified your Ubuntu install on the new drive too, then you can proceed to use gparted (explained in the link to copy your ubuntu install) to edit your partitions on the new drive and XP drive to your liking.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.