Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: XBPS ordering problem with ZFS and multiple kernel versions (root on zfs)
Date: Mon, 17 Jun 2024 17:27:48 +0200	[thread overview]
Message-ID: <20240617152748.D1998213C0@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50859@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 2608 bytes --]

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?
 

  parent reply	other threads:[~2024-06-17 15:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 10:00 [ISSUE] XBPS ordering problem with ZFS " aNTDwcDqvXR4h2PH
2024-06-17 13:47 ` XBPS ordering problem with ZFS and multiple kernel versions " classabbyamp
2024-06-17 15:27 ` ahesford [this message]
2024-06-17 18:07 ` aNTDwcDqvXR4h2PH
2024-06-17 18:12 ` aNTDwcDqvXR4h2PH
2024-06-30 14:27 ` aNTDwcDqvXR4h2PH
2024-06-30 14:28 ` [ISSUE] [CLOSED] " aNTDwcDqvXR4h2PH
2024-07-01  9:05 ` aNTDwcDqvXR4h2PH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240617152748.D1998213C0@inbox.vuxu.org \
    --to=ahesford@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).