Bug 871621 - grub2-mkconfig F17 does not find F18 - installed dirfefnt BIOS seting
Summary: grub2-mkconfig F17 does not find F18 - installed dirfefnt BIOS seting
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: os-prober
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Hedayat Vatankhah
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-30 21:24 UTC by Flóki Pálsson
Modified: 2012-11-10 20:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-07 22:49:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
gedit /run/media/floki/F17/boot/grub2/grub.cfg & (26.43 KB, text/plain)
2012-10-30 21:24 UTC, Flóki Pálsson
no flags Details
gedit /boot/grub2/grub.cfg & F18 grub (32.93 KB, text/plain)
2012-10-30 21:25 UTC, Flóki Pálsson
no flags Details
blkid (1.66 KB, text/plain)
2012-10-30 21:26 UTC, Flóki Pálsson
no flags Details
os-prober - F17 - /var/log/messages (27.09 KB, text/plain)
2012-11-06 18:21 UTC, Flóki Pálsson
no flags Details
os-prober - F18 - /var/log/messages (33.43 KB, text/plain)
2012-11-06 18:23 UTC, Flóki Pálsson
no flags Details
gedit /var/log/messages & - after linux-boot-prober /dev/sda1 (2.02 KB, text/plain)
2012-11-07 20:26 UTC, Flóki Pálsson
no flags Details
F17 # gedit /boot/grub2/grub.cfg & (31.45 KB, text/plain)
2012-11-07 20:44 UTC, Flóki Pálsson
no flags Details
grub2-mkconfig -o /boot/grub2/grub.cfg - gedit /var/log/messages & (276.83 KB, text/plain)
2012-11-07 22:01 UTC, Flóki Pálsson
no flags Details

Description Flóki Pálsson 2012-10-30 21:24:27 UTC
Created attachment 635805 [details]
gedit /run/media/floki/F17/boot/grub2/grub.cfg &

Description of problem:
Running grub2-mkconfig -o /boot/grub2/grub.cfg in F17 ( /dev/sdc11) does not find F18 on /dev/sda when F18 is innstaled (from DVD) on /dev/sda and sda is set in bios as first in boot order. 

Version-Release number of selected component (if applicable):


How reproducible:
Alwas

Steps to Reproduce:
1.  Sett bios to boot from /dev/sda
2.  install Fedora-18-Beta-TC6-x86_64-DVD.iso to /dev/sda
3.  run grub2-mkconfig -o /boot/grub2/grub.cfg in F17
  
Actual results:
F18 is not in F17 grub2/grub.cfg

Expected results:
F18 is  in F17 grub2/grub.cfg

Additional info:
Same behavior in unbutu 12.10.
When F18 DVD is innstaleed on /dev/sda and sdc is first in boot order then grub2-mkconfig in F17 can find F18 on sda.

Comment 1 Flóki Pálsson 2012-10-30 21:25:54 UTC
Created attachment 635806 [details]
gedit /boot/grub2/grub.cfg &  F18 grub

Comment 2 Flóki Pálsson 2012-10-30 21:26:46 UTC
Created attachment 635807 [details]
blkid

Comment 3 Mads Kiilerich 2012-10-30 22:26:48 UTC
Please show the output of 'os-prober'.

Note however that the os-prober entries are very unreliable. See
http://www.gnu.org/software/grub/manual/grub.html#Multi_002dboot-manual-config .

Comment 4 Flóki Pálsson 2012-10-30 23:44:55 UTC
>Please show the output of 'os-prober'.
From F17 
root@F17 ~]# os-prober
/dev/sdc10:Fedora release 19 (Rawhide):Fedora:linux
/dev/sdc2:Fedora release 14 (Laughlin):Fedora1:linux
/dev/sdc5:Fedora release 13 (Goddard):Fedora2:linux
/dev/sdc6:Fedora release 15 (Lovelock):Fedora3:linux
/dev/sdc8:Linux Mint 13 Maya (13):LinuxMint:linux
/dev/sdc9:Debian GNU/Linux (6.0.4):Debian:linux
[root@F17 ~]# 


from F18
[root@F18 ~]# os-prober
/dev/sdc10:Fedora release 19 (Rawhide):Fedora:linux
/dev/sdc11:Fedora release 17 (Beefy Miracle):Fedora1:linux
/dev/sdc2:Fedora release 14 (Laughlin):Fedora2:linux
/dev/sdc5:Fedora release 13 (Goddard):Fedora3:linux
/dev/sdc6:Fedora release 15 (Lovelock):Fedora4:linux
/dev/sdc8:Linux Mint 13 Maya (13):LinuxMint:linux
/dev/sdc9:Debian GNU/Linux (6.0.4):Debian:linux
[root@F18 ~]#

Comment 5 Hedayat Vatankhah 2012-11-05 17:39:27 UTC
Please run os-prober and sent its output in /var/log/messages. (You can run tail -f /var/log/messages and then run os-prober in a separate terminal and sent the output of tail command).

