Fedora Linux Support Community & Resources Center
  #1  
Old 5th June 2010, 12:25 AM
roobinatube Offline
Registered User
 
Join Date: Jun 2010
Posts: 24
linuxfedorafirefox
Keeping the fedora boot loader

Hey everyone.

I really hope this is revelant here, and that someone can help. I have been using fedora for a while now, and I love it. However my brother has started using ubuntu, and wants me to at least try it, which I agreed to. I have created a partition for ubuntu, using Gparted, in fedora 13. My question is, how do i install ubuntu onto this existing partition, whilst keeping the Fedora boot loader, which I think is absolutely fantastic, and would love to keep.

In summary; how to install ubuntu on an existing partition, and add it to the fedora boot loader options?

Thanks in advance for any help.
Roob.
Reply With Quote
  #2  
Old 5th June 2010, 12:37 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxubuntufirefox
Re: Keeping the fedora boot loader

Hello roobinatube,

You can do that by choosing the boot loader option in the Ubuntu installer that installs its GRUB in the first sector of the Ubuntu partition (instead of the master boot record). When you reboot, nothing will appear to have happened of course. Then edit Fedora's grub. conf and add a section for Ubuntu like this...
Code:
title Ubuntu
chainloader (hdx,y)+1
You change x & y to the drive & partition of the Ubuntu partition. This will work even if your Ubuntu version is using GRUB 2 (Fedora 13 still uses legacy GRUB).
Reply With Quote
  #3  
Old 5th June 2010, 10:59 AM
roobinatube Offline
Registered User
 
Join Date: Jun 2010
Posts: 24
linuxfedorafirefox
Re: Keeping the fedora boot loader

Ok, that sounds good, so iv now installed Ubuntu, that went fine. Now to the editing of grub.conf. What program should I open it in?

Also I had a search of my file system, and I have 3 grub.conf files in different places; which to edit?

Thanks
Roob
Reply With Quote
  #4  
Old 5th June 2010, 11:54 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
windows_xp_2003ie
Re: Keeping the fedora boot loader

Open a terminal in Fedora. Then...
Code:
su
gedit /boot/grub/grub.conf
Reply With Quote
  #5  
Old 5th June 2010, 12:02 PM
roobinatube Offline
Registered User
 
Join Date: Jun 2010
Posts: 24
linuxfedorafirefox
Re: Keeping the fedora boot loader

ah thanks, I didnt realise gedit would open it, because it wouldnt from the gui.

Ok, so i did that, i rebooted, went into the bootloader, and Ubuntu was there... i selected it, but got an error message, saying it doesnt exist... What would x and y be? i have fedora and windows 7 on my main hard drive, sda, then I have ubuntu installed (I changed my mind) on another hard drive sdb. there are two partitions on the ubuntu drive, dev/sdb1 (boot) and dev/sdb2 which is the swap area.

I put in the grub file chainloader (hd1,0)+1 because this seemed to fit with the pattern on my main hard drive, but this seems to be incorrect...

Roob
Reply With Quote
  #6  
Old 5th June 2010, 12:07 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
windows_xp_2003ie
Re: Keeping the fedora boot loader

Some things you can post to help sort it out...
Code:
su
fdisk -l
cat /boot/grub/grub.conf
Reply With Quote
  #7  
Old 5th June 2010, 12:16 PM
roobinatube Offline
Registered User
 
Join Date: Jun 2010
Posts: 24
linuxfedorafirefox
Re: Keeping the fedora boot loader

fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x85801fd9

Device Boot Start End Blocks Id System
/dev/sda1 * 1 12855 103257756 7 HPFS/NTFS
/dev/sda2 12856 12919 512000 83 Linux
/dev/sda3 12919 77826 521361408 8e Linux LVM

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000aaa15

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9328 74920960 83 Linux
/dev/sdb2 9328 9730 3227649 5 Extended
/dev/sdb5 9328 9730 3227648 82 Linux swap / Solaris

