From: Philipp Rudo <prudo@redhat.com>
To: Baoquan He <bhe@redhat.com>
Cc: Yishen Miao <mys721tx@gmail.com>, kexec@lists.infradead.org
Subject: Re: Unified Kernel Image Support
Date: Mon, 6 Feb 2023 17:33:20 +0100 [thread overview]
Message-ID: <20230206173320.103a9d21@rotkaeppchen> (raw)
In-Reply-To: <Y+DGJfYEJpbee/bM@MiWiFi-R3L-srv>
Hi,
On Mon, 6 Feb 2023 17:19:33 +0800
Baoquan He <bhe@redhat.com> wrote:
> On 02/03/23 at 10:46pm, Yishen Miao wrote:
> > Hello all,
> >
> > I am experimenting kexec on my box. It uses systemd-boot as the bootloader and boots from a unified kernel image (objcopy'ed cmdline, kernel, initrdramfs, and microcode updates). As of kexec-tools 2.0.25 and systemd 252.5, when I rum systemctl kexec, it returns the following:
> >
> >
> > # sudo systemctl kexec
> > Running /usr/bin/kexec --load "/efi/EFI/Linux/ArchLinux-linux.efi" --append "root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"(null)
> > Cannot determine the file type of /efi/EFI/Linux/ArchLinux-linux.efi
> >
> > It seems that systemctl successfully identified the UKI from systemd-boot, however, kexec could not recognize it.
> >
> > Are there any plans to add UKI support to kexec? Your response is greatly appreciated!
>
> My colleageus mentioned UKI recently. We have plan to support it, while
> haven't started to work on that.
I've looked into UKI recently. In order to provide some base support
one should only need to teach kexec_file_load the new file format [1].
However that still leaves two fundamental issues which limit the
usefulness of that support.
1) The way I understand it the initrd contained in the UKI is only a
stub that is supposed to read further "modules" from disk which
together form the initrd needed for the given hardware/system
configuration. The problem is that the kexec_file_load syscall only
accepts one fd for the kernel and one fd for the initrd. So to support
multiple modules we would either need to introduce a new syscall or
define a uABI that allows to pass multiple initrds via this one fd.
Either way it's a new user interface and should be designed with care.
2) As the kernel command line is part of the UKI and is protected by
the signature it cannot be changed by users. So to support kdump with a
UKI a distro would need to find one crashkernel= parameter that works
for all users which is impossible. Thus before kdump can be supported
with UKI there needs to be a mechanism in place that allows users to
edit the command line. Others have the same problem. There is an open
issue on github [2] to add this support.
So all in all I believe there will be kexec support for UKI but I don't
see it to come anytime soon.
Thanks
Philipp
[1] ...and kexec-tools if you like to support kexec_load. But as the
main use case for UKI is together with Secure Boot I don't think that's
necessary.
[2] https://github.com/systemd/systemd/issues/24539
> I have a testing machine at hand right now, just finished teseting
> upstream patches. If you have the detailed steps about how to make UKI,
> privately or publicly, I can try it now, and see what we can do.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2023-02-06 16:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-04 6:46 Unified Kernel Image Support Yishen Miao
2023-02-06 9:19 ` Baoquan He
2023-02-06 16:33 ` Philipp Rudo [this message]
2023-02-06 17:45 ` Yishen Miao
2024-12-22 20:06 ` Yishen Miao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230206173320.103a9d21@rotkaeppchen \
--to=prudo@redhat.com \
--cc=bhe@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=mys721tx@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox