Bug 829968 - grub2-efi-mkinstall does not detect other grub2 tools correctly
Summary: grub2-efi-mkinstall does not detect other grub2 tools correctly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 17
Hardware: Unspecified
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: 2012-06-07 22:10 UTC by Jan Vcelak
Modified: 2013-08-01 08:55 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-01 08:55:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Vcelak 2012-06-07 22:10:17 UTC
Description of problem:

grub2-efi-mkconfig does not detect other grub2-efi-* tools correctly and therefore produces an incomplete configuration file. In fact, this is a problem of scripts in in /etc/grub.d/*.

Version-Release number of selected component (if applicable):
grub2-efi-2.0-0.25.beta4.fc17.x86_64

How reproducible:
EFI system with grub2-efi package installed


Steps to Reproduce:
1. grub2-efi-mkconfig

  
Actual results:

root:/# grub2-efi-mkconfig 
Generating grub.cfg ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-efi-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="${saved_entry}"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if loadfont unicode ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=cs_CZ
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
/usr/share/grub/grub-mkconfig_lib: line 282: /usr/sbin/grub2-probe: No such file or directory
Found linux image: /boot/vmlinuz-3.4.0-1.fc17.x86_64
/usr/share/grub/grub-mkconfig_lib: line 49: /usr/bin/grub2-mkrelpath: No such file or directory


Expected results:

No "No such file or directory" errors, and no missing kernels in the configuration file.


Additional info:

Following command generates the config correctly:
grub_probe=/usr/sbin/grub2-efi-probe grub_mkrelpath=/usr/bin/grub2-efi-mkrelpath grub2-efi-mkconfig

Comment 1 Mads Kiilerich 2012-06-07 23:10:17 UTC
Yes, the grub2-efi scheme used in f17 doesn't work. That is one reason f17 use grub-efi instead.

The scheme with common tools used in http://koji.fedoraproject.org/koji/buildinfo?buildID=322368 works much better - feel free to give it a try.

Comment 2 Jan Vcelak 2012-06-08 09:10:17 UTC
(In reply to comment #1)
> Yes, the grub2-efi scheme used in f17 doesn't work. That is one reason f17
> use grub-efi instead.

I didn't know that. My bootloader broke after upgrading to F17, so I removed all the configuration, grub* packages and then installed the grub2-efi package back hoping it will work immediately. :-)

> The scheme with common tools used in
> http://koji.fedoraproject.org/koji/buildinfo?buildID=322368 works much
> better - feel free to give it a try.

I gave it a try and it works. First version which allowed me to boot through grub menu: grub2-efi-mkconfig -o $(readlink -f /etc/grub2-efi.cfg)

However, the documentation is very poor. It took me a long until I realized, that the EFI image installed by grub-efi is different from the one generated by grub2-install. I'm wondering if there is a way to regenerate the EFI image without manually specifying all modules.

Comment 3 Vladimir Serbinenko 2012-06-08 09:40:18 UTC
Which EFI image do you mean? grub-install should be the preffered way. There is also grub-mkstandalone for some specific needs.

Comment 4 Jan Vcelak 2012-06-08 09:56:19 UTC
'/boot/efi/EFI/fedora/grubx64.efi' provided with grub2-efi package works just fine, the image generated with 'grub2-install --bootloader-id=fedora' didn't work for me.

Comment 5 Vladimir Serbinenko 2012-06-08 10:01:53 UTC
"didn't work" is extremely vague

Comment 6 Jan Vcelak 2012-06-08 10:09:37 UTC
Yes, sorry, is value. I end up in a GRUB console.

I had to load configfile module and then load the config file manually:
insmod configfile
configfile (hd0,gpt1)/efi/fedora/grub.cfg

Now I found out, that the pregenerated grubx64.efi image is probably standalone image, because there are no modules in /boot/grub2.

Comment 8 Fedora End Of Life 2013-07-04 02:37:57 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 WONTFIX if it remains open with a Fedora 
'version' of '17'.

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 prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 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 to Fedora 17's end of life.

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 2013-08-01 08:55:27 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 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.

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.