-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Debian/Root on ZFS: modules missing from initrd after kernel update #10355
Comments
This analysis sounds reasonable. Any chance you could test this? I'm happy to merge this change, but it'd be nice to confirm it works as intended. |
It seems this has been discussed before, so I'll treat that as (mostly) confirmation: #849 I have this committed. It'll get pushed with the other updates I'm making. |
Thanks for spotting the duplicate – I should have inspected the closed issues more thoroughly :-/ I was trying to provide a proof by reinstalling the current kernel, but this did not work as expected: 1. initial statusZFS modules are present in both the system and the current initrd.
2. disable workaround
3. remove ZFS modules and initrd from system (look out!)
4. reinstall the current kernel package to simulate a kernel update
5. now modules are present on the system but not in the initrd
Whoops, here they are, they are NOT missing:
Simply reinstalling the kernel image seems not to be enough to trigger the bug :-( My next planned steps were:
|
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 <mitch@cgarbs.de> Signed-off-by: Richard Laager <rlaager@wiktel.com>
System information
Describe the problem you're observing
I have set up a machine using the Debian Buster Root on ZFS instructions (ping to @rlaager).
It has already happened twice that when there was an update of the Debian kernel package, the system did not boot the with new kernel because the ZFS modules could not be loaded from the initrd.
Describe how to reproduce the problem
(i did not test this on a second system and I don't know when the next kernel update in Debian Buster is due)
Include any warning/errors/backtraces from the system logs
no screenshot of the boot messages, sorry
Preliminary analysis
I use
unattended-upgrades
to automatically install security updates and even reboot automatically when the kernel has been updated. It already happened twice that the system did not boot after such an update because the ZFS modules were not present in the initrd.In both cases, I could boot the previous kernel via grub, manually rebuild the initrd for the new kernel and then the next boot succeeded. No data was lost, I only had some unexpected downtime on the server.
I think that this has happened in both cases:
zfs-dkms
modules are rebuilt against the new kernelBecause the ZFS kernel modules are built after the initrd has already been built, the new ZFS modules for the new kernel are missing from the initrd.
The ZFS DKMS sources explicitely don't request a rebuild of the initrd after the ZFS modules have been rebuilt:
Proposed fix
Having the ZFS modules in the initrd is propably not important for everybody so
REMAKE_INITRD="no"
is a useful default. But when using ZFS on Root, this setting leads to the problem I have described.According to the DKMS documentation,
REMAKE_INITRD
can be overwritten within a file/etc/dkms/zfs.conf
containing this:I have not yet tested this, but according to the documentation this should to the trick if my analysis was correct.
Could a note regarding this workaround/fix be included in the Debian Buster Root on ZFS documentation?
The text was updated successfully, but these errors were encountered: