Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Jan 26 '11 at 0:00

This question came from our site for professional and enthusiast programmers.

    
Comment by @Larry: Thanks for the replies! Really, they are much appreciated and clear up a lot of my confusion. –  Ivo Flipse Jan 27 '11 at 18:16

3 Answers 3

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

share|improve this answer
    
+1, you would also need to possibly modify the fstab on the ubuntu installation so that the drives are enumerated properly for that system. –  g19fanatic Jan 26 '11 at 12:28

When an OS is installed it sets things up differently depending on the hardware installed on the computer. Therefore, you can not stick this Ubuntu hard drive into your computer and boot to it like nothing ever happened. You will have to install Ubuntu from scratch on the new machine, you can however (once the install is complete), mount the old Ubuntu install from the old hard drive and copy over important files and such. You will have to reinstall your software programs.

So, from what I am gathering is that you will have three hard drives total. The Windows and Ubuntu hard drives from the old machine, and the new Windows hard drive in the new computer. I suggest that you being by transferring all your data that you want to save from your old Windows hard drive to the new one by booting into the new Windows install on the new hard drive in your new machine. Then, wipe your old Windows hard drive and install Ubuntu there. Then boot into Ubuntu and mount your old Ubuntu hard drive to copy files to the new install of Ubuntu. After all that is complete, you will have Windows and Ubuntu dual booting without trouble on your new computer, and a left over hard drive that has your old Ubuntu install on it (which you will likely want to wipe and use for backup or something :). Hope my wall 'o text made sense, feel free to comment and ask questions if necessary!

share|improve this answer
    
"...you can not stick this Ubuntu hard drive into your computer and boot to it like nothing ever happened. You will have to install Ubuntu from scratch on the new machine...". not exactly true. by doing what Pablo Albo suggested, you should be able to boot into the Ubuntu disk. Putting grub on the NEW windows drive and setting it up to recognize where the new ubuntu hard drive is located will get it up to boot. –  g19fanatic Jan 26 '11 at 12:28

To avoid bootloader conflicts and issues, I suggest installing each OS to its' own drive, with no other drives connected during install (avoid auto-detection & accidental overwrites). Then to select, hit the ESC key during initial boot up to select the BIOS boot device menu.

share|improve this answer

Your Answer

 
discard

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.