Bug 1274288 - grub configuration for an Ubuntu dual boot does not honor EFI
Summary: grub configuration for an Ubuntu dual boot does not honor EFI
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-22 12:40 UTC by sandeep
Modified: 2016-12-20 15:06 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 15:06:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
grub.cfg (9.86 KB, text/plain)
2015-10-22 12:40 UTC, sandeep
no flags Details
Ubuntu configs (2.29 KB, application/x-gzip)
2015-10-25 14:10 UTC, sandeep
no flags Details

Description sandeep 2015-10-22 12:40:42 UTC
Created attachment 1085490 [details]
grub.cfg

Description of problem:

My Thinkpad has a GPT partition with EFI boot. Ubuntu 14.04 is installed already. When Fedora 23 is installed, the /boot/efi/EFI/fedora/grub.cfg  contains  the following Fedora section

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora (4.2.3-300.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.2.3-300.fc23.x86_64-advanced-3f8c2975-7488-48d8-beba-28783d1d3a4b' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  cbd3e2ce-b1c1-41e4-8e46-36d782a3cfe7
	else
	  search --no-floppy --fs-uuid --set=root cbd3e2ce-b1c1-41e4-8e46-36d782a3cfe7
	fi
	linuxefi /vmlinuz-4.2.3-300.fc23.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rhgb quiet LANG=en_US.UTF-8
	initrdefi /initramfs-4.2.3-300.fc23.x86_64.img
}
menuentry 'Fedora (0-rescue-f4b775897bad42759168ad5d683202cb) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-f4b775897bad42759168ad5d683202cb-advanced-3f8c2975-7488-48d8-beba-28783d1d3a4b' {
	load_video
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  cbd3e2ce-b1c1-41e4-8e46-36d782a3cfe7
	else
	  search --no-floppy --fs-uuid --set=root cbd3e2ce-b1c1-41e4-8e46-36d782a3cfe7
	fi
	linuxefi /vmlinuz-0-rescue-f4b775897bad42759168ad5d683202cb root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rhgb quiet
	initrdefi /initramfs-0-rescue-f4b775897bad42759168ad5d683202cb.img
}





and the following Ubuntu section
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Ubuntu 14.04.3 LTS (14.04) (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-892d1d33-94b8-4280-a529-1cc9e2ee4d91' {
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  892d1d33-94b8-4280-a529-1cc9e2ee4d91
	else
	  search --no-floppy --fs-uuid --set=root 892d1d33-94b8-4280-a529-1cc9e2ee4d91
	fi
	linux /boot/vmlinuz-4.1.10-040110-generic root=UUID=892d1d33-94b8-4280-a529-1cc9e2ee4d91 ro quiet splash $vt_handoff
	initrd /boot/initrd.img-4.1.10-040110-generic
}
submenu 'Advanced options for Ubuntu 14.04.3 LTS (14.04) (on /dev/sda5)' $menuentry_id_option 'osprober-gnulinux-advanced-892d1d33-94b8-4280-a529-1cc9e2ee4d91' {
	menuentry 'Ubuntu (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.1.10-040110-generic--892d1d33-94b8-4280-a529-1cc9e2ee4d91' {
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  892d1d33-94b8-4280-a529-1cc9e2ee4d91
		else
		  search --no-floppy --fs-uuid --set=root 892d1d33-94b8-4280-a529-1cc9e2ee4d91
		fi
		linux /boot/vmlinuz-4.1.10-040110-generic root=UUID=892d1d33-94b8-4280-a529-1cc9e2ee4d91 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-4.1.10-040110-generic
	}


as can be seen the "linux" and "initrd" commands in the Ubuntu sections should be "linuxefi" and "initrdefi".

also to give a better idea, Ubuntu was first installed on an MBR partition which I later converted to GPT (much before the current Fedora install was attempted though).
the current grub.cfg causes Ubuntu 

If I change the "initrd" and "linux" to  "linuxefi" and "initrdefi", then it boots properly.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Brian Lane 2015-10-22 21:25:54 UTC
What does the Ubuntu grub.cfg look like?

Comment 2 Hedayat Vatankhah 2015-10-22 21:33:44 UTC
It was already discussed in other bugs. os-prober doesn't tell Grub if it should use linux/initrd or linuxefi/initrdefi commands. An EFI grub is expected to create entries with linuxefi/initrdefi for any Linux based OSes it finds. So, in any case, I think this is a grub2 bug rather than os-prober's bug. Even if Ubuntu was installed in BIOS mode, an EFI grub should still used linuxefi/initrdefi commands. So the original installation mode is actually irrelevant, and therefore os-prober cannot/should not help in this case anyways!

BTW, the same bug was already fixed in grub2 in previous Fedora releases, so maybe the patches are not applied to F23 grub2?

Comment 3 Hedayat Vatankhah 2015-10-22 21:47:52 UTC
Relevant bugs: #1161749 (should os-prober provide more info?) and #1108296 (the fix I talked about).

Comment 4 Brian Lane 2015-10-22 22:22:33 UTC
Thanks, looks like the patch from bug 1108296 is still present, so I wonder if this is the CSM vs. UEFI case. The Ubuntu grub.cfg should tell us...

Comment 5 sandeep 2015-10-25 13:22:26 UTC
@brian - do you need any further info from me ?

Comment 6 sandeep 2015-10-25 13:25:02 UTC
I tried looking for any other grub.cfg, but I only have /boot/efi/EFI/fedora/grub.cfg now. I can boot into Ubuntu if I change initrd-> initrdefi, so let me know if I can pull some info by booting into Ubuntu.

Comment 7 sandeep 2015-10-25 14:10:03 UTC
Created attachment 1086232 [details]
Ubuntu configs

I booted to Ubuntu and pulled some of the configs.

please note grub.cfg was at /boot/grub/grub.cfg

Comment 8 Fedora End Of Life 2016-11-24 12:52:15 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2016-12-20 15:06:05 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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