Comment 6 Flóki Pálsson 2012-11-06 18:21:22 UTC
Created attachment 639484 [details]
os-prober - F17 - /var/log/messages

Comment 7 Flóki Pálsson 2012-11-06 18:23:24 UTC
Created attachment 639485 [details]
os-prober - F18 - /var/log/messages

Comment 8 Mads Kiilerich 2012-11-06 19:05:50 UTC
You have
/dev/sdc10: LABEL="F18"
but it is rawhide?

Where is your f18 installed?

Comment 9 Hedayat Vatankhah 2012-11-06 20:28:37 UTC
Looks like that your Fedora 18 is installed in an LVM partition. Do you have LVM enabled in your Fedora 17?

Also, does your /dev/sda use GTP or MBR? Looks like to be GTP. Would you please run the following commands in Fedora 17:
lvscan
linux-boot-prober /dev/sda1
linux-boot-prober /dev/mapper/fedora-root

Finally, where does your Fedora 18's boot directory reside? Is it in /dev/sda1 or /dev/mapper/fedora-root? And just to make sure: is the path of grub.cfg in Fedora 18 exactly: /boot/grub2/grub.cfg ?

Comment 10 Flóki Pálsson 2012-11-06 21:40:44 UTC
>Comment 8
>You have
>/dev/sdc10: LABEL="F18"
>but it is rawhide?
Yes it is rawhide from time before F18.
( unusable now )

>Where is your f18 installed?
On /dev/sda.  With default install fore hole disk.

> Comment 9 
>Looks like that your Fedora 18 is installed in an LVM partition. 
Yes.  Is installed in /dev/sda1 TYPE="ext4" and /dev/sda2 TYPE="LVM2_member" using the hole disk.
>Do you have LVM enabled in your Fedora 17?
No.  F17 is installed in /dev/sdc11 TYPE="ext4". One partition.

>Also, does your /dev/sda use GTP or MBR?
Not sure I understand.  Setting bios to boot from /dev/sda boots in F18.

>lvscan
[root@F17 ~]# lvscan
  inactive          '/dev/fedora/swap' [3,94 GiB] inherit
  inactive          '/dev/fedora/home' [178,46 GiB] inherit
  inactive          '/dev/fedora/root' [50,00 GiB] inherit
[root@F17 ~]# 


>linux-boot-prober /dev/sda1
[root@F17 ~]# linux-boot-prober /dev/sda1
/dev/sda1:/dev/sda1::/vmlinuz-3.6.5-2.fc18.x86_64:/initramfs-3.6.5-2.fc18.x86_64.img:root=/dev/sda1
[root@F17 ~]# 

>linux-boot-prober /dev/mapper/fedora-root
[root@F17 ~]# linux-boot-prober /dev/mapper/fedora-root
[root@F17 ~]# 

>Finally, where does your Fedora 18's boot directory reside?
/dev/sda1

>And just to make sure: is the path of grub.cfg in Fedora 18 exactly: /boot/grub2/grub.cfg ?
No. When I mount /dev/sda1 in F17 then it is 
/run/media/floki/56edef5c-bc4c-4e9b-8d06-57eee30cbb1f/grub2/grub.cfg

Comment 11 Flóki Pálsson 2012-11-06 21:54:15 UTC
From F18 /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sat Nov  3 14:21:46 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/fedora-root /                       ext4    defaults        1 1
UUID=56edef5c-bc4c-4e9b-8d06-57eee30cbb1f /boot                   ext4    defaults        1 2
/dev/mapper/fedora-home /home                   ext4    defaults        1 2
/dev/mapper/fedora-swap swap                    swap    defaults        0 0
#

Comment 12 Hedayat Vatankhah 2012-11-07 05:29:17 UTC
Thanks for the provided information. So, os-prober in Fedora 17 cannot find your Fedora 18 because your LVM volumes are not active in Fedora 17 and os-prober doesn't see your Fedora 18 partition at all. However, linux-boot-prober should be able to find it, but looks like that it has a problem in parsing your grub.cfg. 

