Hi,
On 5/6/23 01:21, Coiby Xu wrote:
Hi Jeremy,
On Thu, May 04, 2023 at 07:46:07PM -0500, Jeremy Linton 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
>
> 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.
_find_kernel_path_by_release currently is only used for setting up the
kernel parameter crashkernel which eventually depends on grubby to
manage a kernel parameter. Does grubby support systemd-boot now? If the
answer is no, this patch will take no effect.
Grubby doesn't, there is a sdubby package which gets pulled in during
the anaconda systemd-boot install. There is a copr here
https://copr.fedorainfracloud.org/coprs/jlinton/sdubby/
That package has a utility which shims some of the grubby syntax to
bootctl/etc and is how this works for the moment without pulling in
grubby/grub-tools/etc.
Another issue about this patch is it will cause a regression as it
basically reverts commit 5eb77ee3 ("kdumpctl: Optimize
_find_kernel_path_by_release regex string").
Yah, that is a problem, and one I didn't think about outside of
rescue/etc. I'm going to have to stretch my regex foo to optionally
match it then with a `/.*` or without.
Or I can just pick up on the failure and try with the /.*.
>
> 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