Commit Graph

13 Commits

Author SHA1 Message Date
Luca BRUNO 39ef6253e9
lib/bootloader-zipl: check for errors when opening initrd
This adds a missing error check when opening an initrd in s390x
Secure Execution (SE) logic.
It was detected by RH internal static checks.
2022-10-13 10:48:38 +00:00
Nikita Dubrovskii c6a53ef6e8 s390x: use 'libarchive' to modify initrd in SE case 2022-09-08 11:41:34 +02:00
Nikita Dubrovskii 769ac686f1 s390x: simplify 's390x-se-luks-gencpio' script 2022-09-05 12:08:35 +02:00
Nikita Dubrovskii 49ce9b0289 s390x: ensure both 'root' and 'boot' luks keys exist 2022-09-05 10:46:13 +02:00
Nikita Dubrovskii 14a7c0c74b s390x: rename sd-boot to sdboot
Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
2022-06-24 15:15:57 +02:00
Nikita Dubrovskii b03fa626f1 s390x: fail on error during reading of SecureExecution sysfs flag 2022-05-25 11:00:34 -04:00
Nikita Dubrovskii d000569859 s390x: ensure SecureExecution is enabled before sd-boot generation
Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
2022-05-23 18:24:43 +02:00
Nikita Dubrovskii 7a5c604ca3 s390x: generate sd-boot at its own partition
Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
2022-05-18 13:06:29 +02:00
Christian Hergert 6419c32334 lib/bootloader: use ot_journal_print() instead of sd-journal
This needs to use the helper so that USE_LIBSYSTEMD still works as
expected.
2022-02-11 15:40:26 -08:00
Nikita Dubrovskii d1ab18f327 s390x: add LUKS keyfile to 'sd-boot'
This allows to use Secure Execution with LUKS encrypted boot disk,
key and cryptab are stored only in 'sd-boot' encrypted image.

Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
2022-02-11 09:02:42 +01:00
Nikita Dubrovskii c27b98a2cb s390x: add "IBM Secure Execution for Linux" support
If system contains ibm-z-hostkey (fetched during ignition), than
ostree generates 'sd-boot' image and reboots into Secure Execution

Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
2022-02-11 09:00:38 +01:00
Joseph Marrero 581a58067b Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
Colin Walters c61234a428 bootloader: Add a zipl bootloader backend
zipl is a bit special in that it parses the BLS config files
directly *but* we need to run the command to update the "boot block".

Hence, we're not generating a separate config file like the other
backends.  Instead, extend the bootloader interface with a `post_bls_sync`
method that is run in the same place we swap the `boot/loader` symlink.

We write a "stamp file" in `/boot` that says we need to run this command.
The reason we use stamp file is to prevent the case where the system is
interrupted after BLS file is updated, but before zipl is triggered,
then zipl boot records are not updated.
This opens the door to making things eventually-consistent/reconcilable
by later adding a systemd unit to run `zipl` if we're interrupted via
a systemd unit - I think we should eventually take this approach
everywhere rather than requiring `/boot/loader` to be a symlink.

Author: Colin Walters <walters@verbum.org>
Tested-by: Tuan Hoang <tmhoang@linux.ibm.com>
Co-Authored-By: Tuan Hoang <tmhoang@linux.ibm.com>
2019-10-16 14:22:02 +00:00