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

Prefer XBOOTLDR to ESP when installing unified kernel images. #1995

Open
VasilisMylonas opened this issue Sep 28, 2022 · 2 comments · May be fixed by #2596
Open

Prefer XBOOTLDR to ESP when installing unified kernel images. #1995

VasilisMylonas opened this issue Sep 28, 2022 · 2 comments · May be fixed by #2596
Labels
enhancement Issue adding new functionality

Comments

@VasilisMylonas
Copy link

When installing unified kernel images images (uefi=yes) dracut currently searches /efi, /boot/efi and /boot to determine where the ESP is mounted. I suggest that the install location be instead queried by bootctl -x in order to also support a possible XBOOTLDR partition.

@VasilisMylonas VasilisMylonas added the enhancement Issue adding new functionality label Sep 28, 2022
@jpetazzo
Copy link

I just ran into this :)

I'm using Unified Kernel Images. (My end goal is to encrypt my rootfs with LUKS and store the key in the machine's TPM. For that, I need to use SecureBoot to protect the boot chain, and I understand that UKI is a good way to achieve that.)

The machine is a dual boot machine, and Windows has created a 100 MB ESP partition. I have therefore created a separate XBOOTLDR partition. They are respectively mounted on /efi and /boot.

It looks like dracut systematically installs UEFI images to the ESP partition (if it detects that /efi is a mountpoint, it will install to /efi instead of /boot):

https://github.com/dracutdevs/dracut/blob/master/dracut.sh#L1125

That's problematic if the ESP partition is too small, because Unified Kernel Images tend to be pretty big, especially when adding e.g. a recovery image too.

I've tried to move the image (from /efi/EFI/Linux to /boot/EFI/Linux) and it seems to boot fine; but perhaps that's specific to the bootloader that I'm using (systemd-boot). I don't know if that would still work with other bootloaders; perhaps that's why dracut puts the UEFI images in the ESP partition.

This is my first time using dracut; so perhaps I'm doing something wrong - I'm happy to hear what others think before trying to suggest a PR. :)

@aafeijoo-suse
Copy link
Member

@jpetazzo Thanks for your detailed use case, it makes sense to try to fix this.

aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Jan 25, 2024
Use the new functions `get_dollar_boot`, `get_machine_id` and
`get_default_initramfs_image` to get the `outfile` path.

Fixes dracutdevs#1995
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Jan 25, 2024
Use the new functions `get_dollar_boot`, `get_machine_id` and
`get_default_initramfs_image` to get the `outfile` path.

Fixes dracutdevs#1995
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Jan 25, 2024
Use the new functions `get_dollar_boot`, `get_machine_id` and
`get_default_initramfs_image` to get the `outfile` path.

Fixes dracutdevs#1995
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Jan 25, 2024
Use the new functions `get_dollar_boot`, `get_machine_id` and
`get_default_initramfs_image` to get the `outfile` path.

Fixes dracutdevs#1995
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue adding new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants