Installing ZFS on Debian 13

Hello all,
I have been busy getting familiar with using Debian 13, and checking that installing things like Proxmox/Docker is still the same etc. However, I have had some difficulty with installing ZFS like I normally would in the past. Previously, I would just enable the backports repo, and then run the command:

sudo apt update \
  && sudo apt install linux-headers-amd64 zfsutils-linux zfs-dkms zfs-zed -y

However, it appears that zfsutils-linux cannot be found/installed after enabling backports. In the end I just installed the zfs-fuse package, and that seems to work just fine. However I have come to understand this is quite different from manually installing the kernel module.

If anyone has some advice/tips on this and whether there is another way to install ZFS, or if one is just supposed to use the zfs-fuse package now and outline any possible downsides, it would be appreciated.

You have to add contrib in the .sources file.

2 Likes

Yep, I had forgotten to add contrib to the trixie, and trixie-updates lines. I believe I am not supposed to add it to the security lines, so my /etc/apt/sources.list file looks like this now:

deb http://deb.debian.org/debian/ trixie main contrib non-free-firmware
deb-src http://deb.debian.org/debian/ trixie main contrib non-free-firmware

deb http://security.debian.org/debian-security trixie-security main non-free-firmware
deb-src http://security.debian.org/debian-security trixie-security main non-free-firmware

# trixie-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free-firmware
deb-src http://deb.debian.org/debian/ trixie-updates main contrib non-free-firmware

# Enable backports
deb http://deb.debian.org/debian trixie-backports main contrib non-free non-free-firmware

Please let me know if I added contrib where I shouldnt, or should add it to the security lines as well

I am just installing 13 too, and the contrib also threw me too!

I should probably try one of those non-mate desktops that the kids keep talking about while I am at it…

I loved the KDE desktop on Debian 12, and I swear I’ve heard loads of others say KDE on debian works extremely well. I will be upgrading my laptop to Debian 13 KDE soon.

You should add it to security as well. Otherwise you will not get security updates for any contrib pkgs.

1 Like

okay thanks. Will do.

I’m having this same issue, I have added contrib and trixie-backports to my sources file and am still getting an error.

The value ā€˜stable-backports’ is invalid for APT: :Default-Release is not available in the sources
Was a solution ever found?

stable-backports != trixie-backports

The OpenZFS docs have a section on Debian, so that should be the reference: Debian — OpenZFS documentation

For Trixie (yet to be merged):

/etc/apt/sources.list.d/debian.sources

Types: deb deb-src
URIs: https://deb.debian.org/debian
Suites: trixie trixie-updates
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Types: deb deb-src
URIs: https://security.debian.org/debian-security
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

If you want/need backports add:

Types: deb deb-src
URIs: http://deb.debian.org/debian
Suites: trixie-backports
Components: main contrib non-free non-free-firmware
Enabled: yes
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

I did try using stable backports and got an error as well. I can’t remember what it was exactly.

I’ll look into this more thoroughly. I was following the Debian guide and hit a wall of inexperience.

The error message you posted references stable-backports, which doesn’t exist, is the point I was trying to get across. If that’s the error you’re currently running into, you must have it specified incorrectly somewhere, because it should be trixie-backports.

That said, ZFS is relatively up to date in Trixie’s contrib repo: you don’t really need to add the backports repository unless you know you need it. (at time of writing, v2.3.2 in vs v2.3.4)

+1

I had to do this as well.

I had Bookworm, with ext4 root, and zfs data, and it updated okay

but updating from like 6.12.38+deb13 to 6.12.41+deb13 seemed to work okay, but then to 6.12.48+deb13 later, stopped it loading the zfs module, meaning data arrays would not load.

I am not sure what changed when, or why it started to work through the first few minor versions, but when it broke, adding the backports sources to the file, and then uninstalling, then re-installing the dkms-zfs and the zfsutils-linux rebuilt the programs, and let the system ā€œtaintā€ the kernel, and load the modules, so the afs / zpool / spl / whaever apps, were able to load the datasets.

Not exactly sure how I broke it, or why it seemed to work for a while, then stop… :man_shrugging:

But, the two bits @mietzen listed, from the page that @lae linked, worked for me.