Use dracut to generate initramfs - #2833
Merged
Merged
Conversation
tpm2-unlock.sh wasn't working for me using Ubuntu 26.04. After the reboot the initramfs could not be loaded and the device started a busybox shell. After using dracut instead of update-initramfs as described [here](https://ubuntu.com/server/docs/how-to/security/tpm-backed-luks-decryption-with-clevis/) it worked. Signed-off-by: pq2 <github@nhelmschmidt.de>
Member
|
Thanks for the PR! 🚀 |
szaimen
reviewed
Aug 6, 2026
| fi | ||
| print_text_in_color "$ICyan" "Updating initramfs..." | ||
| if ! update-initramfs -u -k 'all' | ||
| if ! dracut -f |
Collaborator
There was a problem hiding this comment.
Hi, I am not sure if this will continue to work on Ubuntu 24.04. Maybe we should use dracut on 26.04 and update-initramfs on ubuntu 24.04. WDYT @pq2?
Contributor
Author
There was a problem hiding this comment.
I'm not entirely sure about that either. While clevis-dracut is available in the repositories for 24.04 (Source), dracut doesn't seem to be the default tool for creating the initramfs in 24.04. It can't hurt to use both, depending on the version, as you suggested.
Collaborator
There was a problem hiding this comment.
Yes lets do that. Would you be able to create a PR?
Member
There was a problem hiding this comment.
Note, we have variables for OS checks.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tpm2-unlock.sh wasn't working for me using Ubuntu 26.04. After the reboot the initramfs could not be loaded and the device started a busybox shell.
After using dracut instead of update-initramfs as described here it worked.
🤖 AI (if applicable)