Saturday, July 4, 2009

Add Ubuntu 9.04 to Windows XP boot manager

I was quite impressed with Ubuntu lately, we’ve been using it at work a couple of weeks ago to recover data from a 7 years old Windows server that wasn’t able to boot properly (high CPU usage on services.exe, with no actual services started) – thanks to my friend Daniel for suggesting it.

And now I’ve decided to the Ubuntu Live on my Dell Inspiron 9300 work laptop (Intel Pentium M 1.86, 2 GB RAM, ATI Radeon Mobility X300, Seagate ST910021A 7200rpm HDD) – very happy with my 3 year old Windows XP Professional, curious to see how it compares. Ubuntu ran so well that I decided to install it on it’s own partition, with the intention to keep the Windows boot manager.

The installation was a breeze, the live CD has all the necessary tools – resized one of the partitions to make some room for a dedicated 5 GB partition for the data, no swap for now. I was a bit worried that it might not fit, but in the end it installed everything and even left 2.7 GB free! nice work, Ubuntu.

Decided to install the GRUB boot loader on the Ubuntu partition (in my case /dev/sda4) and then rebooted. As expected, the Windows XP boot manager was still there, with the normal entries, no Ubuntu.

Then I found this post explaining how to extract the Linux boot sector into a file (ubuntu.bin) and add it as a boot entry in Windows XP boot.ini. For that I had to boot back with the Ubuntu Live CD, run the command (obviously change to match your partitions):
sudo dd if=/dev/sda4 of=/media/Windows/ubuntu.bin bs=512 count=1
Reboot back to Windows XP and added the entry c:\ubuntu.bin="Ubuntu 9.04" to boot.ini:

Restart and there it was in the boot menu - selecting the Ubuntu 9.04 entry presents the Grub boot entries, allowing to start the newly installed Ubuntu from hard-drive.

Quite impressed (I know I’m repeating myself, but I really am). The UI runs fast, still to do some customisations (managed to map Win+D on my home Shuttle to show the desktop), but overall it seems to runs nicely, quite friendly and had no installation problems at all.

I’ve been trying Ubuntu on my home Shuttle (P4 Prescott 3 GHz, 2 GB RAM, ATI Radeon 9600XT, 7200rpm HDD) and I wasn’t impressed at all, in my opinion Windows XP runs much better on that machine. Same as I tried Windows 7 on it and didn’t impressed either, it ran well with visual effects and all, but not as responsive as I expected. I guess what I’m trying to say is, you should be open minded and try a few OSs to find the one that works better for you on your system - especially nowadays when there's plenty of live boot Linuxes to try and Microsoft opening up and releasing Windows preview / beta versions.