Disk /dev/dm-0: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 5335 MB, 5335154688 bytes
255 heads, 63 sectors/track, 648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 474.8 GB, 474828767232 bytes
255 heads, 63 sectors/track, 57727 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn't contain a valid partition table


grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_roofedora-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.33.5-112.fc13.i686)
root (hd0,1)
kernel /vmlinuz-2.6.33.5-112.fc13.i686 ro root=/dev/mapper/vg_roofedora-lv_root rd_LVM_LV=vg_roofedora/lv_root rd_LVM_LV=vg_roofedora/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_GB.UTF-8 KEYBOARDTYPE=pc KEYTABLE=uk rhgb quiet
initrd /initramfs-2.6.33.5-112.fc13.i686.img
title Fedora (2.6.33.3-85.fc13.i686)
root (hd0,1)
kernel /vmlinuz-2.6.33.3-85.fc13.i686 ro root=/dev/mapper/vg_roofedora-lv_root rd_LVM_LV=vg_roofedora/lv_root rd_LVM_LV=vg_roofedora/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_GB.UTF-8 KEYBOARDTYPE=pc KEYTABLE=uk rhgb quiet
initrd /initramfs-2.6.33.3-85.fc13.i686.img
title Ubuntu
chainloader (hd1,0)+1
title Windows 7
rootnoverify (hd0,0)
chainloader +1


Hope this helps.

Thankyou very much for your support so far
Roob
Reply With Quote
  #8  
Old 5th June 2010, 12:49 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
windows_xp_2003ie
Re: Keeping the fedora boot loader

I would have made the same guess as you. Some things to do to verify "x & y"...
Code:
su
grub
That starts the GRUB shell and the prompt changes to grub>. At the grub> prompt...
Code:
grub> find /boot/grub/menu.lst
grub> find /boot/grub/grub.cfg
Do both of those. One of them should produce a result. It's exactly what "x & y" should be. Exit the GRUB shell with quit.

Last edited by stoat; 5th June 2010 at 02:10 PM.
Reply With Quote
  #9  
Old 5th June 2010, 01:02 PM
bob Offline
Administrator (yeah, back again)
 
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 69
Posts: 22,121
linuxfirefox
Re: Keeping the fedora boot loader

try:

title Ubuntu
rootnoverify (hd1,0)
chainloader +1
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651


Don't use any of my solutions on working computers or near small children.
Reply With Quote
  #10  
Old 5th June 2010, 07:15 PM
roobinatube Offline
Registered User
 
Join Date: Jun 2010
Posts: 24
linuxfedorafirefox
Re: Keeping the fedora boot loader

Ok, I did both of those things, the grub.cfg produced hd1,0, the other command produced an error, not found.

The second suggestion i also implemented, and upoin trying to select Ubuntu in grub, I got error 13: Invalid or unsupported executable format, press any key to continue...

Roob
Reply With Quote
  #11  
Old 5th June 2010, 08:19 PM
bob Offline
Administrator (yeah, back again)
 
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 69
Posts: 22,121
linuxfirefox
Re: Keeping the fedora boot loader

Okay, it's working for me, but that's because I put Ubuntu's grub on it's root partition, while you had it overwriting the mbr originally.

Another try: Click on the Computer icon and then on the Ubuntu partition. Dig down through boot -> grub & display grub.cfg.

Now that's in grub2 terms and Fedora's in grub legacy, so you'll have to modify things just a bit on Fedora's /boot/grub/grub.conf. You are going to want to show the correct vmlinuz and initrd files as well as the root info. In my case, I'd do this:

title Ubuntu
root (hd1,0)
kernel /boot/vmlinuz-2.6.31-16-generic root=UUID=45f14c01-6832-48aa-b9ef-d17503fa7602 ro quiet splash
initrd /boot/initrd.img-2.6.31-16-generic


Naturally, you're going to use the kernel info, UUID from your grub.cfg not what I've got.

Now that I've posted all that, let me try editing things to see if it works for me.

