I've been trying to install ubuntu with a zfs as root filesystem. But it seems that GRUB 2.xx which has ZFS support doesen't support compression, so i disabled it. However i keep running in to the same problem.

Installing ubuntu is pretty easy, but booting it seems to be a pain in the neck.

After booting the 15.04 live CD i issued the following in the terminal:

Get the zfs support packages installed

# apt-add-repository --yes ppa:zfs-native/stable
# apt-get update
# apt-get install debootstrap spl-dkms zfs-dkms ubuntu-zfs

Create the zfs pools/datasets

# zpool create -o ashift=12 -m none -R /mnt ospool mirror sdb sdc
# zpool create -o ashift=12 -m none -R /mnt storage raidz1 sdd sde sdf sdg sdh

# zfs create -o mountpoint=/ ospool/root
# zfs create -o mountpoint=/boot ospool/boot
# zfs create -V 8G -b 4k ospool/swap
# zfs create -o mountpoint=/var storage/var
# zfs create -o mountpoint=/home storage/home

Bootstrap the base system, and chrooting in

# debootstrap vivid /mnt
# chroot /mnt /bin/bash --login

I have a boot device (SDA) which has an ext2 and a bios boot partition on Mounted on /mnt/boot/grub

At this point i installed the same zfs packages which works just fine. But GRUB fails to install complaining about not being able to find the device og canonical path, so grub2-common and grup-pc never finishes.

So my question is how, do i get grub installed with zfs support?

if i manually install grub with grub-install and reboot into the grub shell, i can see that zfs is supported. But can't reference the kernel with the linux path/to/kernel command.


I suggest you try with Ubuntu 16.04. I followed this tutorial and it worked:


Didn't have to disable any ZFS feature, like compression. In fact, it was enabled (lz4), and I even used raidz1 with 3 disks as /.

One caveat is that I had to export this shell var for grub to recognize the disk/by-id devices:


This is because of bug #11527727, which is about to be fixed, so you may not need that anymore in the near future.


The ZoL PPA for Vivid does not have the software required to make a ZFS root work like you want. This configuration is unsupported for all releases after Precise, which is grandfathered.

Advanced users can sometimes get the desired result using the basic ZFS support that is already in distro. In the HOWTO that you are using here, there should be links to alternative tutorials created by the ZoL community.

A fully integrated Ubuntu solution is probably years away because the upstream GRUB project only recently began giving attention to ZoL issues. Using a separate boot and root is recommended.


You should definitely check out this wiki page on the ZFS on Linux GitHub organization: https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-Ubuntu-14.04-or-Later-to-a-Native-ZFS-Root-Filesystem

I have used this in a VM to try this for my next reinstall. It works great!


I also tried to setup Ubuntu with ZFS using this tutorial: https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-Ubuntu-to-a-Native-ZFS-Root-Filesystem

I'm done so far and installed Ubuntu 14 using debootstrap and so on. Also Grub has been installed.

But booting the system results in the error "Grub can't find label" and stucks.

On the Grub-Console/BusyBox I've checked if ZFS has mounted and it is!

$> zpool status (fine result!)

$> mount ... rpool/ROOT/Ubuntu14 on /root type zfs (...) (seems fine)...

$> ls /root/rpool (!!! EMPTY !!!

$> df -P rpool/ROOT/Ubuntu14 ..... 0% /root ??! What's wrong??!

Booting again using DVD/Recovery-Mode and importing ZFS-Rpool everything still is fine and in place!

May the LZ4 Compression (enabled on Rpool containing the Ubuntu-OS) be the Problem?!

Best regards Gabriel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.