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

Cannot use systemd-boot with a squashfs-based root filesystem #2306

Open
IsaacJT opened this issue Jun 1, 2023 · 2 comments
Open

Cannot use systemd-boot with a squashfs-based root filesystem #2306

IsaacJT opened this issue Jun 1, 2023 · 2 comments

Comments

@IsaacJT
Copy link
Collaborator

IsaacJT commented Jun 1, 2023

Problem description

Combining using systemd-boot as the EFI bootloader and a read-only squashfs filesystem as root does not work, as bootctl fails to write the /etc/kernel/entry-token file in the root filesystem during installation (as it's already been squashfs-ified and is thus read-only).

[ DEBUG   ]: 14:11:15 | EXEC: [chroot /var/tmp/kiwi_mount_manager.t1x8uuuf bootctl install --esp-path=/boot/efi --no-variables --entry-token os-id]
[ DEBUG   ]: 14:11:16 | EXEC: Failed with stderr: Created "/boot/efi/EFI/systemd".
Created "/boot/efi/loader".
Created "/boot/efi/loader/entries".
Created "/boot/efi/EFI/Linux".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/efi/EFI/systemd/systemd-bootx64.efi".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/efi/EFI/BOOT/BOOTX64.EFI".
Failed to write entry token 'ubuntu' to /etc/kernel/entry-token
, stdout: (no output on stdout)

Expected behaviour

Kiwi can systemd-boot to be used as the bootloader in EFI mode.

Steps to reproduce the behaviour

Use the following appliance configuration snippet:

<type image="oem" overlayroot="true" overlayroot_write_partition="false" firmware="efi" ...>
            <bootloader name="systemd_boot" />
... 
</type>

OS and Software information

  • KIWI version: 9.24.61
  • Operating system host version: Ubuntu 23.04
  • Operating system target version: Ubuntu 23.04
  • Open Build Service version (N/A if not using OBS): N/A
  • Koji version (N/A if not using Koji): N/A
@IsaacJT
Copy link
Collaborator Author

IsaacJT commented Jun 1, 2023

bootctl install tries to write to the file here: https://github.com/systemd/systemd/blob/main/src/boot/bootctl-install.c#L507

@IsaacJT
Copy link
Collaborator Author

IsaacJT commented Jun 1, 2023

Looking at the code, this will also fail in the next stage due to trying to write to /etc/kernel/cmdline: https://github.com/OSInside/kiwi/blob/master/kiwi/bootloader/config/systemd_boot.py#L143

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

No branches or pull requests

1 participant