Edit: NOPE! That's not it. Still tinkering... And...nada. I'm sure that there's something minor I'm skipping, but I sure can't find it.
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651


Don't use any of my solutions on working computers or near small children.
Reply With Quote
  #12  
Old 5th June 2010, 09:23 PM
roobinatube Offline
Registered User
 
Join Date: Jun 2010
Posts: 24
linuxsafari
Re: Keeping the fedora boot loader

would it be easier to install ubuntu again and include its grub in the root partition? I would need some guidance on this, though, I tried manually specifying the partitions for ubuntu when installing it to my main drive, but got nervous about all my data and installed programs etc. and decided I would just install it on another hard drive. What I couldnt work out, was how to install it without creating a separate boot partition.

Roob
Reply With Quote
  #13  
Old 5th June 2010, 09:50 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
windows_xp_2003ie
Re: Keeping the fedora boot loader

Quote:
Originally Posted by roobinatube

would it be easier to install ubuntu again and include its grub in the root partition?
Yes, IMO. If you did not do that for the first install, then that would explain why the chainloader command did not work. That chainloader command was attempting to load and execute bootstrapping code in the first sector of /dev/sdb1. If GRUB was not installed there, then nothing good was ever going to happen with that chainloader command.

Quote:
Originally Posted by roobinatube

What I couldnt work out, was how to install it without creating a separate boot partition.
According to the fdisk report, you did install it without a separate boot partition. The second drive has only one Linux partition and the swap.

When you choose the boot loader option to install GRUB in the first sector of the boot partition, and there is not a separate boot partition, then GRUB is installed in the first sector of the root partition.

P.S.: Instead of completely re-installing Ubuntu, you could try booting with the Ubuntu disk into its rescue mode. Then re-install GRUB in the first sector of the Ubuntu partition. I use Ubuntu, but I boot into its rescue mode so rarely as to have no clue how to do it. Maybe you or your brother or bob know. Or, maybe some other reader here can tell you.

Last edited by stoat; 5th June 2010 at 10:14 PM.
Reply With Quote
  #14  
Old 6th June 2010, 03:12 AM
bob Offline
Administrator (yeah, back again)
 
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 69
Posts: 22,121
linuxfirefox
Re: Keeping the fedora boot loader

Dang, should have Googled long ago on this one. Here's the answer: http://www.dedoimedo.com/computers/g...mozTocId982259

Good instructions and it works. In your case (probably not important anymore, but anyhow...):

title Ubuntu
root (hd0,1)
kernel /boot/grub/core.img
savedefault
boot

Once you ask for that file, it brings up the menu and presto! You're booting.

I've bookmarked that tutorial, since Grub2 is not going away and that's a clearly written, info packed site.
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651


Don't use any of my solutions on working computers or near small children.
Reply With Quote
  #15  
Old 6th June 2010, 09:44 AM
roobinatube Offline
Registered User
 
Join Date: Jun 2010
Posts: 24
linuxsafari
Re: Keeping the fedora boot loader

That worked! Excellent work, thankyou very much. As I learn I hope I can provide some solutions too!

Roob
Reply With Quote
Reply

Tags
boot, fedora, keeping, loader

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to boot into windows with Fedora boot loader Nerv68 Installation, Upgrades and Live Media 17 29th January 2010 10:41 PM
How to install fedora 12 from USB and make dual boot BCD using Windows 7 boot loader evildesirez Installation, Upgrades and Live Media 1 4th January 2010 05:56 PM
Rebuilding the Grub Boot Loader on Master Boot Record (MBR) w Fedora Linux Vector Guides & Solutions (No Questions) 6 1st August 2009 08:39 AM
Installing Fedora 11 and keeping windows 7 as dual boot mirkoj Installation, Upgrades and Live Media 9 10th June 2009 12:30 PM
GRUB boot loader r windows boot loader? Rebels Mascot Using Fedora 4 12th May 2005 03:50 AM


Current GMT-time: 14:28 (Saturday, 30-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat