andreyv / sbupdate

Generate and sign kernel images for UEFI Secure Boot on Arch Linux
GNU General Public License v3.0
225 stars 20 forks source link

Manjaro compatibility #23

Closed openmindead closed 4 years ago

openmindead commented 4 years ago

Hello and thank you for your tool.

0ad2b485439c61aa9519b862ff6b6d2738b9207d changes have broken compatibility with Manjaro. Precisely, Manjaro uses kernelbase for naming its kernels inside /boot instead of pkgbase, but falls back to the latter in order to be compatible with kernels from Arch repos. So now sbupdate fails to find a kernel ($1) in /boot because it looks for another name. The difference is as follows: kernelbase is like 5.4-x86_64, and files located in /boot are named like vmlinuz-5.4-x86_64, initramfs-5.4-x86_64 and so on. pkgbase is like linux54, that's what new version of sbupdate looks for and fails to find.

Images generated by the previous version were named like 5.4-x86_64-signed.efi.

Here are some files that could be of help. I hope you'll find a way to resolve this. Thank you in advance!

(etc)(mkinitcpio.d)(linux54.preset).txt (usr)(share)(libalpm)(scripts)(mkinitcpio-install).txt (usr)(lib)(modules)(5.4.0-1-MANJARO).zip

andreyv commented 4 years ago

Fixed in 3f34d0cf022de7fc60a0acbff29de1faf12f731e. Although it was also possible to use

CONFIGS["linux54"]="5.4-x86_64"
openmindead commented 4 years ago

Thanks, manual invocation of sbupdate works fine but there's something wrong when it's being called by hooks:

call to execv failed (No such file or directory) error: command failed to execute correctly

andreyv commented 4 years ago

Does /usr/bin/sbupdate exist and is executable? Do the hooks reference the same file?

Does /bin/bash exist?

openmindead commented 4 years ago

Oops sorry I've totally forgotten to adjust hooks' path to sbupdate according to its location in my system after copying them from your repo. Mine was placed in /usr/local/bin. Thanks for the hint!

andreyv commented 4 years ago

Thanks, good to hear that.