Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition containing ZFS root not decrypted #227

Open
LunarMinus opened this issue Feb 24, 2025 · 4 comments
Open

Partition containing ZFS root not decrypted #227

LunarMinus opened this issue Feb 24, 2025 · 4 comments

Comments

@LunarMinus
Copy link

LunarMinus commented Feb 24, 2025

When I have the ZFS root (rpool) under a luks encrypted partition, it correctly detects the zfs part of it, but not the encrypted partition that would need to be decrypted at boot. When I manually specify the [cryptsetup.root] with the uuid of the partition, it still seems to not build that into the initramfs, or if it does, it tries the mount the zfs pool before it would try to decrypt the root partition?
Is this because the way zfs mounts doesn't show up in lsblk like any other file system?

@desultory
Copy link
Owner

what version are you using? and you mean disk -> luks -> zfs, right? the latest version in git should handle this. If you can share the output when ugrd runs, that would help.

@LunarMinus
Copy link
Author

I am using the latest git version. Also yes, that is what I mean.
out.log

I guess looking through the log, it finds the cryptsetup.root perfectly. When I try to boot, it freezes after zfs: module license taints kernel.

@desultory
Copy link
Owner

desultory commented Feb 24, 2025

Thanks for the info.

Can you try booting with the debug kernel command line arg?

Looking at the log, the init seems fine.

#!/bin/sh -l

# Begin init_pre
mount_base
edebug Creating run dir: "$(mkdir -pv /run/ugrd)"
export_exports
parse_cmdline
readvar loglevel > /proc/sys/kernel/printk
print_banner
load_modules

# Begin init_main
crypt_init
zpool_import

# Begin init_mount
mount_root

# Begin init_final
do_switch_root


# END INIT

If it's stalling after it attempts to load modules, I think it could be related to that?

That's the only module it tries to load, and you'd see "Unlocking LUKS volumes, ugrd.cryptsetup version: 4.0.4" immediately after module loading completes.

@desultory
Copy link
Owner

I'm not too familiar with ZFS, but if you're using a custom kernel, I think it could be possible that a ZFS dependency is missing. I'd assume that would cause it to fail to build, but I've only tested ZFS with dist-kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants