Open jluttine opened 6 years ago
Looking at the photo, it looks like device mapper and LVM are started after asking for passphrases, whereas I would need LVM before asking for passphrases. Could this be the reason? Any idea how to fix?
Yey, setting preLVM = false
to that LUKS device fixed the issue!
However,
# FIXME: get rid of this option.
. Indeed, I needed this option so I hope it won't be removed.I'm worried about the comment
# FIXME: get rid of this option.
. Indeed, I needed this option so I hope it won't be removed.
As do I; indeed, I found this issue when working out how to do a LUKS-on-LVM setup. I also found #24289; while I'm not experiencing that issue (and it's not directly related to this), it does demonstrate there are at least a few users out there with this need.
Hopefully, the intent of the FIXME
was that the correct order to boot would be recognised automatically without the need for that option. If not, then I wanted to second your comment, as there's no reason I can think of to stop allowing LUKS-on-LVM setups, and I wouldn't want to be left with a choice between a bootable system and an update-able one.
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Still important to me.
Still important to me as well. I'll defer to @jluttine's view as to when it's appropriate to close (since they raised it), but their points in comment #355821839 above seem reasonable.
I marked this as stale due to inactivity. → More info
Issue description
I have a few disks on my computer and one of them has an LVM partition with one volume group containing one logical volume. This logical volume is LUKS encrypted containing ext4 file system. My other disks/partitions are LUKS (except /boot is not encrypted).
When I'm booting, I can enter passphrases to all my other LUKS partitions but the one inside LVM doesn't work
Here is a photo of the boot failure (note: labels are a bit different than in my below example): https://matrix.org/_matrix/media/v1/download/matrix.org/JxNhHxGnRZenwUTWsTSqMovI
Steps to reproduce
Maybe I should create steps for some virtual machine? Not sure how to do it. I'll provide rough sketch what I did:
fdisk
. Let's assume the created partition is/dev/sda1
.pvcreate /dev/sda1
vgcreate vg-nixos /dev/sda1
lvcreate -L 100%FREE -n lv-nixos vg-nixos
cryptsetup -y -v luksFormat /dev/vg-nixos/lv-nixos
cryptsetup open /dev/vg-nixos/lv-nixos luks-nixos
mkfs.ext4 -L nixos /dev/mapper/luks-nixos
Then I mounted all file systems to correct locations, ran automatic hardware configuration and installed NixOS. When booting to my system, I got the error:
/dev/vg-nixos/lv-nixos doesn't exist or access denied
. It just times out.Any ideas what is wrong?
Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the results.I'm not currently able to boot to my system. I can provide this information somehow if necessary.