ZFS + Manjaro = Kernel panic

so I tried to get manjaro working on zfs (once again), by letting calamares install the system on an ext4 partition on my harddrive. I then booted into the installed system, installed zfs packages and rebuild initramfs with zfs modules. And after that I created the zfs pool and datasets using another manjaro installation and copied the system from the ext4 partiton into the datasets.
Bootfs is set, cachefile is set, initramfs, linux515.kver, intel-ucode and vmlinuz are copied onto my efi partition and a bootentry for systemd-boot was made.
But now when I try to boot into the system I get

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.15.41-1-MANJARO #1 990090cf7d29f1c59853dd9ffd4aab655306c4a0
Hardware name: MSI MS-7A62/Z270 GAMING M3 (MS-7A62), BIOS 1.40 11/17/2017
Call Trace:
  ? rest_init+0xd0/0xs0
Kernel Offset: 0x7e00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

Oh and this may be relevant: I am using zfs with its built in encryption and conpression.

Thanks in advance!

Again, why?

I’m not trying to sound rude, but what is the practical reasoning for installing Manjaro to a ZFS root?

It’s overly complex to do in the first place, and there’s greater risk in maintaining and updating your system.

ZFS on your NAS makes sense.

On a dedicate data storage pool (on a Manjaro system) makes sense.

Heck, one could argue that it’s not too far-fetched (but still with some inherent maintenance risks) to use for your /home.

But why the root system?

If you’re dead-set to use Manjaro on a ZFS root, then I wish you the best of luck. I just want to chime in that I personally am a huge fan of ZFS (I use it a lot!), yet I will not install Manjaro to a ZFS root.

Reconsider using BTRFS (if you want snapshot rollbacks with Timeshift), or the tried-and-true EXT4 or XFS.


I kinda see it like a challenge to get it working, which will help me extend my skillset. I would also like to see ZFS’ performance myself.
But there is no real practical reason in it besides me wanting to learn more about it and seeing it run on a pc.

And sorry for the second post. I thought that, since it is a new error, I should make a new post, but that may have been wrong.

You can play with ZFS and get hands-on experience and knowledge with external USB drives, loop block devices, a NAS appliance, or with another computer (repurposed as a server) with dedicated drives used for your zpool.

If you have the physical room in your computer, you can even add two dedicated HDDs or SSDs on your Manjaro system, and use them as a mirror vdev for your zpool. You can use it as a redundant and more-reliable data storage for many things: videos, documents, projects, photos, etc. (Or a just as a sandbox to play with.)

Just make sure to stick with kernel 5.15 in the meantime, and jump to the next LTS kernel if you come across assurances that it works well with ZFS. (For example, there was a performance regression in kernel 5.16 when using ZFS + native encryption.)

Also make sure not to use any HDDs that use SMR write technology. :warning:

ZFS will underperform versus EXT4 or XFS, especially as a root partition. Where ZFS shines is its reliability, data integrity (only with redundant vdevs), sophisticated features, inline compression, and inline encryption, among other things. Raw write speeds? It’s not “slow”, but simpler filesystems are faster. Raw read speeds? It only outperforms the others when the ARC is being used.

As it stands now, due to legal and practical reasons, if you really want to install an OS directly to ZFS, then look into FreeBSD (or its derivatives.)

I’ve had ZFS on root for years, works great.

You’ve already done the needed with cachefile and bootfs settings.

So, not sure if I’ll be much help, but check the following -

  • in mkinitcpio.conf, MODULES should include all ZFS related modules - zfs, zzstd, etc.
  • HOOKS should have zfs before filesystems and after the default modules
  • the kernel options need to be stored in a file and should include the following -
root=ZFS=zroot/ROOT/manjaro zfs=zroot/ROOT/manjaro

After above changes, though I’ve successfully booted with the kernel and initramfs image, I prefer to generate an EFI (using mkinitcpio -U) and then boot using this single file stored on the EFS.

I’ve also successfully used “ZFS Boot Menu”, booting via their EFI and simply following the directions they provided.

Good luck.

Also, I get the same error with btrfs.
Thought that may be interesting

if you said the same error, probably hardware problem?
You need bit more research, why is the error.