You are not logged in.

#1 2021-09-24 04:21:29

archee565
Member
Registered: 2021-09-20
Posts: 2

Where is /etc/initramfs/post-update.d on an Arch with mkinitcpio?

I need to invoke  a hook script automatically every time after pacman updates the kernel and/or initramfs.
(mkinitcpio install hooks are called while it's still in progress and the output file isn't there yet.)

Offline

#2 2021-09-24 05:01:12

cloverskull
Member
Registered: 2018-09-30
Posts: 277

Re: Where is /etc/initramfs/post-update.d on an Arch with mkinitcpio?

I may be misunderstanding but what I do is have a hook to detect certain package updates and then sign my kernel and boot media. I have the signing process all set up through sbctl (https://github.com/Foxboron/sbctl) but what I think you're interested in here is the hook itself.

❯ cat /etc/pacman.d/hooks/99-secureboot.hook 
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = linux
Target = fwupd
Target = systemd
Target = linux514-tkg-cacule
Target = edk2-shell

[Action]
Description = Signing Kernel for SecureBoot
When = PostTransaction
Exec = /usr/bin/sbctl sign-all
Depends = sbctl

Offline

#3 2021-09-24 10:24:31

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,085

Re: Where is /etc/initramfs/post-update.d on an Arch with mkinitcpio?

Where is /etc/initramfs/post-update.d on an Arch with mkinitcpio?

Guess you're used to debian/ubuntu ?

Not sue if they use dracut or something else, but mkinitcpio works differently.

The hook posted by cloverskull looks like a good example, if you need more details man alpm-hooks .

Last edited by Lone_Wolf (2021-09-24 10:24:48)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB