PDA

View Full Version : [ubuntu] doesn't recognize Fedora for grub on install



AllanP
January 23rd, 2010, 08:45 PM
First time this has happened. I installed Fedora first (XP already installed) and then installed Ubuntu 9.10 64. Fedora doesn't show up on boot up menu. I've tried update-grub.
Before I would have just edited menu.lst, but now?? I dunno.
edit; Here's fdisk with Fedora on sda6

ajgreeny
January 23rd, 2010, 09:25 PM
I don't know if this is any reason for the problem but fedora usually installs into LVM partitions. If this was so in your case, I wonder if ubuntu's grub can see and boot it as you would expect.

AllanP
January 23rd, 2010, 09:41 PM
I don't know if this is any reason for the problem but fedora usually installs into LVM partitions. If this was so in your case, I wonder if ubuntu's grub can see and boot it as you would expect.
Yeah I don't know. I do know I selected ext3 partitioning as ext4 I think is a problem for my disk imaging program (Acronis True Image).

garvinrick4
January 23rd, 2010, 10:24 PM
Does your version of fedora have the same grub as 9.10?

oldfred
January 24th, 2010, 12:03 AM
I do not have Fedora but have seen several people solve it:

http://ubuntuforums.org/showthread.php?t=1367305
If the linux has no bootloader, the os-prober will look for the kernel file name that starts with vmlinu[zx] and the initrd file name that starts with initrd.
In my case, I have installed fedora without bootloader and the initrd file name starts with initramfs. I have made a simple change to the os-prober by make it looking for the file starts with initr instead of initrd.

or

[SOLVED] Grub 2 Fedora Install not seen by 40_custom
http://ubuntuforums.org/showthread.php?t=1343779
menuentry "Fedora 2.6.31.5 on sda7" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set a2cb340e-b3df-44e3-a602-52d0cb1201c5
linux /boot/vmlinuz-2.6.31.5-127.fc12.x86_64 root=UUID=a2cb340e-b3df-44e3-a602-52d0cb1201c5 ro quiet splash
initrd /boot/initramfs-2.6.31.5-127.fc12.x86_64.img
}

kansasnoob
January 24th, 2010, 12:17 AM
I have often found it to be this simple:


sudo apt-get install --reinstall libdebian-installer4


sudo os-prober


sudo update-grub

Be sure and wait until it says done!

It doesn't always work but about 80% of the time I've found it does.

AllanP
January 24th, 2010, 01:57 AM
I have often found it to be this simple:


sudo apt-get install --reinstall libdebian-installer4


sudo os-prober


sudo update-grub

Be sure and wait until it says done!

It doesn't always work but about 80% of the time I've found it does.

Guess I'm in the 20%. Thanks anyway.

AllanP
January 24th, 2010, 02:01 AM
Does your version of fedora have the same grub as 9.10?
Here is Fedora's grub.conf
# 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,5)
# kernel /boot/vmlinuz-version ro root=/dev/sda6
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.31.12-174.2.3.fc12.x86_64)
root (hd0,5)
kernel /boot/vmlinuz-2.6.31.12-174.2.3.fc12.x86_64 ro root=UUID=2c905a01-e585-4fc4-a087-c86153590eff LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /boot/initramfs-2.6.31.12-174.2.3.fc12.x86_64.img
title Fedora (2.6.31.5-127.fc12.x86_64)
root (hd0,5)
kernel /boot/vmlinuz-2.6.31.5-127.fc12.x86_64 ro root=UUID=2c905a01-e585-4fc4-a087-c86153590eff LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /boot/initramfs-2.6.31.5-127.fc12.x86_64.img
title Other
rootnoverify (hd0,0)
chainloader +1

AllanP
January 24th, 2010, 02:26 AM
I guess I'm not geek enough to understand why the change from the long established "menu.lst" which just worked. I had my generic entries for Fedora and Suse; never having to edit menu.lst entries when kernels were changed. Don't know why things had to be complicated so.

AllanP
January 24th, 2010, 02:41 AM
I tried to boot to the Fedora partition using Super Grub and got the following: "Error 25: Disk Read Error, press any key to continue".

kansasnoob
January 24th, 2010, 02:51 AM
It would be best at this point to see the output of the Boot Info Script as described here:

http://ubuntuforums.org/showthread.php?t=1291280

That will provide lots of info and we can go from there.

kansasnoob
January 24th, 2010, 02:59 AM
I guess I'm not geek enough to understand why the change from the long established "menu.lst" which just worked. I had my generic entries for Fedora and Suse; never having to edit menu.lst entries when kernels were changed. Don't know why things had to be complicated so.

Just so you know, you can revert Ubuntu to legacy grub:

http://ubuntuforums.org/showthread.php?t=1298932

But I truly do prefer we work through this :)

Grub2 is a huge improvement overall. I think I made someone I highly respect angry offering the "revert" option, but I'd rather see someone revert to legacy grub than give up on Ubuntu altogether.

garvinrick4
January 24th, 2010, 04:28 AM
I tried to boot to the Fedora partition using Super Grub and got the following: "Error 25: Disk Read Error, press any key to continue".


