Bug 1706177

Summary: [REGRESSION] grub2-mkconfig no longer sees custom built kernels in /boot
Product: [Fedora] Fedora Reporter: Artem S. Tashkinov <aros>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 30CC: fmartine, lkundrak, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-03 19:14:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Artem S. Tashkinov 2019-05-03 17:50:34 UTC
Description of problem:

I have a custom kernel _without_ initrd installed under /boot/vmlinuz-5.0-ic64.x86_64

Version-Release number of selected component (if applicable): grub2-tools-2.02-78.fc30.x86_64

How reproducible: always

Steps to Reproduce: grub2-mkconfig

Actual results: my kernel is omitted from the output

Expected results: the kernel being included

Additional info: Fedora 29 did NOT have this bug, i.e. everything worked fine.

Comment 1 Artem S. Tashkinov 2019-05-03 17:56:29 UTC
# grub2-mkconfig > /dev/null
Generating grub configuration file ...
device-mapper: reload ioctl on osprober-linux-sdb5  failed: Device or resource busy
Command failed.
done

I had the same error message with grub2-mkconfig under Fedora 29 but it did not affect its behavior.

My partition layout:

sdb1: EFI System Partition: /boot/efi
sdb5: / (root)
sdb6: /boot

Comment 2 Artem S. Tashkinov 2019-05-03 19:09:37 UTC
strace -fF grub2-mkconfig shows that something stat()'s my customs kernels but they don't show up:

11164 stat("/boot/vmlinuz-4.20-ic64.x86_64", {st_mode=S_IFREG|0644, st_size=4133536, ...}) = 0
11164 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
11164 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
11164 stat("/boot/vmlinuz-5.0-ic64.x86_64", {st_mode=S_IFREG|0644, st_size=4133536, ...}) = 0
11164 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
11164 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
11164 stat("/vmlinuz-*", 0x7ffd55d2e4a0) = -1 ENOENT (No such file or directory)
11164 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
11164 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
11164 stat("/boot/kernel-*", 0x7ffd55d2e4a0) = -1 ENOENT (No such file or directory)
11164 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
11164 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
11164 openat(AT_FDCWD, "/boot/ostree/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
11164 stat("/boot/ostree/*/vmlinuz-*", 0x7ffd55d2e610) = -1 ENOENT (No such file or directory)

I tried creating dummy initrd-5.0-ic64.x86_64 and config-5.0-ic64.x86_64 files but that didn't help either.

Comment 3 Artem S. Tashkinov 2019-05-03 19:14:28 UTC
This comment saved my poor ***:

https://bugzilla.redhat.com/show_bug.cgi?id=1698227#c2

You guys seriously f***ed up.

Why on Earth does a F29 to F30 upgrade changes /etc/default/grub to a non-working state?

*** This bug has been marked as a duplicate of bug 1652806 ***