Skip to content

zfs-linux-lts-poscat sd-zfs does not support zfs native encryption #4168

Open
@darkbasic

Description

@darkbasic

问题类型 / Type of issues

  • 其它 / other

受影响的软件包 / Affected packages

  • zfs-linux-lts-poscat

Hi, I'm trying to boot Arch Linux with sd-zfs (from the zfs-linux-lts-poscat package) + zfsbootmenu (zfs set org.zfsbootmenu:commandline="rw" zroot/ROOT) + zfs-import-scan + zfs-mount-generator but I'm getting stuck at "Failing to start Switch Root":

Image

HOOKS=(systemd sd-zfs autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)

/etc/zfs/zfs-list.cache/zroot has been populated and /etc/zfs/zpool.cache does not exist.

If I switch to the zfs hook (HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block zfs filesystems fsck)) it works:

Image

zfsbootmenu ignores any root entry and forcefully provides a zfs=zroot/ROOT/arch parameter.
I don't know if that might the problem, because if you don't provide a root parameter it should default to the bootfs which has been correctly set (zpool set bootfs=zroot/ROOT/arch zroot).

Any idea how to debug/fix this issue?

Please note that I'm not using the whole zfs-linux-lts-poscat package (I want to use zfs-dkms-staging-git/zfs-utils-staging-git along with the latest stable kernel) but instead a trimmed down version which provides just the sd-zfs hook:

package_sd-zfs-poscat() {
    pkgdesc='ZFS mkinitcpio hook for systemd based initrds'

    install -Dvm644 "${srcdir}"/sd-zfs.initcpio.install "${pkgdir}"/usr/lib/initcpio/install/sd-zfs

    install -Dvm755 -t "${pkgdir}"/usr/lib/zfs/initcpio/ "${srcdir}"/{parse-cmdline,zfs-set-env,zfs-root-generator}
    install -Dvm755 -t "${pkgdir}"/usr/lib/systemd/system-shutdown/ "${srcdir}"/zfs.shutdown
}

If I manage to get it working with zfsbootmenu I would like to provide an sd-zfs-poscat AUR package, with your permission.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions