Bug 580176

Summary: Wishlisht: please support other linux distributions like Ubuntu while automatically configuring bootloader
Product: [Fedora] Fedora Reporter: k.t. <cooling.crystals>
Component: anacondaAssignee: Brian Lane <bcl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: cpanceac, franta, gnu, hedayatv, jonathan, micadeyeye, richardfearn, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-13 05:36:11 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 678456    
Bug Blocks:    
Attachments:
Description Flags
grub.conf
none
fstab none

Description k.t. 2010-04-07 12:20:31 EDT
Description of problem:
Installer does not detect other linux distributions:
Ubuntu 10.04 on /dev/sda2
Ubuntu 9.10 on /dev/sda3
while installing Fedora into /dev/sda1

Version-Release number of selected component (if applicable):
2.6.33.1-19.fc13.i686

How reproducible:
always?

Steps to Reproduce:
1. install fedora on hard drive with other linux distributions
2.
3.
  
Actual results:
installer does not automatically add Ubuntu 9.10 and 10.04 entries into boot selection screen

Expected results:
find and add automatically preinstalled Ubuntu 9.10 and 10.04 into grub menu 

Additional info:
_ _ _ _ _
mount
/dev/sda1 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/kristjan/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=kristjan)
/dev/sda2 on /media/9a32ab15-a69e-4d1d-89c2-3a3d95feec23 type jfs (rw,nosuid,nodev,uhelper=udisks)
/dev/sda3 on /media/38cd0de9-e24b-4963-b41e-c39b0b07f4f0 type ext4 (rw,nosuid,nodev,uhelper=udisks)
_ _ _ _ _
df -H
Filesystem             Size   Used  Avail Use% Mounted on
/dev/sda1              7.1G   3.2G   3.9G  46% /
tmpfs                  1.1G   668k   1.1G   1% /dev/shm
/dev/sda2              7.2G   3.1G   4.2G  43% /media/9a32ab15-a69e-4d1d-89c2-3a3d95feec23
/dev/sda3              8.1G   4.4G   3.3G  58% /media/38cd0de9-e24b-4963-b41e-c39b0b07f4f0
Comment 1 Brian Lane 2010-04-07 13:24:14 EDT
Could you add a copy of your /boot/grub/grub.conf file for reference?
Comment 2 k.t. 2010-04-07 15:14:21 EDT
Created attachment 405074 [details]
grub.conf
Comment 3 k.t. 2010-04-07 15:16:12 EDT
Created attachment 405075 [details]
fstab

Could it be that I choose to not mount the other partitions during installation?

This is what I usually do in Ubuntu, I do not mount other operating system partitions. So it's less work then I reinstall or reformat on of them.
Comment 4 Brian Lane 2010-04-07 16:09:39 EDT
There are a couple parts to this. One is that anaconda doesn't 'merge' with a previous grub.conf (assuming you use the same /boot partition as you used for Ubuntu). It also doesn't do any kind of scan of available partitions to detect other distributions. This wouldn't work well anyway, it would be very difficult to determine kernel boot parameters, etc.

The right way to fix this is to allow reuse of an existing /boot partition and merge the fedora grub entry with pre-existing entries from other distributions on the system.
Comment 5 k.t. 2010-04-07 18:09:04 EDT
(In reply to comment #4)
> There are a couple parts to this. One is that anaconda doesn't 'merge' with a
> previous grub.conf (assuming you use the same /boot partition as you used for
> Ubuntu).
I am not using separate /boot partitions, my setup is simple:
/fedora
/ubuntu 10.04
/ubuntu 9.10
/home (except for fedora)
/swap

> It also doesn't do any kind of scan of available partitions to detect
> other distributions. This wouldn't work well anyway, it would be very difficult
> to determine kernel boot parameters, etc.
It works excellent for Ubuntu however. I just reinstalled grub on MBR using Ubuntu 9.10 live CD. Now I booted successfully into Ubuntu 10.04 and run "sudo update-grub". It found Fedora 13 and added the entry into boot menu.
Comment 6 Brian Lane 2010-04-07 18:16:42 EDT
Interesting. I'll have to take a look at Ubuntu and see what they are doing to find the location of /boot/grub/grub.conf
Comment 7 Dont Close Unfixed Bugs 2010-06-09 21:23:21 EDT
I just installed Fedora 13 (from the Live CD) next to the Ubuntu on my Atom netbook.  (I asked it to shrink the existing Ubuntu ext4 partition, which it did.)

Fedora clobbered the boot block, without even asking me.

When I got back into Ubuntu via a recovery disk, Ubuntu's update-grub was unable to add a working entry for Fedora.  If the Fedora partitions aren't mounted, update-grub doesn't even try looking for them.  If they ARE mounted, you indeed get a Fedora 13 entry added to the grub prompt, but booting from it doesn't succeed, apparently because it tries to boot from the root partition, not the boot partition.

It probably worked for k.t. because he has a custom partition setup.  I used the default in Ubuntu (just / and swap, which sit next to the unused shrunken Windows partitions on this netbook) and the default in Fedora (/boot plus an LVM partition that everything else gets dumped into).  Ubuntu didn't even load LVM by default, so it couldn't even SEE most of the Fedora partitions until I installed lvm on it.

In short -- y'all guys ought to do some integration to make coexistence seamless.  And long before that, Fedora should be changed so it NEVER clobbers the boot block without asking.  (The installation manual said it would ask, but I was watching for that question and it never came up.)
Comment 8 Bug Zapper 2010-07-30 07:16:09 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Brian Lane 2010-10-27 17:52:47 EDT
*** Bug 645953 has been marked as a duplicate of this bug. ***
Comment 10 Hedayat Vatankhah 2011-02-17 20:45:01 EST
os-prober (bug #678442) is used by Debian, and is probably what is used in Ubuntu too. It is also being used by grub2 to detect other OSes in the system. It can be adopted to grub 1 too, and a simple example (a modified grub2 script) is available at [1], which generates entries for other installed OSes.

[1] http://hedayat.fedorapeople.org/scripts/grub1-other-os-prober.sh
Comment 11 Brian Lane 2011-02-17 20:55:56 EST
Thanks.
Comment 12 Brian Lane 2011-03-02 19:20:37 EST
*** Bug 640943 has been marked as a duplicate of this bug. ***
Comment 13 Hedayat Vatankhah 2011-05-08 13:25:29 EDT
os-prober is now in Fedora.
Comment 14 cornel panceac 2011-08-19 13:54:58 EDT
in f16 rc5, rescue mode, grub2-install does not add to grub menu any other installed os, be it, fedora 14, windows xp or other linux versions (mandriva, suse). should i open a new bug for this?
Comment 15 Hedayat Vatankhah 2011-08-19 14:09:51 EDT
This is due to bug #678456. Since grub2 RPM doesn't depend on os-prober, I think you are missing os-prober.
Comment 16 Hedayat Vatankhah 2011-10-20 08:13:50 EDT
Now in Fedora 16, grub2-mkconfig can successfully detect other OSes. However, when I installed Fedora 16 TC1, it didn't detect my own Fedora 15 installation in another partition. I wonder if it has anything to do with my Fedora 15 being installed on an LVM partition (as I think anaconda doesn't activate LVM partitions in that step). (on the other hand my /boot partition is separate...)
Comment 17 Hedayat Vatankhah 2012-07-13 05:36:11 EDT
Well, this bug is fixed. However, bug #825236 is still there.