Bug 1806022 - initrd entry is generated for grub2 BLSCFG config in spite of no option specified in /boot/loader/entries/kernel.conf
Summary: initrd entry is generated for grub2 BLSCFG config in spite of no option speci...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-21 20:17 UTC by Artem S. Tashkinov
Modified: 2020-03-21 02:14 UTC (History)
4 users (show)

Fixed In Version: grub2-2.02-106.fc31 grub2-2.04-10.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-20 01:49:56 UTC
Type: Bug


Attachments (Terms of Use)

Description Artem S. Tashkinov 2020-02-21 20:17:00 UTC
My /boot/loader/entries/5.5.5.conf does NOT contain initrd entry and according to https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/ 

> initrd refers to the initrd to use when executing the kernel. This also shall be a path relative to the $BOOT directory. This key is ***optional***.

Still on boot Grub2 generates a config entry with an empty initrd argument, i.e.

linux /boot/bzImage-5.5.5 root=/dev/sda2
initrd

This is an error. When initrd is *not* specified in /boot/loader/entries/kernel.conf, grub2 BLSCFG must *not* generate it.

rpm -qa | grep grub2
grub2-tools-2.02-105.fc31.x86_64
grub2-pc-2.02-105.fc31.x86_64
grub2-pc-modules-2.02-105.fc31.noarch
grub2-efi-x64-2.02-105.fc31.x86_64
grub2-tools-efi-2.02-105.fc31.x86_64
grub2-common-2.02-105.fc31.noarch
grub2-tools-extra-2.02-105.fc31.x86_64
grub2-tools-minimal-2.02-105.fc31.x86_64

Comment 1 Steve 2020-03-01 01:25:26 UTC
(In reply to Artem S. Tashkinov from comment #0)
...
> /boot/loader/entries/kernel.conf, grub2 BLSCFG must *not* generate it.
...

Could you post or attach:

1. /boot/loader/entries/kernel.conf (or 5.5.5.conf, if that is what you are using)
2. /etc/default/grub

And how are you building grub.cfg? With grub2-mkconfig?

Comment 2 Steve 2020-03-01 01:42:07 UTC
(In reply to Steve from comment #1)
...
> Could you post or attach:
...

No need. I reproduced it without any trouble by modifying a copy of the ".conf" file for "Fedora (5.5.7-100.fc30.x86_64) 30 (Thirty)".

# cat /boot/loader/entries/foo.conf 
title Foo Fedora (5.5.7-100.fc30.x86_64) 30 (Thirty)
version 5.5.7-100.fc30.x86_64
linux /vmlinuz-5.5.7-100.fc30.x86_64
#initrd /initramfs-5.5.7-100.fc30.x86_64.img
options $kernelopts
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel

# grep BLSCFG /etc/default/grub
GRUB_ENABLE_BLSCFG="true"

Running grub2-mkconfig isn't needed when BLSCFG is enabled.

Test procedure:

Reboot, select "Foo Fedora ...", press "e", and note that the "initrd" line has no arguments.

Comment 3 Fedora Update System 2020-03-17 13:33:24 UTC
FEDORA-2020-c00ce6527f has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-c00ce6527f

Comment 4 Fedora Update System 2020-03-18 02:38:53 UTC
grub2-2.04-10.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-17e46a4bd6

Comment 5 Fedora Update System 2020-03-18 02:49:18 UTC
grub2-2.02-106.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c00ce6527f

Comment 6 Fedora Update System 2020-03-20 01:49:56 UTC
grub2-2.02-106.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2020-03-21 02:14:12 UTC
grub2-2.04-10.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.


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