Make Grub Select Last Used Listing - SOLVED


Apr 28, 2020
Reaction score
Please refer to this last thread on the same subject

When I upgraded to F37 I did a clean install. So, that negated the last changes you helped me with. I'm finally back to making that same adjustment and tried doing the same. Here is my latest code for /etc/default/grub:

    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init"

In the earlier thread I was having issues with the grub.env file and corrected the problem by copying it into the correct folder. This time the grub menu is giving me the same message except it is now looking for grub.env in the /boot/grub folder. There isn't one; only /boot/grub2. Should I create the /boot/grub folder and copy grub.env into it? Or, is there a better solution.

Nope. Didn't work. That's too much of a chance for any monkey. Any advice?
Is it a silly question to ask if you ran the command to update grub before you rebooted? Just checking, will look in on this on my tomorrow.

Yes, but it appears that the problem is that Grub is looking for the /boot/grub folder rather than /boot/grub2. The error message flashes by pretty quickly. Maybe (apparently) there is more to it than just that. Is there a way to see the whole message? Would that be useful?
Shouldn't it be looking in /boot/efi/EFI/fedora where, it fact, it is located?

Follow up:
I just found this response on another forum dated this past May regarding a similar issue:

"sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg is not valid since fedora 33. The correct command is sudo grub2-mkconfig -o /boot/grub2/grub.cfg

If you used the command you posted then you need to first remove that grub.cfg file you created then run sudo dnf reinstall grub2-efi* grub2-common to recreate the proper /boot/efi/EFI/fedora/grub.cfg file to allow the system to properly perform updates and see its own updates afterward. With the change of location for the grub.cfg file the system only has a stub file under/boot/efi to point grub to the file under /boot/grub2.

As far as the booting to the last used OS I am not sure how that would be accomplished. The lines you posted cause fedora grub to use the last installed kernel as the default boot. You can change that default to whichever entry you choose, but I don’t know of any way to make it dynamic like you are asking.

First. Do you think this is relevant to my issues? If so, here is my interpretation of what I need to do:
1. Delete /etc/default/grub.cfg
2. Run sudo dnf reinstall grub2-efi* grub2-common
Re-edit the grub.cfg file.
4. Run sudo grub2-mkconfig -o /boot/grub2/grub.cfg
5. Re-boot

I'm trying to be careful. At least grub works right now. I don't want to do anything that will result in having more difficult issues.

Followup Followup:
Too late. I just installed some updates and then re-booted. Grub was totally ignored. It now boots directly into Fedora. There are instructions for repairing grub in Fedora Docs Bootloading with Grub. Lots of information. Can you confirm for me which instructions to follow?

Follow up, Followup, Follow up:
After the 4th or 5th reboot, it is now trying to use grub again. Still has the /boot/grub/grub.env not found error msg. Very strange.
Last edited:
G'day :)

1. You have an error in syntax with the grub environment file.

It is named grubenv, not grub.env

You should be able to find the error message for it with

dmesg | grep -i grubenv

...unless the file has somehow been renamed to grub.env in which case you would substitute that in the above.

Follow up:
I just found this response on another forum dated this past May regarding a similar issue:

I am taking it that that is this one here

In that, the OP (original poster) has said

That seemed to fix it… Thank you! you could certainly try that.

3. There is also this one from June 2021

which may help with the grubenv file. Make sure you read it a couple of times to completion.

Other than that, I am out of ideas for now. You may want to try at themselves and reference the two links. If you get an answer from them that works, you could come back and share it with us, please.

First. The syntax error was due to a twitchy typing finger. The actual file name is OK.
I'll do as you suggest and let you know how it works out.
That worked just fine. No more "not found" errors and Grub selects the last used listing.
Thanks for your help and patience
Oh I am so glad for you. :)

Members online