Ubuntu 9.10/Fedora12/XP dual boot does not work

Asked by jbapt

I've created 3 partitions. The original partition had Unbutu 9.10. I installed Windows XP next. I installed Fedora 12 on my last partition. Fedora and XP boots up fine. Fedora boots up by default and when I select other as an option, XP boots up automatically. However, I don't get an option to boot in Unbuntu, but the partition is still there. How can I get Unbuntu to come up as one of the three boot options?

Question information

Language:
English Edit question
Status:
Answered
For:
Fedora Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
jigar shah (jigarshah89) said :
#1

try this commands for make ur grub setup:
sudo grub
>root hd0,0
>setup hd0
>exit

or make changes in ur fstab and menu.lst file for grub loading to ubuntu..

Revision history for this message
jigar shah (jigarshah89) said :
#2

try this commands for make ur grub setup:
sudo grub
>root hd0,0
>setup hd0
>exit

or make changes in ur fstab and menu.lst file for grub loading to ubuntu..

Revision history for this message
jbapt (jbapt) said :
#3

I'ved confirmed grub is install in Fedora within the MBR.
The output is as follows:

jbaptiste@localhost ~]$ grub
Probing devices to guess BIOS drives. This may take a long time.

    GNU GRUB version 0.97 (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported. For the first word, TAB
   lists possible command completions. Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> I can only enter Unbuntu if I use a live CD

What changes are you referring to in the menu.lst and how do i make them?

Revision history for this message
Digvijay Patankar (dbpatankar) said :
#4

Its not Grub2 but Grub Legacy. Fedora 12 uses Grub Legacy.
Since you installed Fedora12 at last, you might be having Grub Legacy as your bootloader.
So to add Ubuntu to the list you need to edit /boot/grub/grub.conf
Do the following:
1. boot into fedora 12
2. open terminal and become superuser (with command su and root password)
3. give the command : gedit /boot/grub/grub.conf
4. at the end of the file add following lines :
           title Ubuntu 9.10
       root (hd0,0)
       kernel /vmlinuz-2.6.31-14-generic ro root=/dev/sda2 rhgb quiet
       initrd /initrd.img-2.6.31-14-generic
5. Here make sure that you change the above lines as per your configuration.
6. root(hd0,0) is for /boot partition.
7. root=/dev/sda2 is actually / partition.
8. kernel (vmlinuz) and initrd image file name may/may not change depending upon the kernel you want to use.
9. After making above changes : save the file and reboot.
10. You will have entry in the boot menu. Highlight Ubuntu and boot.
11. If it isn't booting then recheck the entries you supplied above.

If you don't know about the entries and how to find them, then provide the output of following command :
fdisk -l
and all the filenames in the directory /boot of *Ubuntu* partition.
and I will send you the correct entries.

Revision history for this message
jbapt (jbapt) said :
#5

I now have Unbuntu listed as an option. However, when I select it I get "Erro 15: File not found" message. Below is the result from my fdisk list.

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4231171e

   Device Boot Start End Blocks Id System
/dev/sda1 1 7012 56323858+ 83 Linux
/dev/sda2 * 7013 14758 62219745 83 Linux
/dev/sda3 14759 18709 31736407+ 7 HPFS/NTFS
/dev/sda4 18710 19457 6008310 5 Extended
/dev/sda5 18710 19457 6008278+ 82 Linux swap / Solaris

Revision history for this message
jbapt (jbapt) said :
#6

I now have Unbuntu listed as an option. However, when I select it I get "Erro 15: File not found" message. Below is the result from my fdisk list.

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4231171e

   Device Boot Start End Blocks Id System
/dev/sda1 1 7012 56323858+ 83 Linux
/dev/sda2 * 7013 14758 62219745 83 Linux
/dev/sda3 14759 18709 31736407+ 7 HPFS/NTFS
/dev/sda4 18710 19457 6008310 5 Extended
/dev/sda5 18710 19457 6008278+ 82 Linux swap / Solaris

Revision history for this message
Digvijay Patankar (dbpatankar) said :
#7

From your question description and fdisk output I think the /dev/sda1 is for Ubuntu.
Well in that case the code shall be :

        title Ubuntu 9.10
                root (hd0,0)
                kernel /vmlinuz-2.6.31-14-generic ro root=/dev/sda1 rhgb quiet
                initrd /initrd.img-2.6.31-14-generic

See the only difference is sda1 on the third line instead of sda2.

After doing this make sure to check the kernel and initrd file names :
the files are located in /boot directory.
check for the files starting with vmlinuz- and initrd and make sure that their names matches *exactly* with that of the names in the above code.

If its not working then you have to specify more since both /dev/sda1 and /dev/sda2 are labelled with linux. So I am not sure which one is Ubuntu and which one is fedora. I am assuming(from your description) that the sda1 is ubuntu. You can check it with the help of tool gparted. If you cannot figure it out then better you paste the whole /boot/grub/grub.conf file here. So that I can better understand the partitioning.

(There still remains a question that though you said you installed fedora on *last* partition, its not being reflected in that way through partition table. As you can see from the partition table, it says your first two partitions are linux(Ubuntu + Fedora), the third partition is XP and the fourth/last one is swap. So by last partition I think you mean last *installed* partition. So if above solution is not working then its best to paste the whole /boot/grub/grub.conf file here. It will ease the work for both.)

Revision history for this message
jbapt (jbapt) said :
#8

Digvijay-

When I try to obtain the grub file I receive a permission denied message. As you can see below. I am login as the root.

root@localhost jsyn]# /boot/grub/grub.conf
bash: /boot/grub/grub.conf: Permission denied

