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

Debian Buster Root on ZFS - Step 1.5 Install ZFS in the Live CD environment - Problem - fail on apt install --yes -t buster-backports zfs-dkms #9599

Closed
jose7007 opened this issue Nov 19, 2019 · 8 comments
Assignees
Labels
Type: Documentation Indicates a requested change to the documentation

Comments

@jose7007
Copy link

jose7007 commented Nov 19, 2019

System information

Type Version/Name
Distribution Name Debian
Distribution Version 10 Buster
Linux Kernel 4.19.0-6-amd64
Architecture x86_64
ZFS Version 0.8.2-2~bpo10+1
SPL Version 0.8.2-2~bpo10+1

Describe the problem you're observing

I have installed Debian 10 Buster in my PC:
uname -a
Linux USER 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux
First, I want to install zfs and zpool utils in my system to work with others HDDs.

Describe how to reproduce the problem

I am doing some steps of:
https://github.com/zfsonlinux/zfs/wiki/Debian-Buster-Root-on-ZFS
and:
https://wiki.debian.org/ZFS

I have update buster and buster-backports repositories.

Note:
I haven't used a LiveCD, I have Debian 10 Buster installed in my PC

1.5 Install ZFS in the Live CD environment:
apt install --yes debootstrap gdisk dkms dpkg-dev linux-headers-$(uname -r)
To this point all is right.

The problem is in this step:
apt install --yes -t buster-backports zfs-dkms

Include any warning/errors/backtraces from the system logs

At the same step I am installing zfs-dkms and zfsutils-linux:

apt install -t buster-backports zfs-dkms zfsutils-linux
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
zfs-dkms ya está en su versión más reciente (0.8.2-2~bpo10+1).
Se instalarán los siguientes paquetes adicionales:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-zed
Paquetes sugeridos:
  zfs-initramfs | zfs-dracut
