Bug 1173843 - Error "File '/grub2/grubenv' not found" on selecting any boot option.
Summary: Error "File '/grub2/grubenv' not found" on selecting any boot option.
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 21
Hardware: x86_64
OS: All
unspecified
high
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-13 13:24 UTC by blitzter
Modified: 2016-06-15 19:45 UTC (History)
23 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-02 05:50:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
/etc/default/grub (583 bytes, text/plain)
2014-12-13 13:24 UTC, blitzter
no flags Details
Patch for grub2.spec (375 bytes, patch)
2015-03-29 21:08 UTC, Edgar Hoch
no flags Details | Diff
Script to correct the symlink /boot/grub2/grubenv on already installed F21 hosts (381 bytes, application/x-shellscript)
2015-03-29 21:11 UTC, Edgar Hoch
no flags Details

Description blitzter 2014-12-13 13:24:56 UTC
Created attachment 968035 [details]
/etc/default/grub

Description of problem:
After using FedUp to upgrade from Fedora 20 to 21 the following error comes on every boot.
The error "File '/grub2/grubenv' not found" comes on selecting any boot option in grub menu. I have to press any key to proceed.
Since grubenv is not found, the default also is not saved so the first option remains default.

I have few changes in /etc/default/grub but they were work since months on fedora 20 

Version-Release number of selected component (if applicable):
Fedora 21
grub2 2.02-013.fc21
grub2-efi 2.02-013.fc21

How reproducible:
On every boot

Steps to Reproduce:
1.
2.
3.

Actual results:
Error on selecting any option or letting default get selected on timeout

Expected results:
No error should come

Additional info:

Comment 1 javier del valle 2014-12-15 12:09:47 UTC
I have exactly the same problem

Comment 2 Martin Swiech 2014-12-16 17:22:46 UTC
I had same problem. I will describe my case:
Home PC with dual boot (Fedora + W7)
I am using grub options GRUB_DEFAULT=saved, GRUB_SAVEDEFAULT=true
I got separated small primary partition (/dev/sda1) for /boot and separated big extended partition (/dev/sda5) for / 

My /boot/grub2/grubenv was symlink pointing to /boot/efi/EFI/fedora/grubenv . And that was the problem. There is not /boot/efi/EFI/fedora/grubenv in the moment of booting, because /dev/sda1 is not mounted to its mountpoint /boot .

I have changed symlink /boot/grub2/grubenv to point to ../efi/EFI/fedora/grubenv and this solved the problem for me.

