ZFS support
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 https://github.com/isantop/kernelstub/blob/234d34e7a22f0a43834e7def0e399555b10c3833/kernelstub/drive.py#L121.
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.
There hasn't been a release since 2018. There hasn't been a commit since 2019. The last PR opened/closed since 2019.
This issue was opened in 2019. :(
I guess we need to remove it from our systems, including from Pop_OS which shed the light on this nice little tool for me back in 2018. I was already managing my gummiboot manually anyhoot with the help of Kernelstub. There isnt much it's doing these days.
Wonder if the Pop_os devs plan on removing it...