Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rhcos-4.14] live-iso: Write kernel (and hmac) to /boot too #3626

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

cgwalters
Copy link
Member

Fixes the problem that we backported the FIPS test but not the enablement here.


This is useful in order to make the dracut FIPS module work. For ostree, we put the kernel stuff in /boot/ostree in order to namespace things. But non-ostree systems tend to use /boot directly, and that's what the dracut module is hardcoded to do.

Now we did add some logic in the dracut module which scrapes the grub-injected BOOT_IMAGE, except this doesn't work for how we generate the CoreOS Live ISO today because the filenames of the kernel don't include versions etc.

In the case of the Live ISO though we don't really need to "ostree namespace" things, so just hardlink the kernel binary and the hmac file into the traditional places in /boot.

We could not do this, and do it in our dracut module in the initramfs in fips mode only for the Live ISO, but that'd be way more ugly.

xref https://issues.redhat.com/browse/OCPBUGS-15843

(cherry picked from commit 86943ca)

This is useful in order to make the dracut FIPS module work.
For ostree, we put the kernel stuff in `/boot/ostree` in order
to namespace things.  But non-ostree systems tend to use `/boot`
directly, and that's what the dracut module is hardcoded to do.

Now we did add some logic in the dracut module which scrapes the
grub-injected `BOOT_IMAGE`, except this doesn't work for how
we generate the CoreOS Live ISO today because the filenames
of the kernel don't include versions etc.

In the case of the Live ISO though we don't really need to
"ostree namespace" things, so just hardlink the kernel binary
and the hmac file into the traditional places in `/boot`.

We *could* not do this, and do it in our dracut module
in the initramfs in fips mode only for the Live ISO, but that'd
be way more ugly.

xref https://issues.redhat.com/browse/OCPBUGS-15843

(cherry picked from commit 86943ca)
@cgwalters cgwalters added the branch/rhcos PR against the rhcos branch label Sep 19, 2023
@jlebon jlebon changed the title live-iso: Write kernel (and hmac) to /boot too [rhcos-4.14] live-iso: Write kernel (and hmac) to /boot too Sep 19, 2023
@cgwalters cgwalters merged commit efa00a6 into coreos:rhcos-4.14 Sep 19, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/rhcos PR against the rhcos branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants