Bug 1706117 - grub2-mkconfig writes to wrong grubenv file on UEFI systems
Summary: grub2-mkconfig writes to wrong grubenv file on UEFI systems
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 30
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-05-03 15:05 UTC by Gregory Lee Bartholomew
Modified: 2019-05-15 20:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-03 17:05:14 UTC
Type: Bug

Attachments (Terms of Use)

Description Gregory Lee Bartholomew 2019-05-03 15:05:35 UTC
Description of problem:

On a system where /boot has been formatted with VFAT (as recommended by the original boot loader specification), the symbolic link /boot/grub2/grubenv does not work. This would not be a problem on UEFI systems except that grub2-mkconfig is writing to the symbolic link instead of writing directly to the grubenv file on the ESP.

In my opinion, grub2-mkconfig should not be looking for or writing to files under /boot/grub2 on UEFI systems. It should write directly to the files in the area designated for UEFI config files -- $ESP/efi/fedora.

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


How reproducible:


Steps to Reproduce:

1. Format $BOOT with VFAT and use it directly as $ESP

2. sed -i '/^GRUB_CMDLINE_LINUX=/s/"$/ test1"/' /etc/default/grub

3. grub2-mkconfig -o /boot/efi/fedora/grub.cfg

Actual results:

/boot/efi/fedora/grubenv is not updated as can be seen with the following command:

$ grub2-editenv /boot/efi/fedora/grubenv list

Expected results:

/boot/efi/fedora/grubenv should be updated with the new kernel arguments

Additional info:

This was not an issue in previous releases of Fedora. In previous versions, the kernel arguments were stored in the grub.cfg file under the correct directory ($ESP/efi/fedora).

Link to original boot loader specification:


Comment 1 Peter Jones 2019-05-03 17:05:14 UTC
We don't support mounting the ESP as /boot, and we're not planning on supporting doing so.

Comment 2 Gregory Lee Bartholomew 2019-05-03 17:25:05 UTC
So how is that going to work when BLS becomes more standardized and the UEFI firmware in PCs start reading the loader/entries files and kernels directly? I believe this *should* be supported. It is the original idea behind the BLS concept -- one common boot/esp for all the OSs to share. Really, the kernel arguments should be in the loader/entries files, not grubenv.

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