It replaces mkosi.crt for local tests, without openssl or a mkosi.local.conf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d1c7c55700
commit
d76d28ef8a
3 files changed
+3
-23
No files matched your search
@@ -38,29 +38,11 @@ at first boot.
|
||||
|
||||
## Development
|
||||
|
||||
`mkosi build` signs with `mkosi.key`, the private key of `mkosi.crt`, which
|
||||
only CI has (the `SECUREBOOT_KEY` secret). `mkosi genkey` won't replace
|
||||
`mkosi.crt`, so local builds sign with a test key. Make one:
|
||||
|
||||
```sh
|
||||
openssl req -new -x509 -newkey rsa:2048 -nodes -subj /CN=test \
|
||||
-keyout ~/test.key -out ~/test.crt
|
||||
mkosi -f genkey # This replaces mkosi.crt for local tests. Don't commit it.
|
||||
mkosi build
|
||||
```
|
||||
|
||||
and point `mkosi.local.conf` at it, which mkosi reads and git ignores:
|
||||
|
||||
```ini
|
||||
[Validation]
|
||||
SecureBootKey=~/test.key
|
||||
SecureBootCertificate=~/test.crt
|
||||
SignExpectedPcrKey=~/test.key
|
||||
SignExpectedPcrCertificate=~/test.crt
|
||||
VerityKey=~/test.key
|
||||
VerityCertificate=~/test.crt
|
||||
```
|
||||
|
||||
Then run `mkosi build`.
|
||||
|
||||
`mkosi.output/` then holds the disk image (`runneros_<version>.raw`) and the
|
||||
UKI and /usr partitions that make up an update. To boot a test VM, see
|
||||
[AGENTS.md](AGENTS.md#testing).
|
||||
Reference in new issue
Block a user