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

arch: add script to generate UKIs #252

Merged
merged 12 commits into from
Jan 27, 2024
Merged

Conversation

c3Ls1US
Copy link
Contributor

@c3Ls1US c3Ls1US commented Jan 22, 2024

Currently, booster does not support generating Universal Kernel Images (UKIs) natively and this PR allows creating UKIs via ukify on Arch Linux.

To generate UKIs, we can simply delegate the functionality to external tools such as ukify. The resulting binaries are currently stored in /boot/Linux/EFI and manual intervention would be required from the user to configure the appropriate boot loader configution files to load the binary by default. Otherwise, binaries would probably need to be selected at boot time. For instance, in systemd-boot, loader.conf should be modified.

@anatol
Copy link
Owner

anatol commented Jan 26, 2024

Thank you! I am sure a lot of people find UKI functionality useful.

Could you please add a section to the documentation (https://github.com/anatol/booster/blob/master/docs/manpage.md) about what is UKI and how to use booster with it?

@anatol
Copy link
Owner

anatol commented Jan 26, 2024

Looks great, thank you!

@anatol anatol marked this pull request as ready for review January 26, 2024 21:35
@c3Ls1US c3Ls1US force-pushed the systemd-ukify branch 2 times, most recently from 1f9b889 to 7a4175d Compare January 26, 2024 21:48
@c3Ls1US
Copy link
Contributor Author

c3Ls1US commented Jan 26, 2024

No problem. Also, one thing to consider is that the result is written to /boot/Linux/EFI by default.

Some users have a separate partition (e.g. /efi) where they boot EFI executables, which is a problem. Arch Linux also assumes /efi by default in its own initrd generator. For flexibility, I'm considering of changing it so a boot path is required to pass to the script.

@anatol
Copy link
Owner

anatol commented Jan 26, 2024

Sounds good.

Let me know once you are done developing the PR and I move with merging it.

- Systemd ukify is strict when parsing its values passed to --initrd, and will fail if there's a trailing white space
@c3Ls1US
Copy link
Contributor Author

c3Ls1US commented Jan 27, 2024

@anatol let me know if you prefer squashing my commits.

- Make specifying the path to save the UKI for users a requirement when generating UKIs. This gives more flexibility for users whose systems are not configured to execute EFI binaries at /boot
@anatol
Copy link
Owner

anatol commented Jan 27, 2024

I will squash the commits before merging

- Remove default path
@c3Ls1US
Copy link
Contributor Author

c3Ls1US commented Jan 27, 2024

Finished

This PR closes #110 and potentially #79 if there are no plans for a native UKI implementation

@anatol anatol merged commit 67eaed9 into anatol:master Jan 27, 2024
@Zile995
Copy link
Contributor

Zile995 commented Feb 2, 2024

@c3Ls1US @anatol

Or you can simply use the booster-ukify or booster-um.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants