-
Notifications
You must be signed in to change notification settings - Fork 11
Miscellaneous changes needed to use newer Dracut with its sysroot feature #105
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
Merged
Conversation
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
Signed-off-by: James Le Cuirot <[email protected]>
Among other things, these prevent virtio interfaces from being renamed. Signed-off-by: James Le Cuirot <[email protected]>
Signed-off-by: James Le Cuirot <[email protected]>
Signed-off-by: James Le Cuirot <[email protected]>
Signed-off-by: James Le Cuirot <[email protected]>
2 tasks
Member
Yeah, the situation is stupid. |
krnowak
reviewed
Apr 23, 2025
* It wasn't working with Dracut's sysroot feature. * It was writing some wrappers to the wrong directory. * It was creating a wrapper for a script that is sourced, not exec'd. * It was creating wrappers for symlinks, using more space. * It was creating wrappers for files that didn't exist. * It was creating wrappers for core utilities that might be needed by other modules before /sysusr is mounted. Signed-off-by: James Le Cuirot <[email protected]>
These were all broken because ln_r was not the right helper to use. Signed-off-by: James Le Cuirot <[email protected]>
Tools like Clevis are executed from /sysusr/usr, so we need to ensure this is mounted by trying to execute them. Signed-off-by: James Le Cuirot <[email protected]>
Flatcar doesn't set a root password, so we have to use sulogin's --force option to get an emergency shell. Signed-off-by: James Le Cuirot <[email protected]>
These are pulled in by default in newer Dracut versions, but they have large dependencies, and we already cover tpm2-tss with the clevis module. Signed-off-by: James Le Cuirot <[email protected]>
Signed-off-by: James Le Cuirot <[email protected]>
Signed-off-by: James Le Cuirot <[email protected]>
6c5f208 to
8f808c1
Compare
krnowak
approved these changes
Apr 23, 2025
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.
Misc changes needed to use new Dracut with sysroot feature
This must be reviewed in tandem with flatcar/scripts#2837.
Flatcar has lagged behind on Dracut 053 for quite a while. The latest version is currently 106, although it did jump from 060 to 100 when it changed hands.
It's hard to summarise the changes here, so please see the commit messages. The main change is that we now run Dracut with its
--sysrootargument, removing the need to chroot and jump through hoops to avoid the Portage sandbox in the coreos-kernel ebuild.Before you ask, the extglob stuff is needed twice, once when the script is parsed, and once when the
install()function is executed. Bash is weird.How to use
This is only usable with my chewi/dracut branch in flatcar/scripts. You will need the latest SDK due to changes in my earlier PR. You should be able to update dracut in the SDK, plus dracut and bootengine in the board root, before building coreos-kernel.
Testing done
I have done a lot of manual testing and CI testing, as well as a close inspection of the initrd changes, in tandem with my chewi/dracut branch in flatcar/scripts.
/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.