Dual-booting Ubuntu with Vista

#1
Dear Forum members,

I want to install Ubuntu 8.04.1 next to my Vista OS, but can't get the boot-loading to work.

I have five disks (here labelled 1-5). Vista sits on the first partition of disk 4 (e.g. /dev/sdd1), while Ubuntu is installed onto the first partition on disk 1 (e.g. /dev/sda1) with the swap file on a separate partition on disk 2.

I have followed the instructions closely on how to install Ubuntu from the NeoSmart Wiki (http://neosmart.net/wiki/display/EBCD/Ubuntu) and chose to install the GRUB bootloader onto the same partition as Ubuntu (i.e. /dev/sda1).

I then reboot into Vista and start EasyBCD (v1.7.2). I have tried adding entries for Ubuntu both with and without the GRUB installed on boot sector selection choice, but none seem to work. If I leave it unchecked and pick Drive 0, Partition 0 (Linux Native) and add it to the bootloader I get an error after selection in Windows bootloader stating "...Cannot load from harddisk. Insert Systemdisk and press any key". If I check it and a NeoGrub bootloader is added I get the following message after selection in Windows bootloader:

find --set-root --ignore-floppies /NST/menu.lst
(hd0,0)
Filesystem type is ntfs, partition type 0x7
configfile /NST/menu.lst
Turning on gate A20...Success.
Starting cmain()...find --set-root --ignore-floppies /boot/grub/menu.lst

At this point the computer stops and I have to reboot to do anything else.

It would seem like GRUB cannot find the correct disk and partition containing Ubuntu, since the filesystem is of wrong type. Is something wrong with the partition table in MBR and if so what can I do about it?

FYI (if it may provide any further clues), when I use the LiveCD to boot Ubuntu and run sudo fdisk -l in a terminal window I get the following:

root@ubuntu:/media# sudo fdisk -l
Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000029f6
Device Boot Start End Blocks Id System
/dev/sda1 31385 36483 40957717+ 83 Linux
/dev/sda2 * 2 31384 252083947+ 5 Extended
/dev/sda5 2 31384 252081632 7 HPFS/NTFS
Partition table entries are not in disk order
Disk /dev/sdb: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0d7dd726
Device Boot Start End Blocks Id System
/dev/sdb1 * 2 36483 293041665 f W95 Ext'd (LBA)
/dev/sdb5 2 36483 293041633+ 7 HPFS/NTFS
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00068219
Device Boot Start End Blocks Id System
/dev/sdc2 * 2 121601 976752000 5 Extended
/dev/sdc5 2 120948 971506746 7 HPFS/NTFS
/dev/sdc6 120949 121601 5245191 82 Linux swap / Solaris
Disk /dev/sdd: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd52f9b17
Device Boot Start End Blocks Id System
/dev/sdd1 * 1 5494 44123136 7 HPFS/NTFS
/dev/sdd2 5494 18242 102397952 7 HPFS/NTFS
Disk /dev/sde: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd304aa6a
Device Boot Start End Blocks Id System
/dev/sde2 * 2 48641 390700800 5 Extended
/dev/sde5 2 48641 390700766+ 7 HPFS/NTFS

Any ideas on how to proceed? Your help is really appreciated!

Best regards,
David.
 

JustinW

Super Moderator
Staff member
#2
For starters, do a simple test to make sure Ubuntu is capable of booting properly. You can do this by chnaging the boot sequence in the BIOS so that Ubuntu's disk is first in the list. Once you have verified it well boot properly, revert the settings and move on to fixing misconfigurations with the setting of the entry or the entrys in grub.

What are you getting when selecting the entry created with EasyBCD? Does it give you a menu to select Ubuntu anyway though the entry may not work? If that's the case, it is Ubuntu's entry in grub that is at fault. You can fortunately edit this at boot time with grub's edit feature. Just follow the directions at the boottom of the screen to edit an entry and change x in the (hdx,1) line from 0-5 and attempt to boot it until you find the right disk and Ubuntu boots normally. You'll need to save this change as this was for this boot only, so open a terminal and use: sudo gedit /boot/grub/menu.lst. This'll open the file in gedit with root privallages so you can make the necessary changes. Save and you should be good to go.
 
#3
Thank you Kairozamorra!

First, I tried booting from all disks one by one...but could only boot from my Vista disk. This was somewhat of a let down. However...

Following your second hint...I edited Ubuntu's entry in grub. The first line said 'root (hd0,0)' which I changed to 'root (hd1,0)' and attempted a boot which seemed to work...Ubuntu's booting screen came on, but did however not finish the job. After a couple of minutes I ended up at a screen stating that Busybox v1.1.3 had been loaded and with a prompt (initramfs) which left me a bit clueless...

So...I then booted the LiveCD, opened a terminal window, edited the /boot/grup/menu.lst with the root changes as above, saved and rebooted. And voilá...I could boot Ubuntu for the very first time :grinning: Hurrah!

Do you have any idea why the Ubuntu disk changed disk number?

Thank you,
David.
 

JustinW

Super Moderator
Staff member
#4
Differnet OSes and the BIOS itself may see the setup of your disks differently regardless of thier physical setup. This problem mainly occurs with users experiencing problems dual-booting Linux when using seperate hard disks (the live CD may see the layout differently then what it may be when you are booting hence the misconfiguration). The disk you are booting from first is always considered disk 0, but Linux may in fact have been installed on another disk.

Regardless, glad you got it working and welcome to NST :smile: