Foxboron / sbctl

:computer: :lock: :key: Secure Boot key manager
MIT License
1.46k stars 84 forks source link

Please add `binutils` package as dependency for arch linux packaging #64

Closed mrblumi closed 3 years ago

mrblumi commented 3 years ago

First of all many thanks for your effort on this project. It is pretty cool :D

I tried it out yesterday on a freshly installed arch linux system and I think I discovered a missing dependency of sbctl. Because of using objcopy in bundles.go we will have funny behaviour while generating combined EFISTUB file with binutils missing on arch systems.

root@test ~# sbctl list-bundles
==> Bundle: /boot/efi/EFI/Linux/arch-linux.efi
  -> Intel Microcode: /boot/intel-ucode.img
  -> Kernel Image: /boot/vmlinuz-linux
  -> Initramfs Image: /boot/initramfs-linux.img
  -> Cmdline: /boot/cmdline-linux
  -> OS Release: /usr/lib/os-release
  -> EFI Stub Image: /usr/lib/systemd/boot/efi/linuxx64.efi.stub
  -> ESP Location: /boot/efi
  -> Splash Image: /usr/share/systemd/bootctl/splash-arch.bmp
  -> Output: /boot/efi/EFI/Linux/arch-linux.efi
root@test ~# sbctl generate-bundles
==> Generating EFI bundles....
==> Wrote EFI bundle /boot/efi/EFI/Linux/arch-linux.efi

But /boot/efi/EFI/Linux/remains empty. As this fails silently without any errors it will take some time to track down the missing package...

Foxboron commented 3 years ago

This is probably two issues i reckon. Missing dependency in the Arch package, and the bundle code not really working in sbctl.

Foxboron commented 3 years ago
λ sbctl master» sudo ./sbctl generate-bundles
==> Generating EFI bundles....
  -> ERROR: exec: "objcopy": executable file not found in $PATH
  -> ERROR: failed to generate bundle /efi/EFI/Linux/linux-linux.efi!
==> ERROR: Error generating EFI bundles