Dual boot Windows and Ubuntu – *but* with Ubuntu already installed on a separate hard drive

Ubuntuwindows

I just bought a new Windows 7 machine and want to install Ubuntu 10.10 for a dual boot environment. There's a lot of info describing how to do this, but it all describes re-partioning the Windows drive, burning Ubuntu on a CD, inserting that CD, etc.

I had a dual-boot Windows and Ubuntu machine that just died on me. Windows was on one hard drive and Ubuntu – along with my entire software development environment – was on the other. As far as I know both drives are fine.

When my new (Windows) machine gets here I want to open it up and stick in the Ubuntu hard drive from my old machine… but then I'm not sure what to do. I'd really like to be able to boot to that hard drive (or the Windows one), just like I did before.

It seems that this should be simpler than installing a fresh Ubuntu from a special CD, after all, everything is already expanded and working on the hard drive. Can someone give me some pointers that will help me solve this problem?

Update: My new machine should arrive next week and then I can try this stuff out.

Best Answer

You must use a boot loader in the new machine in order to choose what operative system you want to run. Ubuntu installs grub:

https://help.ubuntu.com/community/Grub2

There is no diference if the operative systemes are in diferent hard drives. The boot loader should be installed at the boot sector of the primary hard drive, and it will load one or other OS.

So, if you had a working Ubuntu in the second hard drive, you need to install grub at the boot sector, and reconfigure it so the entries match the new hard drive/partition configuration.

The easiest way of reinstall grub is from a Ubuntu live CD, as is explained here:

https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

Related Question