-
Notifications
You must be signed in to change notification settings - Fork 24
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
initramfs-module: add example adding a module to the initramfs #63
Conversation
initramfs-module/Containerfile
Outdated
@@ -0,0 +1,8 @@ | |||
FROM quay.io/fedora/fedora-coreos:stable | |||
RUN KERNEL=$(rpm -q kernel | cut -c 8-); \ | |||
dracut --reproducible -v --add 'ostree' -f --no-hostonly --omit-drivers 'nouveau' --omit 'nfs' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing we could note here is that it's now a best practice to ensure that the "base image" has its initramfs arguments embedded in the image. coreos/fedora-coreos-config#1828
I think at this time, the --omit nfs
is not needed (per that PR).
Oh I see, it looks like you may have copied these arguments from the RHCOS one, which has these others.
Maybe if we're aiming to handle RHCOS here we could at least link to
https://github.com/openshift/os/blob/1f2c0eb7e370d2412db15fa28556f419ddf73c5d/common.yaml#L37
But ideally in the future we do the same change for RHCOS that we did for FCOS and then this bit isn't necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I will link to both files in a comment then, that way we provide enough guideline to both RHCOS and FCOS users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am re reading this, does that mean that for --no-hostonly we don't need to add it either because it's also provided on overlay.d/05core/usr/lib/dracut/dracut.conf.d/fcos-nohostonly.conf ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep!
f1b9980
to
2bcd8ed
Compare
initramfs-module/Containerfile
Outdated
cat /lib/modules/$KERNEL_VERSION/initramfs.img dracut-random.cpio.gz > /lib/modules/$KERNEL_VERSION/initramfs-new.img && \ | ||
# Move initramfs to final destination. | ||
mv /lib/modules/$KERNEL_VERSION/initramfs-new.img /lib/modules/$KERNEL_VERSION/initramfs.img && ostree container commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor nit, this can be condensed into
cat dracut-random.cpio.gz >> /lib/modules/$KERNEL_VERSION/initramfs.img && \
ostree container commit
BTW this all relates to https://bugzilla.redhat.com/show_bug.cgi?id=1380866 |
putting back as draft as with FIPS I can't get it to boot with or without the /dev/random workaround. Need to dig. |
AFAIK no one is really testing FIPS in Fedora today. The FIPS setup only lives in RHCOS today. So...I'd be fine ignoring the FIPS-FCOS problem for now if you prefer! |
I was able to reboot into the image with the current example on Fedora, no need for the cpio file with /dev/random on FCOS and no fips. merging |
Demos generating a initramfs with specific modules added and omitted.