systemd / mkosi

💽 Build Bespoke OS Images
https://mkosi.systemd.io/
1.18k stars 319 forks source link

Building bootable Ubuntu image fails with `A EFI bootable image with systemd-boot was requested but systemd-boot was not found at usr/lib/systemd/boot/efi` #2437

Closed paulmenzel closed 8 months ago

paulmenzel commented 8 months ago
$ sudo mkosi -d ubuntu -r jammy -m http://ftp.gwdg.de/ubuntu/ --output=ubuntu-jammy --bootable yes
[…]
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
‣ A EFI bootable image with systemd-boot was requested but systemd-boot was not found at usr/lib/systemd/boot/efi
$ ls -l /usr/lib/systemd/boot/efi
total 172
-rw-r--r-- 1 root root  2048 Jan 29 11:46 addonx64.efi.stub
-rw-r--r-- 1 root root 70656 Jan 29 11:46 linuxx64.efi.stub
-rw-r--r-- 1 root root 97792 Jan 29 11:46 systemd-bootx64.efi
$ dpkg -l systemd-boot systemd-boot-efi
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version      Architecture Description
+++-======================-============-============-=============================================
ii  systemd-boot           255.3-2      amd64        simple UEFI boot manager - tools and services
ii  systemd-boot-efi:amd64 255.3-2      amd64        simple UEFI boot manager - EFI binaries
$ dpkg -L systemd-boot
/.
/etc
/etc/initramfs
/etc/initramfs/post-update.d
/etc/initramfs/post-update.d/systemd-boot
/etc/kernel
/etc/kernel/postinst.d
/etc/kernel/postinst.d/zz-systemd-boot
/etc/kernel/postrm.d
/etc/kernel/postrm.d/zz-systemd-boot
/usr
/usr/bin
/usr/bin/bootctl
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/sysinit.target.wants
/usr/lib/systemd/system/systemd-bless-boot.service
/usr/lib/systemd/system/systemd-boot-random-seed.service
/usr/lib/systemd/system/systemd-boot-update.service
/usr/lib/systemd/system-generators
/usr/lib/systemd/system-generators/systemd-bless-boot-generator
/usr/lib/systemd/systemd-bless-boot
/usr/share
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/bootctl
/usr/share/doc
/usr/share/doc/systemd-boot
/usr/share/doc/systemd-boot/NEWS.Debian.gz
/usr/share/doc/systemd-boot/changelog.Debian.gz
/usr/share/doc/systemd-boot/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/systemd-boot
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/bootctl.1.gz
/usr/share/man/man5
/usr/share/man/man5/loader.conf.5.gz
/usr/share/man/man7
/usr/share/man/man7/systemd-boot.7.gz
/usr/share/man/man8
/usr/share/man/man8/systemd-bless-boot-generator.8.gz
/usr/share/man/man8/systemd-bless-boot.service.8.gz
/usr/share/man/man8/systemd-boot-random-seed.service.8.gz
/usr/lib/systemd/system/sysinit.target.wants/systemd-boot-random-seed.service
/usr/share/man/man7/sd-boot.7.gz
/usr/share/man/man8/systemd-bless-boot.8.gz
DaanDeMeyer commented 8 months ago

You're not installing any packages. We don't install any packages by default. It's your responsibility to specify the packages you want installed in the image.

DaanDeMeyer commented 8 months ago

Specifically, systemd-boot needs to be installed inside the image, not on your host system. Since this is not a bug in mkosi, closing the issue.

paulmenzel commented 7 months ago

Just for the record, systemd-boot is not available in Ubuntu 22.04.