From: "Jan Hendrik Farr" <kernel@jfarr.cc>
To: "Baoquan He" <bhe@redhat.com>
Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
x86@kernel.org, tglx@linutronix.de, dhowells@redhat.com,
vgoyal@redhat.com, keyrings@vger.kernel.org,
akpm@linux-foundation.org, bhelgaas@google.com,
"Luca Boccassi" <bluca@debian.org>,
lennart@poettering.net, prudo@redhat.com
Subject: Re: [PATCH v2 0/2] x86/kexec: UKI Support
Date: Tue, 12 Sep 2023 21:25:26 +0200 [thread overview]
Message-ID: <204f124d-c79d-4ad6-8f69-b7bb5f8d1ab6@app.fastmail.com> (raw)
In-Reply-To: <ZP+41JvEFjsnEG19@MiWiFi-R3L-srv>
> By the way, could you provide detailed steps about how to test this
> patchset so that people interested can give it a shot?
Sure.
0. Build and run your kernel with my patches.
1. You're gonna need a UKI to kexec. I personally use sbctl or ukify to create them.
sbctl command example (assumes you have the cmdline you want saved in a file called cmdline):
sudo sbctl bundle -k /boot/vmlinuz-6.5.2 -f /boot/initrd.img-6.5.2 -c ./cmdline -s ./uki.efi
ukify command example:
sudo python3 ukify.py build --linux=/boot/vmlinuz-6.5.2 --initrd=/boot/initrd.img-6.5.2 --cmdline <cmdline as string or a filename>
2. If you are running in lockdown mode you'll have to sign the UKI. You can use sbctl, pesign, or sbsign for example.
3. Compile kexec-test (see links below). Simple "gcc main.c -o kexec-test" should work
4. Do the kexec load: ./kexec-text <path to uki>
(this is equivalent to "kexec -a -l <path to UKI>", however that currently complains about not recognizing the format)
5. At this point it's useful to check if the loading succeeded with: "cat /sys/kernel/kexec_loaded" (should return "1")
6. Do a kexec reboot. If you are running systemd, the best way is with: "systemctl kexec". Otherwise you can try "kexec -e", however this will not shut all your services down
If anyone has problems please feel free to ask.
Links:
sbctl: https://github.com/Foxboron/sbctl
ukify: https://github.com/systemd/systemd/tree/main/src/ukify
kexec-test: https://github.com/Cydox/kexec-test/
next prev parent reply other threads:[~2023-09-12 19:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 5:25 Jan Hendrik Farr
2023-09-11 5:25 ` [PATCH v2 1/2] move pefile_parse_binary to its own file Jan Hendrik Farr
2023-09-11 5:25 ` [PATCH v2 2/2] x86/kexec: UKI support Jan Hendrik Farr
2023-09-12 1:03 ` [PATCH v2 0/2] x86/kexec: UKI Support Baoquan He
2023-09-12 19:25 ` Jan Hendrik Farr [this message]
2023-09-13 14:00 ` Philipp Rudo
2023-09-13 14:42 ` Jan Hendrik Farr
2023-09-14 19:09 ` Philipp Rudo
2023-09-20 7:43 ` Dave Young
2023-09-20 8:40 ` Dave Young
2023-09-20 10:50 ` Ard Biesheuvel
2023-09-20 12:07 ` Dave Young
2023-09-20 12:18 ` Dave Young
2023-09-21 3:14 ` Dave Young
2023-09-20 22:02 ` Jan Hendrik Farr
2023-09-25 14:36 ` Philipp Rudo
2023-09-14 9:32 ` Lennart Poettering
2023-09-14 12:26 ` Jarkko Sakkinen
2023-09-14 15:33 ` Jarkko Sakkinen
2023-09-14 16:11 ` Jan Hendrik Farr
2023-09-14 21:14 ` Jarkko Sakkinen
2023-09-14 18:51 ` Philipp Rudo
2023-09-14 21:04 ` Jan Hendrik Farr
2023-09-18 15:36 ` Philipp Rudo
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=204f124d-c79d-4ad6-8f69-b7bb5f8d1ab6@app.fastmail.com \
--to=kernel@jfarr.cc \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=bhelgaas@google.com \
--cc=bluca@debian.org \
--cc=dhowells@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=keyrings@vger.kernel.org \
--cc=lennart@poettering.net \
--cc=linux-kernel@vger.kernel.org \
--cc=prudo@redhat.com \
--cc=tglx@linutronix.de \
--cc=vgoyal@redhat.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®