Skip to content

ZFS support #29

@Baughn

Description

@Baughn

Distribution (run cat /etc/os-release):
NAME="Pop!_OS"
VERSION="19.04"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 19.04"
VERSION_ID="19.04"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco
LOGO=distributor-logo-pop-os

Issue/Bug Description:
With Pop!OS installed on ZFS root, kernelstub fails to identify the block device of the root partition. This is reasonable, as there isn't one; ZFS filesystems don't come with block devices. Instead of root=UUID=whatever, the kernel command line needs to have root=ZFS=rpool/system (or whatever).

I'd like to submit a PR to fix this, and would like to know if there's anything particular I should keep in mind.

Steps to reproduce (if you know):

  • Partition a machine with three partitions: /boot/efi, /, and a spare partition for ZFS.
  • apt install zfs-initramfs
  • zpool create rpool -o altroot=/mnt -O mountpoint=none
  • zfs create rpool/system -o mountpoint=/
  • Double-check that rpool/system it got mounted on /mnt.
  • rsync -avx / /mnt/ --exclude=/mnt # The -x option appears to misunderstand ZFS mounts.
  • Reboot, and edit the kernel command line to specify root=ZFS=rpool/system.

This pretty much works, though it ignores some steps needed to mount any sub-filesystems. However, kernelstub fails due to UUIDNotFoundError at

def get_uuid(self, filesystem):
.

Expected behavior:

It should do whatever is needed to emit root=ZFS=rpool/system.

Other Notes:

Performance is much better on ZFS. It's quite astonishing how much of a desktop latency improvement I'm getting from it, really. Also, Ubuntu is working on a ZFS installer, so you guys shouldn't get left behind.

Not exactly sure how to best extend kernelstub to support this. As a quick hack, it'd be easy -- modify get_part_dev to return the filesystem type along with the "device", and special-casing zfs as necessary -- but there's probably a cleaner way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions