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

Debiain Bookworm Root on ZFS Guide: unnecessary REMAKE_INITRD #534

Open
mattico opened this issue Dec 30, 2024 · 3 comments
Open

Debiain Bookworm Root on ZFS Guide: unnecessary REMAKE_INITRD #534

mattico opened this issue Dec 30, 2024 · 3 comments
Assignees

Comments

@mattico
Copy link

mattico commented Dec 30, 2024

@rlaager, I have the following issue with the Debian Bookworm Root on ZFS HOWTO:

The guide still recommends using REMAKE_INITRD like so: echo REMAKE_INITRD=yes > /etc/dkms/zfs.conf. I noticed when upgrading kernels a deprecation warning about REMAKE_INITRD and did some investigation. It appears that REMAKE_INITRD doesn't do anything, and hasn't for a while?

openzfs/zfs#12867
openzfs/zfs#12781
dell/dkms#164

I may be misunderstanding something but I think this instruction is no longer necessary and can be removed. Thank you for the guide!

@mattico
Copy link
Author

mattico commented Dec 30, 2024

I also saw this warning when running Debian 11 but I was using kernel and ZFS backports and those PRs are recent enough it may still be necessary in the bullseye guide. Not sure.

@rlaager
Copy link
Member

rlaager commented Dec 31, 2024

So I looked at the git history. This was introduced in commit 417c2a5 with the message:

Debian: Set REMAKE_INITRD=yes

The initrd needs to be rebuilt after the ZFS modules are built.
Otherwise, the system can (will?) fail to boot.

Closes: openzfs/zfs#10355
Reported-by: Christian Garbs <[email protected]>
Signed-off-by: Richard Laager <[email protected]>

So that references openzfs/zfs#10355. That is also referenced by openzfs/zfs#15706 which is the same issue being discussed here. As noted there, I closed that one in favor of this one.

So it seems we should just remove the REMAKE_INITRD on current Debian?

@mmitch, do you have any experience with this on current Debian?

@Zocker1999NET, have you had a chance to do any more testing?

@mattico
Copy link
Author

mattico commented Dec 31, 2024

I did a bit more digging into this, wanting to be sure that removing /etc/dkms/zfs.conf won't cause issues for my systems. I'm no initramfs/dkms expert but here's what I found.

In older versions of dkms the install_module and do_install functions will remake initrd if REMAKE_INITRD=yes. In dkms versions v2.8.8 and later (ca. Oct 2021) initrd handling was removed entirely, with the only remaining thing being the deprecation warning. Reading between the lines, dkms removed initrd generation support as it wasn't used downstream because distros have their own systems for regenerating initrd.

In Debian, deb triggers are used to run update-initramfs when necessary in response to a package install. The OpenZFS upstream includes a triggers file for openzfs-zfs-dkms which calls update-initramfs. That file was imported from downstream Debian, where it was added in response to a bug report where update-initramfs was not called after a zfs package upgrade. They also had an MR into experimental which removes that triggers file saying:

The first removes the unnecessary zfs-initramfs.triggers file containing an update-initramfs trigger. dh_compat 12 is smart enough to figure out that trigger automatically. This resolves a lintian error.

So presumably there's some system in Debian which would automatically run update-initramfs when necessary even without that .triggers file. That change hasn't made it into master though.

I checked the behavior on my machine with /etc/dkms/zfs.conf removed:

  • reinstalling zfs-initramfs causes update-initramfs to run
  • reinstalling zfs-dkms causes update-initramfs to run, whether or not zfs-initramfs is installed

Summary

REMAKE_INITRD doesn't do anything as of dkms v2.8.8. Deb/dpkg triggers ensure that update-initramfs is run after zfs-dkms or zfs-initramfs are installed, so it is not necessary anyway.

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