Comment 3 blitzter 2014-12-16 19:09:31 UTC
(In reply to Martin Swiech from comment #2)
> I had same problem. I will describe my case:
> Home PC with dual boot (Fedora + W7)
> I am using grub options GRUB_DEFAULT=saved, GRUB_SAVEDEFAULT=true
> I got separated small primary partition (/dev/sda1) for /boot and separated
> big extended partition (/dev/sda5) for / 
> 
> My /boot/grub2/grubenv was symlink pointing to /boot/efi/EFI/fedora/grubenv
> . And that was the problem. There is not /boot/efi/EFI/fedora/grubenv in the
> moment of booting, because /dev/sda1 is not mounted to its mountpoint /boot .
> 
> I have changed symlink /boot/grub2/grubenv to point to
> ../efi/EFI/fedora/grubenv and this solved the problem for me.

Awesome... Works for me too.

Comment 4 Nikita Ignatovich 2014-12-17 14:11:46 UTC
I have same problem. I added line "GRUB_SAVEDEFAULT=true" to /etc/default/grub. In fedora 20 it's works fine.

Method of Martin Swiech don't tested. Anyway, need to change grub2 package.

Comment 5 chris 2014-12-17 15:28:28 UTC
Same Problem but without uefi boot

Also after the upgrade the entry for windows is called Windows Vista and not Windows 7 like it was before (and in fact it is win7).

Comment 6 Philipp Gampe 2014-12-17 16:58:53 UTC
I second that:
>> I have same problem. I added line "GRUB_SAVEDEFAULT=true" to /etc/default/grub. In fedora 20 it's works fine.

Comment 7 Nikita Ignatovich 2014-12-18 08:39:22 UTC
(In reply to chris from comment #5)
> Also after the upgrade the entry for windows is called Windows Vista and not
> Windows 7 like it was before (and in fact it is win7).

This is bug of os-prober package i think.

Comment 8 Alexei Podtelezhnikov 2014-12-19 03:08:25 UTC
(In reply to Martin Swiech from comment #2)
> I have changed symlink /boot/grub2/grubenv to point to
> ../efi/EFI/fedora/grubenv and this solved the problem for me.

Thanks!

Comment 9 Julian Sikorski 2014-12-21 10:57:26 UTC
Just experienced this myself. I can confirm that fix from comment 2 works.

Comment 10 Frank Crawford 2015-01-24 08:50:26 UTC
Yeah, I had the same problem.  It only occurs if grub2-efi is also installed (as you lised).

Can I ask why we aren't using a hard link here?  They have to be on the same partition, and it is really simpler for any filesystem code to parse.

Comment 11 Lorenzo 2015-02-02 21:00:18 UTC
Confirmed this bug was triggered by adding GRUB_SAVEDEFAULT=true in /etc/default/grub

Comment #2 seems to solve the issue.

Comment 12 Diego 2015-03-14 22:20:57 UTC
hi, my problem is this:
i followed the steps outlined here but the new symlink remains broken in my case, because I have no ../efi/EFI/fedora/grubenv file
what i am doing wrong?? (total noob here)

Comment 13 Edgar Hoch 2015-03-29 21:08:43 UTC
Created attachment 1008050 [details]
Patch for grub2.spec

Here is a patch for grub2.spec, that solves the problem.

Maintainer, please could you apply the patch and rebuild the package?

Comment 14 Edgar Hoch 2015-03-29 21:11:43 UTC
Created attachment 1008051 [details]
Script to correct the symlink /boot/grub2/grubenv on already installed F21 hosts

Here is a script for manually correcting the symbolic link /boot/grub2/grubenv on already installed Fedora 21 hosts.

Comment 15 Beat Küng 2015-09-12 08:10:55 UTC
same problem on F22, with grub options GRUB_DEFAULT=saved, GRUB_SAVEDEFAULT=true
correcting the symlink to ../efi/EFI/fedora/grubenv fixes it.

Comment 16 Fedora End Of Life 2015-11-04 10:33:20 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. 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 '21'.

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 21 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 17 Uwe Köcher 2015-11-18 00:17:57 UTC
same problem on F23.
Comment #2 (and #15) resolves the issue.

Notes: freshly installed F23 without (u)efi (using the bios boot)

Comment 18 Fedora End Of Life 2015-12-02 05:50:56 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 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.

Comment 19 Edgar Hoch 2015-12-03 20:03:43 UTC
Fedora 23 still has the identical problem.
Please reopen and fix it!

The fix is so simple... see comment #13.

lrwxrwxrwx. 1 root root 28  5. Sep 23:15 /boot/grub2/grubenv -> /boot/efi/EFI/fedora/grubenv

grub2-2.02-0.23.fc23.x86_64
grub2-efi-2.02-0.23.fc23.x86_64

Comment 20 Lorenzo 2015-12-03 20:07:57 UTC
Still confirmed in F23 please reopen

Comment 21 Cheer Chunhao 2015-12-08 18:07:57 UTC
Still happening in F23 fresh install

Comment 22 Keith Bellairs 2016-03-12 16:51:28 UTC
It was fixed until today. dnf upgrade in f23 regressed to this bug.

Comment 23 Jan Niklas Hasse 2016-05-04 07:39:54 UTC
Please reopen! I can confirm that this happens in F23 after dnf upgrade. The attached patch in #13 works.

Comment 24 Warren Lewis 2016-06-15 19:42:03 UTC
A new bug report has been opened F23 at https://bugzilla.redhat.com/show_bug.cgi?id=1335533 perhaps these should be merged making sure that the result is left open.


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