-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Since bootc-dev/bootc@02c57b3, bootc exclusively uses SHA-512 digests. This means that building a composefs-based image and installing it with bootc install to-disk won't work:
-
If you use a Type 1 BLS entry (
/boot/loader/entries/), installation will work properly, butbootcwill write a SHA-512 digest to/boot/loader/entries/[…].conf, so booting the system fails in the initramfs with anError: Invalid string lengtherror.let (image, insecure) = get_cmdline_composefs::<Sha256HashValue>(cmdline)?; -
If you use a Type 2 BLS entry (UKI), then
cfsctlwill only output SHA-256 digestscomposefs-rs/crates/cfsctl/src/main.rs
Lines 255 to 261 in 0f63603
OciCommand::Pull { ref image, name } => { let (sha256, verity) = composefs_oci::pull(&Arc::new(repo), image, name.as_deref(), None).await?; println!("sha256 {}", hex::encode(sha256)); println!("verity {}", verity.to_hex()); } so the digests embedded in the UKI will also use SHA-256. This means that when installing with
bootc install to-disk, you'll get anerror: Installing to disk: Setting up composefs boot: Setting up UKI boot: Writing <kver>.efi to ESP: Parsing composefs=: Invalid string lengtherror.
There are examples of both methods in examples/, but because of this, none of them are working for me right now.
(I may also be completely misunderstanding something and/or building my containers incorrectly, so sorry in advance if everything that I mentioned above turns out to be wrong.)