New comment by ahesford on void-packages repository https://github.com/void-linux/void-packages/issues/50859#issuecomment-2173715176 Comment: If you update a kernel and there is no ZFS update, the kernel package should trigger the scripts, in order, 1. `/etc/kernel.d/post-install/10-dkms` to build all DKMS modules for the newly installed kernel, which should include ZFS; and 2. `/etc/kernel.d/post-install/20-initramfs` to build the initramfs for the newly installed kernel. The initramfs build happens after the DKMS build, so the ZFS modules should be available. No previously installed kernels or their initramfs images will be touched in this case. If you update ZFS and there is no kernel update, the DKMS hooks in the ZFS package will trigger, in order: 1. Removal of any old ZFS modules for each installed kernel; 2. A build of the new ZFS modules for each installed kernel; and 3. A regeneration of the initramfs image for every kernel. Note that every installed kernel must have its headers available, or the build will be skipped, and the regeneration in the final step will most likely result in the creation of an initramfs image without ZFS or other DKMS modules. If you update ZFS and any kernel series simultaneously: 1. The pre-remove DKMS trigger in the ZFS package should trigger the removal of existing ZFS modules from all kernel versions. 2. All packages are unpacked. (Your diagnosis that only some packages are extracted is wrong; all packages are extracted before any is configured, but the pre-remove trigger was run before this stage.) 3. Packages are configured in alphabetical order: a. Any updated Linux package will trigger execution of `/etc/kernel.d/post-install` scripts: (i) the DKMS script will rebuild all DKMS modules, but ZFS has not yet been registered, so the rebuild will not include ZFS; and (ii) the initramfs script will indeed build an initramfs without ZFS modules (which may cause a dracut failure). b. The updated ZFS package will trigger a rebuild of ZFS for all installed kernels. c. The updated ZFS package will trigger a regeneration of an initramfs for all installed kernels. Although you will have a broken initramfs image for each updated kernel series in an intermediate stage, the final ZFS configuration should correct the issue for all kernel versions. Of course, all kernel versions must have their headers available, or DKMS will fail. Which of these scenarios is not working correctly for you? Are you sure you have kernel headers available for every version of the kernel affected by your issue?