Bug 2113852 - kdump service can not find kernel
Summary: kdump service can not find kernel
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kexec-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Coiby
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-02 07:17 UTC by Dave Young
Modified: 2023-12-20 08:07 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-12-20 08:07:52 UTC
Type: Bug
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-560 0 None None None 2022-08-02 07:26:16 UTC

Description Dave Young 2022-08-02 07:17:51 UTC
Description of problem:

kdumpctl start failed with below error:
[root@darkstar]# kdumpctl restart
kdump: kexec: unloaded kdump kernel
kdump: Stopping kdump: [OK]
kdump: Failed to detect kdump kernel location
kdump: failed to prepare for kdump bootinfo.
kdump: Starting kdump: [FAILED]

The kernel sits in /boot/${machine-id}/$kernel-version/linux

the machine-id is set in /etc/machine-id, not sure when it is set, maybe by systemd.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Coiby 2022-08-08 06:20:40 UTC
Hi Dave,

How do you configure Fedora so that the kernel is installed to  /boot/${machine-id}/$kernel-version/linux?

Comment 2 Dave Young 2022-08-09 02:24:38 UTC
Hi Coiby, I'm not sure how I did it, I usually use dnf system-upgrade so it could be created by systemd sometime during one of the upgrade.

Comment 3 Lichen Liu 2022-08-11 06:39:48 UTC
(In reply to Dave Young from comment #2)
> Hi Coiby, I'm not sure how I did it, I usually use dnf system-upgrade so it
> could be created by systemd sometime during one of the upgrade.

Hi Dave,

I find that /bin/kernel-install which is provided by systemd-udev will load some plugins to choose the location of vmlinuz.
The plugins are located in /usr/lib/kernel/install.d, for this issue, 90-loaderentry.install will check the machine id and $KERNEL_INSTALL_LAYOUT, if the latter one is "bls", the vmlinuz will be copied to /boot/$MACHINE_ID/$KERNEL_VERSION/linux.

```
...
if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
    exit 0
fi

if [ "$KERNEL_INSTALL_LAYOUT" != "bls" ]; then
    exit 0
fi
...

install -g root -o root -m 0644 "$KERNEL_IMAGE" "$ENTRY_DIR_ABS/linux" || {
    echo "Could not copy '$KERNEL_IMAGE' to '$ENTRY_DIR_ABS/linux'." >&2
    exit 1
}
...
```

By checking /bin/kernel-install, we can see if $boot/$machineid dir exist, the $KERNEL_INSTALL_LAYOUT will be set to "bls".
```
if [ -z "$layout" ]; then
    # Administrative decision: if not present, some scripts generate into /boot.
    if [ -d "$BOOT_ROOT/$MACHINE_ID" ]; then
        layout="bls"
    else
        layout="other"
    fi
fi
...
export KERNEL_INSTALL_LAYOUT="$layout"
...

```

I think that KDUMP_IMG should be "linux" if the machine is using machine-id.

Thanks!
Lichen

Comment 4 Ben Cotton 2023-04-25 17:42:00 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
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
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Ludek Smid 2023-05-25 15:46:15 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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