You are not logged in.

#1 2022-12-02 20:51:20

chrislg
Member
From: Greece
Registered: 2022-11-06
Posts: 8
Website

ZFS on root in Virtualbox

I receive the following error when I give: mkinitcpio -p linux

"ERROR: Hook 'zfs' cannot be found"

I followed the instructions of the Arch wiki and I used the latest Arch iso.

Offline

#2 2022-12-02 21:18:33

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: ZFS on root in Virtualbox

What is the output of `pacman -Qo /usr/lib/initcpio/install/` and what package did you install to provide the zfs hook?

Online

#3 2022-12-02 21:28:59

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,842
Website

Re: ZFS on root in Virtualbox

Mod note: Moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2022-12-02 22:44:21

chrislg
Member
From: Greece
Registered: 2022-11-06
Posts: 8
Website

Re: ZFS on root in Virtualbox

I had only installed zfs module in the archiso environment using: https://github.com/eoli3n/archiso-zfs
I did the same in the chroot environment and it worked fine.
The only thing that I noticed is the following:

zfs list
NAME                 USED  AVAIL     REFER  MOUNTPOINT
zroot               1.97G  31.0G       96K  none
zroot/ROOT          1.97G  31.0G       96K  none
zroot/ROOT/default  1.97G  31.0G     1.97G  /
zroot/data           252K  31.0G       96K  none
zroot/data/home      156K  31.0G      156K  /home


Is it normal to have no mountpoint?

Offline

#5 2022-12-02 22:57:05

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: ZFS on root in Virtualbox

In the chroot what is the output of

pacman -Qo /usr/lib/initcpio/install/
pacman -Qs zfs

Online

#6 2022-12-02 23:02:19

chrislg
Member
From: Greece
Registered: 2022-11-06
Posts: 8
Website

Re: ZFS on root in Virtualbox

pacman -Qo /usr/lib/initcpio/install/
/usr/lib/initcpio/install/ is owned by cryptsetup 2.6.0-1
/usr/lib/initcpio/install/ is owned by mkinitcpio 33-1
/usr/lib/initcpio/install/ is owned by systemd 252.2-2
/usr/lib/initcpio/install/ is owned by zfs-utils 2.1.6-2



pacman -Qs zfs
local/zfs-linux 2.1.6_6.0.10.arch2.1-1 (archzfs-linux)
    Kernel modules for the Zettabyte File System.
local/zfs-utils 2.1.6-2 (archzfs-linux)
    Kernel module support files for the Zettabyte File System

Last edited by chrislg (2022-12-02 23:02:53)

Offline

#7 2022-12-02 23:09:41

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: ZFS on root in Virtualbox

Double check in the chroot the output of `pacman -Ql zfs-utils` contains /usr/lib/initcpio/hooks/zfs and /usr/lib/initcpio/install/zfs.
Also are you running mkinitcpio inside or outside the chroot?
Edit:
Also inside the chroot the output of `mkinitcpio -L`

Last edited by loqs (2022-12-02 23:13:31)

Online

#8 2022-12-03 08:01:40

chrislg
Member
From: Greece
Registered: 2022-11-06
Posts: 8
Website

Re: ZFS on root in Virtualbox

The problem is solved.

I hadn't installed zfs inside the chroot.

pacman -Ql zfs-utils contains the files you mentioned and mkinitcpio -L now contains zfs.

mkinitcpio -L                       
==> Available hooks
autodetect      hostdata        sd-encrypt      udev
base            keyboard        sd-shutdown     usr
block           keymap          sd-vconsole     zfs
consolefont     kms             shutdown        zfsencryptssh
encrypt         memdisk         sleep
filesystems     modconf         strip
fsck            resume          systemd

Offline

Board footer

Powered by FluxBB