Open prometheanfire opened 2 years ago
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.
this is still a bug :(
@nabijaczleweli hey, can you help us Gentoo people out with this. We still have a patch for this for the sys-fs/zfs-9999 live ebuild (against master.)
Don't include the zfs module if you don't have zfs. If this means fixing your package manager or its hook order to run dkms before dracut then do that. This will also fix the double-generation the OP notes but doesn't see as an issue.
The diff in the OP (and referenced commits) being "actually zfs.ko is optional for zfs" is obviously wrong, and it gets very quickly into "haha dracut ran correctly but you're fucked actually" territory when you next boot.
Because, again, you need zfs.ko in the initrd to boot with root=zfs. If this is as easy as skipping the dracut hook if there's a dkms hook pending, then that sounds relatively easy, at least ideologically; the mechanics of gentoo package management are entirely foreign to me.
Thank you for the explanation, I think you are completely right. I will try to get this fixed in the Gentoo stuff.
I'm not totally certain this is a bug for upstream or not, but it could be...
The process used for installing a kernel in gentoo can include running dracut to install the kernel (specifically to handle signing for secure boot) itself. This would be before zfs modules are rebuilt for the new kernel.
Without the following patch dracut fails, the kernel isn't signed, etc.
Later on, after the zfs module is built, dracut is run AGAIN to generate the initramfs and the like (at which time we could call it with
-c
, not before).