Installing Ubuntu 8.10 Dual Boot with XP

by Mandar Vaze on January 27, 2009
in Linux, Review, Ubuntu

My previous attempt wasn’t so pleasant. Not only did I not get  a working Ubuntu system, but in attempt, I also trashed my Windows Partition. Back then, ubuntu was just up and coming Linux distro. Eventually, I realised that I should have used Alternate CD, rather than attempting to install from Live CD.

Flash forward to Jan 2009.  Four years later, things have changed, Ubuntu has matured a lot. Will my attempt to dual boot Ubuntu with Windows XP succeed ?

The Source

While there are other options like downloading from the net, or ordering cheap or free CD from the net, I did neither. I purchased a December 2008 issue of copy of Linux for You magazine, for this specific purpose. It carried Ubuntu 8.10 DVD. But seems they have rolled up their own DVD, rather than standard Ubuntu DVD. This possibly caused me some problems (More about that later in the post)

Look before you leap

After buying the magazine, I immediately tried booting from the DVD. It provides several options on nice graphical boot menu. The DVD carried various versions of Ubuntu 8.10 : Ubuntu, Kubuntu, XUbuntu, Edubuntu, Mythbuntu and Ubuntu Studio.  I tried both Ubuntu as well as Kubuntu. Kbuntu looks gorgeous with KDE 4.1 I was initially planning to install that instead of plan vanilla Ubuntu, but I also noticed some flickers. Another reason for choosing Ubuntu over Kubuntu was their choice of Browser. Ubuntu’s default browser is Firefox 3.0.3, while for Kubuntu it is Konqueror. Personally  I think Firefox is far better than Konqueror.

Wubi

My very first attempt was to use Wubi. This would ensure that my Windows would remain intact (I think, since installation using Wubi promises that Ubuntu would show up as an entry in Add/Remove Programs in Windows XP.) For offline installation, Wubi requires a copy of .ISO file in same folder as wubi.exe. So I created .isoof Kubuntu (and then Ubuntu) from the DVD. But something must not be right. Wubi always tried to connect to internet to download the required packages, without using the local ISO file. I didn’t want to download around 700MB whenI had the DVD with me. Couple of retries later, I gave up option to use Wubi.

Partitioning

My next option was to install from the LiveCD. I started the installer from Kubuntu (and subsequently from Ubuntu) and the installer was stuck at the stage of partitioning. (or so I thought) How can I install Ubuntu if it can’t even see my partitions on my HDD ? This was frustrating. I tried again, and again. During one of my such attempts, I left the computer while Ubuntu was stuck at reading partition table, and came back after about 10-15 minutes. To my surprise, it had read the partitions and was ready to suggest me my new partition structure. Apparently, the installer wasn’t stuck, it was just slow.

From here on, it was pretty straight forward. I selected a partition (around 9GB) for root partition “/”, and about 1GB for swap partition. I chose to format the root partition using ext3 file system. The installer asked me to create a user and assign a password.

The Boot loader

By default, the installer will install the boot loader onto MBR of the hard disk. I am told that it recognises existing windows partition, and GRUB will be configured to automatically have an entry to boot into your existing windows partition. But based on my last experience (albeit 4 years ago) I didn’t want to mess up my MBR. So during the dialog in the installer wizard about boot loader, I opted to install GRUB onto the root partition of Ubuntu instead of MBR.

Configure Windows Boot loader

Ubuntu installer was done, but I was not. Considering that I had opted to install GRUB on root partition of Ubuntu, I needed windows boot loader to direct to GRUB in order to boot into Ubuntu. I had successfully done it at least once it past, so it was very easy. It is almost 3 step process. Essence is to copy first 512 bytes of Ubuntu boot partition onto Windows, and configure Windows boot loader for Ubuntu

  1. Copy the boot sector :
    dd if=/dev/sdaN of=ubuntu.bin bs=512 count=1
  2. Copy the file ubuntu.bin onto Windows partition. This is very easy since I was already in Ubuntu Live environment, I just mounted Windows C:, and copied Ubuntu.bin onto C:
  3. Edit C:boot.ini and add following entry (Make changes to path/file name as needed)
    c:ubuntu.bin="Ubuntu 8.10"

Now I restarted the machine. First I checked if Windows was intact, it was. That was a relief. Next I went on to check whether my Ubuntu install was successful. I rebooted, and selected the entry for Ubuntu from Windows boot loader. I was greeted with GRUB menu. There was only one entry for Ubuntu which was for memtest option.

I was able to add another entry for Ubuntu in GRUB menu, but I think my problem was mainly because I did not use official Ubuntu LiveCD (I used LFY magazine’s custom DVD) If you use official Live ISO I think you should be OK.

Do come back to read about How I over came the GRUB menu problem in my next post.

Comments

2 Responses to “Installing Ubuntu 8.10 Dual Boot with XP”
  1. Ninad Bapat says:

    Hi

    Good blog you have
    The above problem was faced by me also albeit recently.
    I have been using Linux off and on from 2000 starting with slackware
    I had posted my problem of not getting the relevant menus in GRUB
    ( am using GRUB4DOS) in the ubuntu forums.
    Some user directed me to
    https://sourceforge.net/projects/bootinfoscript.
    This is a good script to analyse your partitions and the problems.
    I also had installed Ubuntu from the LFY DVD.
    I gave up on continuing to download and install Ubuntu due to lack of time and also faulty internet.
    The ubuntu forums suggested downloading a fresh iso nd not copying those 2 files.
    Thanks to your post now I can continue installing Ubuntu

  2. Donald Leung says:

    An interesting article not exactly what I was looking for, or maybe it was but I found another solution to my problem…

    That being: an install of ubuntu 8.10 where grub did not write anything to the mbr of windows xp and did not perform the dual boot changes. Can you imagine installing ubuntu and seeing no obvious way to enable access the installation?

    Solution:
    Boot up live CD, launch the install to ram.
    Use the bootinfoscript Ninad Bapat kindly posted above, to find out the address of the drive ubuntu is installed to.
    Open up the terminal and type:
    sudo grub
    find /boot/grub/stage1 (for example)
    root (hd0,6) where the first number is the drive and the second the partion, all information given from the script)
    setup(hd0)

    Upon restarting your computer should boot with the dual boot option.

    Now I’m rolling with Ubuntu :)

    (but no dual monitor graphic drivers.. sigh)

Share Your Thoughts