Installing Ubuntu before or after upgrading from Vista to Win 7?

I just got a new SSD hard drive for my thinkpad laptop. I just installed Vista with the factory CDs. On my old OS, my main OS was Ubuntu but I do want to keep Windows on a separate partition as a dual booth system. I definitely want to upgrade to Win 7 though and I will get it in a few days.

My question is: should I install Ubuntu now and then upgrade to Win 7 in a few days? or is that going to mess up with the grub (or something else)? If that is the case, then I'd rather wait to install Ubuntu until after I upgrade to Vista.

P.S. I know that probably any kind of mess done by the Win upgrade could be fixed, but I just want to avoid wasting time.


Solution 1:

It's generally a good idea to do complete your Windows installation before installing Ubuntu. from my experience, Windows does not play nicely with other OSes and you would need to recover your Ubuntu installation via a "Live disk" boot.

This may not be the case with an upgrade however.

Solution 2:

Go ahead, and install Ubuntu now.

Yes, a week later the Win 7 upgrade WILL mess with your MBR/Grub/boot. But good news is: it WONT mess with your Ubuntu partition.

The point is: its SO easy to fix grub that you should not worry about this. Just follow these steps:

Before upgrading Windows (ie, while you still can boot Ubuntu):

  • Burn an Ubuntu bootable CD, or use the "Start Up Disk Creator" utility from Menu -> System -> Administration to create a bootable USB key. You probably already have either the CD or USB, the same you will use for installing Ubuntu works fine

  • Give your Ubuntu partition a label. Not necessary, but helps.

After upgrading Windows (to restore grub/Ubuntu):

  • Boot using your CD/USB and start a Live session
  • Got to Home Folder -> Computer, find your Ubuntu partition, and double-click to mount it. If you have trouble finding which is your Ubuntu partition, use gParted. After mounting, take note of WHERE it was mounted (usually will be /media/LABEL, where LABEL is the Label of your Ubuntu partition, if it has one. Hence my previous suggestion on labeling it)
  • Also, using gParted, take a note of of which device is your boot drive. It will probably be /dev/sda

Now for the "real deal deal":

  • Open terminal, and:

sudo grub-install --root-directory=/media/UBUNTU /dev/sda

And thats it!

Reboot, and grub will show up, allowing you to use Ubuntu again

Notes:

  • In these examples, i assumed you labeled your Ubuntu partition UBUNTU, and your boot drive is /dev/sda. Check those values before issuing the grub-install

  • After booting on Ubuntu, do a sudo update-grub so it scans your drives again and add the Windows 7 partition to the list. It was there before, as Vista, but an update will fix menu name and other options

  • Dont worry about the error message: "cannot find /boot device. (is /dev mounted?)" while (re-) installing grub from Live CD. Its an annoying bug. If there is a message "All steps successfull" shows up, everything is fine.

Solution 3:

Installing Ubuntu after Windows

Usually a Windows is already installed. If not then it 'should' be installed before Ubuntu because Windows cannot see other operating systems and tries to ignore them (or wipe them). The last boot-loader to be installed is the one that gets used and while the Windows one is blind to other operating systems the Ubuntu one defaults to including all other Operating Systems in it's boot-menu.

If you are able to partition the drive prior to installing Windows, leave space for Ubuntu during the initial partitioning process. Then you won't have to resize your NTFS partition to make room for Ubuntu later (saving a bit of time).

Installing Windows After Ubuntu

Normally when Windows is installed after Ubuntu the "Master Boot Record", MBR, will be overwritten. You can bootup off a LiveCD and repair the MBR. However, there are 2 different approaches:

* Recovering GRUB after reinstalling Windows
* Master Boot Record backup and re-replacement