http://www.mjmwired.net/linux/2009/11/17/boot-failure-when-fedora-12-grub-installs-to-non-mbr-partition/

AllanP
January 24th, 2010, 04:39 AM
Just so you know, you can revert Ubuntu to legacy grub:

http://ubuntuforums.org/showthread.php?t=1298932

But I truly do prefer we work through this :)

Grub2 is a huge improvement overall. I think I made someone I highly respect angry offering the "revert" option, but I'd rather see someone revert to legacy grub than give up on Ubuntu altogether.
Thanks I'll consider that if I can't get this to work.
But what is so great about this new grub? I mean all we are after is a way to multi boot; who cares how as long as it works and is simple enough for the likes of myself to configure.

kansasnoob
January 24th, 2010, 05:36 AM
But what is so great about this new grub?

The auto-detection is awesome 98% of the time!


I mean all we are after is a way to multi boot; who cares how as long as it works and is simple enough for the likes of myself to configure.

Was legacy grub easy for you the first time you had to modify it?

Consider the differences between the syntax used in Ubuntu's legacy grub and Fedora's grub (which is still legacy grub).

I began to write notes about reverting to legacy grub when Karmic was still in Alpha because I know it's hard to change. And there are still times when I can't quite figure out how to boot something with grub2 and just decide to revert.

But right now I'm booting 6 operating systems on one hard drive with grub2 and I never have to edit a thing :P All I have to do is run "sudo update-grub" once in a while.

kansasnoob
January 24th, 2010, 05:38 AM
And I was serious about needing the output of that Boot Info Script! It eliminates guess work.

AllanP
January 24th, 2010, 06:00 AM
And I was serious about needing the output of that Boot Info Script! It eliminates guess work.
It won't let me post. Says there are too many images.
Here it is as a text attachment.
I don't know what's going on. Attachment not attaching lol.

kansasnoob
January 24th, 2010, 03:56 PM
It won't let me post. Says there are too many images.
Here it is as a text attachment.
I don't know what's going on. Attachment not attaching lol.

Right click and select Compress. That'll create a tar.gz and the "paper clip thingy" should let you attach it.

AllanP
January 24th, 2010, 06:15 PM
Right click and select Compress. That'll create a tar.gz and the "paper clip thingy" should let you attach it.

I didn't follow directions sheesh. I was trying to attach the script not the results of such. Here is the Results.txt

oldfred
January 24th, 2010, 07:58 PM
Another alternative is chainbooting from Ubuntu to Fedora. You would have to install Fedora's grub to Fedora's partitions and then could chainboot from ubuntu's grub to Fedora's

Add to 40_custom note using grub2 partitioning numbering:

menuentry "Chainload Other System on sda6" {
set root=(hd0,6)
chainloader +1
}

Install Fedora's grub to (hd0,5) using old grub numbering.

AllanP
January 24th, 2010, 09:06 PM
Another alternative is chainbooting from Ubuntu to Fedora. You would have to install Fedora's grub to Fedora's partitions and then could chainboot from ubuntu's grub to Fedora's

Add to 40_custom note using grub2 partitioning numbering:

menuentry "Chainload Other System on sda6" {
set root=(hd0,6)
chainloader +1
}

Install Fedora's grub to (hd0,5) using old grub numbering.
Thanks OldFred I'll keep that in mind if I'm not able to get this going with the new grub.

kansasnoob
January 24th, 2010, 09:39 PM
I just realized I left the "chainloader +1" off both entries. Hope I caught that in time.

You could try adding a menu entry to /etc/grub.d/40_custom:


gksudo gedit /etc/grub.d/40_custom

You should see:


#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.


Do not change any of that but just below it try adding (more likely the second option I think):


menuentry "Fedora 12 (on sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 2c905a01-e585-4fc4-a087-c86153590eff
linux /boot/vmlinuz-2.6.31.12-174.2.3.fc12.x86_64 root=UUID=2c905a01-e585-4fc4-a087-c86153590eff ro quiet splash
initrd /boot/initramfs-2.6.31.12-174.2.3.fc12.x86_64.img
chainloader +1
}

Or:


menuentry "Fedora 12 (on sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 2c905a01-e585-4fc4-a087-c86153590eff
kernel /boot/vmlinuz-2.6.31.12-174.2.3.fc12.x86_64 ro root=UUID=2c905a01-e585-4fc4-a087-c86153590eff LANG=en_US.UTF-8
initrd /boot/initramfs-2.6.31.12-174.2.3.fc12.x86_64.img
chainloader +1
}


You could actually add both and try each, then remove one or the other if one works and the other doesn't. Be sure to click on save before closing gedit.

Actually oldfred's idea is a good one too :)

AllanP
January 24th, 2010, 11:13 PM
You could actually add both and try each, then remove one or the other if one works and the other doesn't. Be sure to click on save before closing gedit.

Actually oldfred's idea is a good one too :)[/QUOTE]