Would you please install os-prober 1.56 from testing repository (or http://koji.fedoraproject.org/koji/buildinfo?buildID=364568) and re-run the following command and give the output?
linux-boot-prober /dev/sda1

Also, please give the linux-boot-prober output in /var/log/messages (just like what you did for os-prober).

Comment 13 Flóki Pálsson 2012-11-07 20:26:50 UTC
Created attachment 640334 [details]
gedit /var/log/messages & - after linux-boot-prober /dev/sda1

>Would you please install os-prober 1.56 from testing repository 
Before updating from testing 
[floki@F17 ~]$ rpm -q os-prober 
os-prober-1.55-1.fc17.x86_64

After updating from testing 
[floki@F17 ~]$ rpm -q os-prober 
os-prober-1.56-1.fc17.x86_64
[floki@F17 ~]$ 

>and re-run the following command and give the output?
l>inux-boot-prober /dev/sda1
[root@F17 ~]# linux-boot-prober /dev/sda1
/dev/sda1:/dev/sda1::/vmlinuz-3.6.5-2.fc18.x86_64:/initramfs-3.6.5-2.fc18.x86_64.img:root=/dev/sda1
[root@F17 ~]#

Comment 14 Flóki Pálsson 2012-11-07 20:44:13 UTC
Created attachment 640336 [details]
F17 # gedit /boot/grub2/grub.cfg &


It works now. I is possible to boot F18 from F17.

# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.6.5-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.5-1.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.6.3-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.3-1.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.6.2-4.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.2-4.fc17.x86_64.img
Found Fedora release 19 (Rawhide) on /dev/sdc10
Found Fedora release 14 (Laughlin) on /dev/sdc2
Found Fedora release 13 (Goddard) on /dev/sdc5
Found Fedora release 15 (Lovelock) on /dev/sdc6
Found Ubuntu 12.10 (12.10) on /dev/sdc7
Found Linux Mint 13 Maya (13) on /dev/sdc8
Found Debian GNU/Linux (6.0.4) on /dev/sdc9
Found Fedora release 18 (Spherical Cow) on /dev/mapper/fedora-root
done
[root@F17 ~]#

Comment 15 Hedayat Vatankhah 2012-11-07 21:27:58 UTC
To be honest, this is weird! I wonder where does this come from!! 
It'd be nice if you can provide the output of os-prober command again. or... event better, would you please give your /var/log/messages when you run grub2-mkconfig?

Comment 16 Flóki Pálsson 2012-11-07 22:01:43 UTC
Created attachment 640409 [details]
grub2-mkconfig -o /boot/grub2/grub.cfg - gedit /var/log/messages &

It'd be nice if you can provide the output of os-prober command again.
[root@F17 ~]# os-prober 
/dev/sdc10:Fedora release 19 (Rawhide):Fedora:linux
/dev/sdc2:Fedora release 14 (Laughlin):Fedora1:linux
/dev/sdc5:Fedora release 13 (Goddard):Fedora2:linux
/dev/sdc6:Fedora release 15 (Lovelock):Fedora3:linux
/dev/sdc7:Ubuntu 12.10 (12.10):Ubuntu:linux
/dev/sdc8:Linux Mint 13 Maya (13):LinuxMint:linux
/dev/sdc9:Debian GNU/Linux (6.0.4):Debian:linux
/dev/mapper/fedora-root:Fedora release 18 (Spherical Cow):Fedora4:linux

>or... event better, would you please give your /var/log/messages when you
> run grub2-mkconfig?
See athacment
[root@F17 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.6.5-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.5-1.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.6.3-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.3-1.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.6.2-4.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.2-4.fc17.x86_64.img
Found Fedora release 19 (Rawhide) on /dev/sdc10
Found Fedora release 14 (Laughlin) on /dev/sdc2
Found Fedora release 13 (Goddard) on /dev/sdc5
Found Fedora release 15 (Lovelock) on /dev/sdc6
Found Ubuntu 12.10 (12.10) on /dev/sdc7
Found Linux Mint 13 Maya (13) on /dev/sdc8
Found Debian GNU/Linux (6.0.4) on /dev/sdc9
Found Fedora release 18 (Spherical Cow) on /dev/mapper/fedora-root
done
[root@F17 ~]# gedit /var/log/messages &

Additional info:
New kernel in F18 is added

Comment 17 Hedayat Vatankhah 2012-11-07 22:49:55 UTC
OK, it works fine now. However, you've enabled your LVM partitions in Fedora 17. If you disable them again, Fedora 18 might not be detected. The current policy of os-prober is to not enable LVM volumes by itself.

Comment 18 Flóki Pálsson 2012-11-08 19:58:59 UTC
To run lvscan I installed lvm2.
If I remove lvm2 then grub2-mkconfig does not find F18 on /dev/sda.

Comment 19 Mads Kiilerich 2012-11-08 21:02:43 UTC
It would be unfortunate to make lvm2 a mandatory (indirect) dependency of grub2. grub2 might be necessary for EFI booting of live 'CD's but there is no need for lvm there.

I don't think there is a good solution to this issue. The best solution seems to be to leave it to user whether he wants to install lvm packages so he can use lvm or not.

Comment 20 Hedayat Vatankhah 2012-11-10 20:00:45 UTC
Yes, actually once lvm was a dependency of os-prober but I removed it for valid reasons. 
So, os-prober won't find you F18 when lvm is inactive. While it can just use any grub.cfg it finds, it tries to find a proper GNU/Linux installation and then parse it's corresponding grub configuration file, which seems reasonable.

I mark this bug as "wont fix".


Note You need to log in before you can comment on or make changes to this bug.