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

Trigger hook on changes to initramfs #4

Open
kohlerjl opened this issue Aug 10, 2017 · 3 comments
Open

Trigger hook on changes to initramfs #4

kohlerjl opened this issue Aug 10, 2017 · 3 comments

Comments

@kohlerjl
Copy link

Thanks for a well written script to manage secure boot on Arch. It helped me a lot to setup on my own computer.

One potential issue I noticed is that any changes that trigger the mkinitcpio PostTransaction hook to rebuild initramfs-linux.img don't necessarily trigger this script to rebuild and sign the merged initramfs+kernel. To correct that, I have changed the Trigger on my pacman hook to include the same Targets as the hook that builds initramfs-linux.img:

Type = File
Target = boot/vmlinuz-linux
Target = boot/intel-ucode.img
Target = boot/initramfs-linux.img
Target = usr/lib/initcpio/*

@gdamjan
Copy link
Owner

gdamjan commented Aug 11, 2017

Target = boot/initramfs-linux.img won't work since it's not part of any package.

Have you tried Target = usr/lib/initcpio/* ? does it work well for you?

@kohlerjl
Copy link
Author

Ah, yes, it only triggered properly when I added Target = usr/lib/initcpio/*, which has worked well so far, but I haven't tested extensively. I did rename my secure boot hook to 99-secure-boot.hook, to make sure it ran after the mkinitcpio hook, which is named 90-linux.hook

@gdamjan
Copy link
Owner

gdamjan commented Aug 13, 2017

I'll make these changes soon (already editied this repo).

The problem with the hooks as it is now, it only runs when the main kernel is updated. In the future, if Arch would move to kernel-install it would be possible to run secure-boot as a hook to it, and update the image for any kernel installed.

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

2 participants