-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add an alternative UKI mode using systemd-stub #367
Comments
Support for multi-profile UKIs has been recently merged into systemd: This should allow us to solve the issue, maybe even get rid of lanzastub completely? |
The main reason why the thin stub exists is to avoid gobbling up lots of space per generation on the ESP. This could (maybe) be achieved by generating one huge multi-profile UKI for all generations. The generations can then share kernels and initrds. The only downside that I see is that the tool that puts this together needs to be very robust, because if there is an issue then you end up with an unbootable system. The nice thing would be that it would simplify garbage collecting stuff from the ESP, because we manage only a single file. The number of generations you can combine into one UKI will be limited on practice to how large a PE file your firmware is willing to load though... |
I thought more about having 1 multi-profile UKI per kernel.
This would allow us to still avoid having a single huge UKIs which needs to be rewritten with every new generation. Downside, would be that this makes the whole generation of UKIs even more complex.. |
I think the design that needs to be implemented is the following one: We collect all generations, we group by kernel, emit a UKI per kernel with no kernel command line. We can emit all initrds separately, we emit all command lines separately as systemd addons. We render a Pre-requisite:
I don't think multi-profile UKIs work for us yet, but happy to be proven wrong. Though, because this does not buy us a lot except using systemd-stub and we would still need to write code to support all the rest of the unified sections, I'm not convinced it's worth for the maintainer team to invest a lot of time to support this in lanzaboote. systemd-stub UKI based model is possible via image based mechanisms in NixOS right now. Happy to see someone send PRs to implement this design, though (or propose a better one). |
Currently, Lanzaboote's stub has some features missing compared to systemd-stub, users may want to use some of the missed features with some trade-offs they accept - a large ESP and
configurationLimit
.So what about adding an alternative UKI mode using
ukify
andsystemd-stub
to provide more choices? Just a suggestion.POC: https://github.com/linyinfeng/lanzaboote/tree/uki.
The text was updated successfully, but these errors were encountered: