On Tue, 9 May 2023 at 00:11, Jeremy Linton <jeremy.linton(a)arm.com> wrote:
Hi,
On 5/5/23 21:26, RuiRui Yang wrote:
> On Fri, 5 May 2023 at 08:46, Jeremy Linton <jeremy.linton(a)arm.com> wrote:
>>
>> The default systemd-boot installed kernels on fedora end up in the form:
>>
>>
/boot/efi/36b54597c46383/6.4.0-0.rc0.20230427git6e98b09da931.5.fc39.aarch64/linux
>
> My Fedora goes with grub, the kernel path is below via grubby --info
> ALL|grep kernel (strip useless info):
>
kernel="/boot/cffa62f902ee423bafa9f42e6ab99f3c/6.2.13-300.fc38.x86_64/linux"
> args="ro audit=0 selinux=0 crashkernel=160M"
>
kernel="/boot/cffa62f902ee423bafa9f42e6ab99f3c/6.2.13-300.fc38.x86_64/linux"
> args="ro audit=0 selinux=0 crashkernel=160M"
>
> I got an early error in /usr/lib/kdump/kdump-lib.sh:
> "Failed to detect kdump kernel location"
>
> It seems prepare_kdump_kernel() assumes the kernel file name is
> "vmlinuz", so not sure why your "linux" kernel works.
You can change it with /etc/sysconfig/kdump. Look for KDUMP_IMG and set
it equal to "linux"
Yes, it works, I just thought the "linux" is installed by kernel rpm
installation, it is not something I manually modified so the kdump
scripts should be able to detect it. Anyway I'm not sure why my
kernel image name is "linux" I did not use systemd-boot.
>
> Long time not reading the code, there seems prepare_kdump_kernel() in
> the lib script use a different way to get the kernel path.
>
>
>>
>> Where the kernel version is a directory containing the kernel (linux)
>> and the initrd. Thus _find_kernel_path_by release needs to be a bit less
>> strict and allow some futher characters on the grubby (really bootctl)
>> output.
>>
>> Signed-off-by: Jeremy Linton <jeremy.linton(a)arm.com>
>> ---
>> kdumpctl | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kdumpctl b/kdumpctl
>> index 2c647d6..2dd1cb2 100755
>> --- a/kdumpctl
>> +++ b/kdumpctl
>> @@ -1318,7 +1318,7 @@ _filter_grubby_kernel_str()
>> _find_kernel_path_by_release()
>> {
>> local _release="$1" _grubby_kernel_str _kernel_path
>> - _grubby_kernel_str=$(grubby --info ALL | grep
"^kernel=.*$_release\"$")
>> + _grubby_kernel_str=$(grubby --info ALL | grep
"^kernel=.*$_release.*\"$")
>> _kernel_path=$(_filter_grubby_kernel_str
"$_grubby_kernel_str")
>> if [[ -z $_kernel_path ]]; then
>> ddebug "kernel $_release doesn't exist"
>> --
>> 2.40.1
>> _______________________________________________
>> kexec mailing list -- kexec(a)lists.fedoraproject.org
>> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
>> Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>> List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
>> List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
>> Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue
>