Se instalarán los siguientes paquetes NUEVOS:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-zed zfsutils-linux
0 actualizados, 6 nuevos se instalarán, 0 para eliminar y 191 no actualizados.
Se necesita descargar 1.559 kB de archivos.
Se utilizarán 5.348 kB de espacio de disco adicional después de esta operación.
¿Desea continuar? [S/n] S
Des:1 http://deb.debian.org/debian buster-backports/contrib amd64 libnvpair1linux amd64 0.8.2-2~bpo10+1 [55,1 kB]
Des:2 http://deb.debian.org/debian buster-backports/contrib amd64 libuutil1linux amd64 0.8.2-2~bpo10+1 [48,1 kB]
Des:3 http://deb.debian.org/debian buster-backports/contrib amd64 libzfs2linux amd64 0.8.2-2~bpo10+1 [215 kB]
Des:4 http://deb.debian.org/debian buster-backports/contrib amd64 libzpool2linux amd64 0.8.2-2~bpo10+1 [811 kB]
Des:5 http://deb.debian.org/debian buster-backports/contrib amd64 zfsutils-linux amd64 0.8.2-2~bpo10+1 [361 kB]
Des:6 http://deb.debian.org/debian buster-backports/contrib amd64 zfs-zed amd64 0.8.2-2~bpo10+1 [68,3 kB]
Descargados 1.559 kB en 2s (784 kB/s)
Seleccionando el paquete libnvpair1linux previamente no seleccionado.
(Leyendo la base de datos ... 301324 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar .../0-libnvpair1linux_0.8.2-2~bpo10+1_amd64.deb ...
Desempaquetando libnvpair1linux (0.8.2-2~bpo10+1) ...
Seleccionando el paquete libuutil1linux previamente no seleccionado.
Preparando para desempaquetar .../1-libuutil1linux_0.8.2-2~bpo10+1_amd64.deb ...
Desempaquetando libuutil1linux (0.8.2-2~bpo10+1) ...
Seleccionando el paquete libzfs2linux previamente no seleccionado.
Preparando para desempaquetar .../2-libzfs2linux_0.8.2-2~bpo10+1_amd64.deb ...
Desempaquetando libzfs2linux (0.8.2-2~bpo10+1) ...
Seleccionando el paquete libzpool2linux previamente no seleccionado.
Preparando para desempaquetar .../3-libzpool2linux_0.8.2-2~bpo10+1_amd64.deb ...
Desempaquetando libzpool2linux (0.8.2-2~bpo10+1) ...
Seleccionando el paquete zfsutils-linux previamente no seleccionado.
Preparando para desempaquetar .../4-zfsutils-linux_0.8.2-2~bpo10+1_amd64.deb ...
Desempaquetando zfsutils-linux (0.8.2-2~bpo10+1) ...
Seleccionando el paquete zfs-zed previamente no seleccionado.
Preparando para desempaquetar .../5-zfs-zed_0.8.2-2~bpo10+1_amd64.deb ...
Desempaquetando zfs-zed (0.8.2-2~bpo10+1) ...
Configurando libuutil1linux (0.8.2-2~bpo10+1) ...
Configurando libnvpair1linux (0.8.2-2~bpo10+1) ...
Configurando libzfs2linux (0.8.2-2~bpo10+1) ...
Configurando libzpool2linux (0.8.2-2~bpo10+1) ...
Configurando zfsutils-linux (0.8.2-2~bpo10+1) ...
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-mount.service failed because the control process exited with error code.
See "systemctl status zfs-mount.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zfs-mount, action "start" failed.
● zfs-mount.service - Mount ZFS filesystems
   Loaded: loaded (/lib/systemd/system/zfs-mount.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-11-19 10:10:14 CET; 33ms ago
     Docs: man:zfs(8)
  Process: 18839 ExecStart=/sbin/zfs mount -a (code=exited, status=1/FAILURE)
 Main PID: 18839 (code=exited, status=1/FAILURE)
 
 nov 19 10:10:14 USER systemd[1]: Starting Mount ZFS filesystems...
nov 19 10:10:14 USER zfs[18839]: The ZFS modules are not loaded.
nov 19 10:10:14 USER zfs[18839]: Try running '/sbin/modprobe zfs' as root to load them.
nov 19 10:10:14 USER systemd[1]: zfs-mount.service: Main process exited, code=exited, status=1/FAILURE
nov 19 10:10:14 USER systemd[1]: zfs-mount.service: Failed with result 'exit-code'.
nov 19 10:10:14 USER systemd[1]: Failed to start Mount ZFS filesystems.
dpkg: error al procesar el paquete zfsutils-linux (--configure):
 el subproceso instalado paquete zfsutils-linux script post-installation devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de zfs-zed:
 zfs-zed depende de zfsutils-linux (>= 0.8.2-2~bpo10+1); sin embargo:
 El paquete `zfsutils-linux' no está configurado todavía.

dpkg: error al procesar el paquete zfs-zed (--configure):
 problemas de dependencias - se deja sin configurar
Procesando disparadores para systemd (241-7~deb10u2) ...
Procesando disparadores para man-db (2.8.5-2) ...
Procesando disparadores para libc-bin (2.28-10) ...
Se encontraron errores al procesar:
 zfsutils-linux
 zfs-zed
E: Sub-process /usr/bin/dpkg returned an error code (1)

The same issue:
zfs-dkms install fail on debian buster #9462
[https://github.com//issues/9462]

Possible solution:
I have replaced the command:
apt install --yes -t buster-backports zfs-dkms
By the command:
apt install --yes -t buster-backports zfs-dkms --no-install-recommends

After that:
modprobe zfs
apt install --yes -t buster-backports zfsutils-linux

zfsutils-linux is installed:

dpkg -l | grep -i zfsutils-linux
ii zfsutils-linux 0.8.2-2~bpo10+1 amd64 command-line tools to manage OpenZFS filesystems

zfs tool is installed:
zfs version
zfs-0.8.2-2~bpo10+1
zfs-kmod-0.8.2-2~bpo10+1

zpool tool is installed:
zpool version
zfs-0.8.2-2~bpo10+1
zfs-kmod-0.8.2-2~bpo10+1

Request:
Can the "Debian Buster Root on ZFS" developer try and/or update the steps?
apt install --yes -t buster-backports zfs-dkms --no-install-recommends
modprobe zfs
apt install --yes -t buster-backports zfsutils-linux

Thank you

@PrivatePuffin
Copy link
Contributor

@jose7007 The maintainers are very busy at times and your Issue is quite long... So think they skimmed over it...

If you want a wiki page changed, it helps to be as specific as possible...
"replace A with B in Z please" works most of the time ;)

Good find and nice amount of research on the issue though, thanks!

@behlendorf I see no problem in replacing:

apt install --yes debootstrap gdisk dkms dpkg-dev linux-headers-$(uname -r)
apt install --yes -t buster-backports zfs-dkms
modprobe zfs

with:

apt install --yes debootstrap gdisk dkms dpkg-dev linux-headers-$(uname -r)
apt install --yes -t buster-backports zfs-dkms --no-install-recommends
modprobe zfs
apt install --yes -t buster-backports zfsutils-linux

In:
https://github.com/zfsonlinux/zfs/wiki/Debian-Buster-Root-on-ZFS

Under:

1.5 Install ZFS in the Live CD environment:

@drewmullen
Copy link

using the debian buster vagrant image:

$ uname -a
Linux drewbuntu 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64 GNU/Linux
$ sudo apt install --yes debootstrap gdisk dkms dpkg-dev linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.19.0-5-amd64
E: Couldn't find any package by glob 'linux-headers-4.19.0-5-amd64'
E: Couldn't find any package by regex 'linux-headers-4.19.0-5-amd64'

same result with the official documentation command

this eventually results in the error:

$ sudo modprobe zfs
modprobe: FATAL: Module zfs not found in directory /lib/modules/4.19.0-5-amd64

@PrivatePuffin
Copy link
Contributor

@drewmullen Please don't add to an issue and make the actual solution go down...
I already posted the solution and all we need is to wait for @behlendorf to change the docs. confirmation wasn;t really needed, but thanks anyway.

@drewmullen
Copy link

drewmullen commented Dec 8, 2019

The solution does not work. what part about that isn't relevant to the discussion?

@PrivatePuffin
Copy link
Contributor

@drewmullen I didn't get that you said the solution meantioned in the issue doesn't work. Sorry.

@drewmullen
Copy link

np @Ornias1993 - i probably could have been more clear in my comment. i appreciate the apology.

I'll try again, error:

$ modprobe zfs
modprobe: FATAL: Module zfs not found in directory /lib/modules/4.19.0-5-amd64

commands run as root on fresh vm:

$ apt update && apt install -y vim

$ cat << EOF >> /etc/apt/sources.list
deb http://deb.debian.org/debian buster-backports main contrib
deb-src http://deb.debian.org/debian buster-backports main contrib
EOF

$ cat << EOF >> /etc/apt/preferences.d/90_zfs
Package: libnvpair1linux libuutil1linux libzfs2linux libzpool2linux spl-dkms zfs-dkms zfs-test zfsutils-linux zfsutils-linux-dev zfs-zed
Pin: release n=buster-backports
Pin-Priority: 990
EOF

$ apt update

$ apt install --yes debootstrap gdisk dkms dpkg-dev linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.19.0-5-amd64
E: Couldn't find any package by glob 'linux-headers-4.19.0-5-amd64'
E: Couldn't find any package by regex 'linux-headers-4.19.0-5-amd64'

$ apt install --yes -t buster-backports zfs-dkms --no-install-recommends
...<redacted>

$ modprobe zfs
modprobe: FATAL: Module zfs not found in directory /lib/modules/4.19.0-5-amd64

I suppose this could be a problem with Vagrant or Virtualbox but that seems less likely.

Can try it easily yourself here:
https://gitlab.com/drewmullen/homelab/blob/master/vagrant/Vagrantfile

@drewmullen
Copy link

drewmullen commented Dec 8, 2019

I got it working!

# zpool status
no pools available

I updated my kernel and the commands are working great. idk much about how debian bundles the kernel per release (i think red hat maintains the same for an entire version lifecycle) but I'm guessing the vagrant box image is just slightly behind on the patch version.

For any future person with this issue - ill publish working commands to the vagrantfile linked above https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946393

Once the kernel was updated, the updated commands worked great. thanks for the fix @jose7007 @Ornias1993

@rlaager rlaager self-assigned this Dec 9, 2019
@behlendorf behlendorf added the Type: Documentation Indicates a requested change to the documentation label Dec 9, 2019
@rlaager
Copy link
Member

rlaager commented Dec 15, 2019

@jose7007 Thanks for the bug report and fix. I've merged this change in ccad9f9b489adb6fba6c9fa61cf3e8dfeb366ce0 in the wiki.

@drewmullen Your issue is a bit different. As you found, the kernel in your image did not have headers available in the archive. There's not much we can do about that sort of thing. The kernel headers are required to build the module.

@Ornias1993 I maintain the Debian and Ubuntu HOWTOs, so please tag me instead of behlendorf.

@rlaager rlaager closed this as completed Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Indicates a requested change to the documentation
Projects
None yet
Development

No branches or pull requests

5 participants