NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.63k stars 13.78k forks source link

assertion (name' == name) failed at ... luksroot.nix:143:186 #113337

Open ergose opened 3 years ago

ergose commented 3 years ago

Trying to install nixos with luks + lvm on a VM, but getting error on 20.09: assertion (name' == name) failed at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/luksroot.nix:143:186 Thinking it's a typo (' to be dropped?)

Steps:

  1. Create a blank VM with EFI in Virtualbox and use the Minimal NixOS cd
  2. In general, follow these steps: https://gist.github.com/martijnvermaat/76f2e24d0239470dd71050358b4d5134
  3. Relevant config snippet:
    boot.loader.systemd-boot.enable = true;
    boot.loader.efi.canTouchEfiVariables = true;
    boot.initrd.luks.devices.luksroot = {
    name = "root";
    device = "/dev/disk/by-uuid/(encrypted partition UUID, not volume)";  # sda2
    preLVM = true;
    allowDiscards = true;
    };
  4. nixos-install

Expected: Install to proceed as normal

Actual: Error appears partway through install when it reaches luksroot.nix

Notify maintainers @eyJhb - Pass this to a different maintainer if needed. Just saw you as last to edit the line.

Maintainer information: Affects: nixos/modules/system/boot/luksroot.nix

cole-h commented 3 years ago

What if you try changing name = "root"; to name = "luksroot";, or devices.luksroot to devices.root?

eyJhb commented 3 years ago

@ergose is this still a issue?

fisx commented 2 years ago

What if you try changing name = "root"; to name = "luksroot";, or devices.luksroot to devices.root?

"luksroot" worked for me!

Given that I followed https://gist.github.com/martijnvermaat/76f2e24d0239470dd71050358b4d5134 to the letter and would have expected the name to be "root" (created with lvcreate -l '100%FREE' -n root vg), maybe the issue is still relevant?

Anyway, you helped @cole-h, thanks!

fisx commented 2 years ago

also relevant from the above gist: on Jan 8, 2021