Ubuntu – 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.

Best Answer

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


  • 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.