I just deleted an old Ubuntu off the Journo’s dual-boot Ubuntu/XP HP Pavillion, and along with it Ubuntu’s Grub and her Master Boot Record (MBR), which of course rendered the machine useless. Sigh.
I had an Ubuntu 10.04 Lycid Lynx Live CD at hand (never leave home without it), so here’s how to repair an XP MBR with only an Ubuntu Live CD.
Repairing XP MBR with Ubuntu Live DC
It’s actually ridiculously easy:
- Boot from the Live CD, and into Ubuntu (it’s option 1, Try Ubuntu Without Making Any Changes to your Computer);
- Once you’re in the OS, from the menu choose Applications -> Accessories -> Terminal;
- In the Terminal Window type “sudo apt-get install lilo“, which is a Linux gadget that will fix your woes;
Once downloaded, you’ll get a prompt box which requires you to hit enter before it installs Lilo. I got some warnings telling me to do something otherwise the computer might not work. The computer wasn’t working anyway, so I ignored those warnings and…
- typed “sudo lilo -M /dev/sda mbr“;
- Done. Reboot.
The above assumes a straight forward flub with the Master Boot Record, and a default setup as far as hard drives go.
I rebooted the PC and voila! it booted straight back in to Windows XP.