You have installed Ubuntu and then realise that you need to dual-boot with windows. Unfortunately, after you install windows, in a separate partition, GRUB (Grand Unified Boot loader – the thing that tells ubuntu to load) gets erased! How do you successfully dual-boot?
1. Boot off the Ubuntu LiveCD
2. Open a Terminal and type in the following commands, noting that the first command will put you into the GRUB "prompt", and the next 3 commands will be executed there; also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed GRUB to during installation:
$sudo grub3. Reboot (removing the LiveCD), and your boot menu should be back.
$ root (hd0,0)
$ setup (hd0)
Putting windows into the GRUB file, so that you can dual-boot:
1. Open the GRUB file:
$sudo gedit /boot/grub/menu.lst2. Scroll to the bottom and add the following:
title Windows XPNote that you should also verify that hd0,0 is the correct location for Windows. E.g. if you had installed Windows on the 4th partition on the drive, then you should change it to (hd0,3).
Now when you restart your computer, hold down ESC and you will enter the GRUB menu