I tried both ways then I changed the ext2 to ext3 and tried that; no dice.
Funny how it all worked when I had another partition in there with Suse on it.

AllanP
January 24th, 2010, 11:45 PM
Another alternative is chainbooting from Ubuntu to Fedora. You would have to install Fedora's grub to Fedora's partitions and then could chainboot from ubuntu's grub to Fedora's

Add to 40_custom note using grub2 partitioning numbering:

menuentry "Chainload Other System on sda6" {
set root=(hd0,6)
chainloader +1
}

Install Fedora's grub to (hd0,5) using old grub numbering.
Hi Fred. Mind telling me how to do the last part with Fedora? Do you mean to edit grub.conf or menu.lst?
Here's Fedoora's Grub.conf
# 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,5)
# kernel /boot/vmlinuz-version ro root=/dev/sda6
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.31.12-174.2.3.fc12.x86_64)
root (hd0,5)
kernel /boot/vmlinuz-2.6.31.12-174.2.3.fc12.x86_64 ro root=UUID=2c905a01-e585-4fc4-a087-c86153590eff LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /boot/initramfs-2.6.31.12-174.2.3.fc12.x86_64.img
title Fedora (2.6.31.5-127.fc12.x86_64)
root (hd0,5)
kernel /boot/vmlinuz-2.6.31.5-127.fc12.x86_64 ro root=UUID=2c905a01-e585-4fc4-a087-c86153590eff LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /boot/initramfs-2.6.31.5-127.fc12.x86_64.img
title Other
rootnoverify (hd0,0)
chainloader +1

oldfred
January 25th, 2010, 06:12 PM
I do not know how to do the install of old grub from Fedora. You want to do a install of grub to the partition boot record not the MBR.

This is/was the way to install Ubuntu grub legacy to a PBR. I presume there is a way for Fedora also. Ubuntu's old grub probably is not quite the same as Fedora's as every distribution slightly modifies it, so I would not install Ubuntu's grub for Fedora.
To install Ubuntu grub leagacy to a partition see #6
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows
#reset grub boot
sudo grub
find /boot/grub/stage1 #you will get a response such as root (hd0,5)
root (hdx,y) #use the numbers from the previous command x is drive, y is partition
setup (hd0)
# Or
6. Type "setup (hd0,3)". This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".
quit

meierfra.
January 25th, 2010, 09:40 PM
Try kansasnoob's 40_custom suggestion, but delete the last line:


menuentry "Fedora 12 (on sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 2c905a01-e585-4fc4-a087-c86153590eff
linux /boot/vmlinuz-2.6.31.12-174.2.3.fc12.x86_64 root=UUID=2c905a01-e585-4fc4-a087-c86153590eff ro quiet splash
initrd /boot/initramfs-2.6.31.12-174.2.3.fc12.x86_64.img
}


Just in case this does not work: You can install grub to the boot sector of your Fedora partition from any OS or LiveCD which has "Legacy grub" installed. It will use the Grub files from your Fedora partition.
You can't do it from Ubuntu, since it uses Grub 2. But you can chroot into your Fedora partition:



sudo mount /dev/sda6 /mnt
for i in dev proc sys; do sudo mount --bind /$i /mnt/$i; done
sudo chroot /mnt
grub

And at the grub prompt:

root (hd0,5)
setup (hd0,5)
quit

and then use the chainloader entry in 40_custom as suggested by oldfred:



menuentry "Chainload Other System on sda6" {
set root=(hd0,6)
chainloader +1
}

AllanP
January 27th, 2010, 04:42 AM
Try kansasnoob's 40_custom suggestion, but delete the last line:


menuentry "Fedora 12 (on sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 2c905a01-e585-4fc4-a087-c86153590eff
linux /boot/vmlinuz-2.6.31.12-174.2.3.fc12.x86_64 root=UUID=2c905a01-e585-4fc4-a087-c86153590eff ro quiet splash
initrd /boot/initramfs-2.6.31.12-174.2.3.fc12.x86_64.img
}


Solved: Just in case this does not work: You can install grub to the boot sector of your Fedora partition from any OS or LiveCD which has "Legacy grub" installed. It will use the Grub files from your Fedora partition.
You can't do it from Ubuntu, since it uses Grub 2. But you can chroot into your Fedora partition:



sudo mount /dev/sda6 /mnt
for i in dev proc sys; do mount --bind /$i /mnt/$i; done
sudo chroot /mnt
grub

And at the grub prompt:

root (hd0,5)
setup (hd0,5)
quit

and then use the chainloader entry in 40_custom as suggested by oldfred:



menuentry "Chainload Other System on sda6" {
set root=(hd0,6)
chainloader +1
}

That is now working after re-installing Fedora and putting grub in the boot sector. Thanks.

trendle
March 6th, 2010, 10:18 PM
I thought I'd add my tuppence worth, and hope it helps someone else down the road.

After wasting 4 weeks on this, dual booting Mint (or Ubuntu) and Fedora FC12 I finally have it working :p

My mint forum post is here.
http://forums.linuxmint.com/viewtopic.php?f=46&t=35974&p=250016#p250016