I tried using the following to gain access but it did not work, "chmod +rw /boot/grub/grub.conf"
It may only be a R.Hat command. -Please advise. I am very new to Linux, but very motivated to learn.

Your previous assumptions are correct. Unbuntu was the first install that was created before I made any of the partitions. I then installed XP and installed Fedora 12 last, which is on the second Linux partition.

Revision history for this message
jbapt (jbapt) said :
#9

Here's the entirev/boot/grub/grub.conf file as requested. Thx!

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,1)
# kernel /boot/vmlinuz-version ro root=/dev/sda2
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.31.6-166.fc12.i686)
 root (hd0,1)
 kernel /boot/vmlinuz-2.6.31.6-166.fc12.i686 ro root=UUID=807542bb-8a12-491f-bec5-709d968a13f0 noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
 initrd /boot/initramfs-2.6.31.6-166.fc12.i686.img
title Other
 rootnoverify (hd0,2)
 chainloader +1
title Ubuntu (2.6.31-14-generic)
       root (hd0,0)
       kernel /vmlinuz-2.6.31-14-generic ro root=/dev/sda1 rhgb quiet
       initrd /initrd.img-2.6.31-14-generic
[jsyn@localhost ~]$

Revision history for this message
Digvijay Patankar (dbpatankar) said :
#10

Just make the change as shown. I forgot that you don't have separate boot partition. Hence /boot must be mentioned explicitly.

title Ubuntu (2.6.31-14-generic)
       root (hd0,0)
       kernel /boot/vmlinuz-2.6.31-14-generic ro root=/dev/sda1 rhgb quiet
       initrd /boot/initrd.img-2.6.31-14-generic

as always,
make sure vmlinuz and initrd file names.
If you have updated the kernel, these names must change accordingly.
The above code must work if the filenames are correct. Check the filenames in /boot/ directory.

Moreover,
by doing :
root@localhost jsyn]# /boot/grub/grub.conf
you are trying to execute the file. Its not the way. It has nothing to execute at that instant.
chmod works in fedora, but never use it in /boot directory, infact never use it anywhere outside your /home/<username>/ directory.

Revision history for this message
freedomrun (freedomrun) said :
#11

If you just installed all three systems then you don`t have any important data yet.
So install it again only like this:

Get latest Parted Magic iso and use it to create partitions.

on 1.st partition put XP, while in setup allow it to reformat 1.st partition with NTFS
on 2.nd partition install fedora but while in setup process chose to install bootloader on the start of 2.nd partition
on 3.rd partition install ubuntu and let it`s bootloader go to MBR, it should detect and list all 3 OS-es in his bootloader menu

you can chose different partition layout, but it is important to remember few things like:

- xp won`t let you choose where to install it`s bootloader
- fedora maybe won`t list ubuntu`s bootloader or maybe won`t be able to boot ubuntu
- Install ubuntu after all of this and dont modify the bootloader location it will go then to MBR and it should list these 2 other OS-es

Kind regards

Can you help with this problem?

Provide an answer of your own, or ask jbapt for more information if necessary.

To post a message you must log in.