Repair GRUB when installing Windows XP after installing Ubuntu

When we have more than one Operating System in the same machine, it is usual to select which one to boot on startup using GRUB. The problem is that when we install Windows XP, something more frequent than desirable, it wipes out GRUB. It's easy to fix that, see here:

Fix GRUB after Windows Install

Needless to say, all credit goes to Scott Calonico and the makers of SuperGRUB.

But there's a catch! Since version 9.10, Ubuntu uses Grub2, which is quite different from its ancestor. The guys from SuperGRUB claim to have a SuperGRUB version for Grub2, but according to them, it doesn't always work. If that is the case or whe don't even want to bother, we can boot from an Ubuntu Live CD or USB, fire up a terminal and type:

sudo update-grub
sudo fdisk -l
sudo grub-install /dev/sdx

In the last line, you should replace the "x" in "sdx" by the letter corresponding to the hard drive where we want to reinstall GRUB, that is the drive where Ubuntu and Windows are going to coexist in different partitions. If you don't know which "x" to use, call the fdisk command line program.

Comments

Popular posts from this blog

VB.NET: Raise base class events from a derived class

Apache Kafka - I - High level architecture and concepts

Upgrading Lodash from 3.x to 4.x