I have recently upgraded from ubuntu 18.04 to 22.04, which also upgraded my zfs versions ... except for this one package, zfs-dracut
. It "has been kept back".
As can be seen in the output of apt policy zfs-dracut
, the problem is not that it's a phased upgrade.
generic@motorbrot:/media/generic$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
alsa-ucm-conf firmware-sof-signed ubuntu-advantage-tools zfs-dracut
# [more irrelevant stuff here]
generic@motorbrot:~$ sudo apt policy zfs-dracut
zfs-dracut:
Installed: 0.8.4-1
Candidate: 2.1.4-0ubuntu0.1
Version table:
2.1.4-0ubuntu0.1 500
500 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
2.1.2-1ubuntu3 500
500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
*** 0.8.4-1 100
100 /var/lib/dpkg/status
My zfs version is currently:
generic@motorbrot:~$ zfs --version
zfs-2.1.4-0ubuntu0.1
zfs-kmod-2.1.4-0ubuntu0.1
While there are many questions on askubuntu asking about why "packages have been kept back", the answers tend to suggest the following:
- it's a phased update. just wait.
That would show up in the apt policy
output though.
- just install it (
apt install --upgrade-only zfs-dracut
, apt install zfs-dracut
, apt full-upgrade
, apt-get --with-new-pkgs upgrade
, ... )
None of these made a difference.
- The package was marked as held back.
It is in my case not, sudo apt-mark showhold zfs-dracut
has no output.
- just purge and reinstall it.
I could do that, but I am worried it might have been held back for a good reason and purging it would break something. Especially since I am running zfs on root.
Why was this package held back?
(and How could I figure that out myself? )
To follow-up on the comments: Here is what happens when I do some of the things I have mentioned to not work. These excerpts are more current, so contain other packages too. Those others are phased
as per apt policy
.
generic@motorbrot:/media/generic$ sudo apt list --upgradeable
[sudo] password for generic:
Listing... Done
alsa-ucm-conf/jammy-updates,jammy-updates 1.2.6.3-1ubuntu1.4 all [upgradable from: 1.2.6.3-1ubuntu1.3]
libnvpair3linux/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
libuutil3linux/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
libzfs4linux/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
libzpool5linux/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
python3-pyzfs/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
ubuntu-advantage-tools/jammy-updates 27.13.5~22.04.1 amd64 [upgradable from: 27.13.3~22.04.1]
zfs-dkms/jammy-updates,jammy-updates 2.1.5-1ubuntu6~22.04.1 all [upgradable from: 2.1.4-0ubuntu0.1]
zfs-dracut/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 0.8.4-1]
zfs-initramfs/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
zfs-test/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
zfs-zed/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
zfsutils-linux/jammy-updates 2.1.5-1ubuntu6~22.04.1 amd64 [upgradable from: 2.1.4-0ubuntu0.1]
generic@motorbrot:/media/generic$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
alsa-ucm-conf libnvpair3linux libuutil3linux libzfs4linux libzpool5linux python3-pyzfs
ubuntu-advantage-tools zfs-dkms zfs-dracut zfs-initramfs zfs-test zfs-zed zfsutils-linux
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
Warning: an answer suggests to run apt install zfs-dracut dracut zfsutils-linux
. That, in my case, uninstalled zfs-initramfs
, issued a warning, then failed installing zfs-dracut
, and because I am more curious than is healthy I rebooted and now was stuck with an initramfs that does not know zfs. I fixed this up from a live stick but this is not a great outcome anyway.
For anyone in the same situation: I essentially followed this guide: Boot from a live-usb stick, import but don't mount your zfs pool, mount a snapshot back from when booting still worked with zfs mount -t zfs tank/your_dataset@something /mnt/rescue
, bind-mount all that is needed (especially boot and efi partitions), chroot into it and run update-initramfs -u -k all
(or at least the latest kernel version that shows up in ls -la /lib/modules
).
These proposed fixes are potentially useful (or harmful), but essentially miss to answer my question: Why was zfs-dracut kept back?
Sidenote for people with this exact same problem: The actual fix was to completely uninstall zfs-dracut
and re-install zfs-initramfs
, then running update-initramfs -u -k all
again.
This is irrelevant to the question though.