[Nix-dev] nixos-rebuild build-vm: Can't find /dev/sda2

Moritz Ulrich moritz at tarn-vedra.de
Mon May 13 18:04:39 CEST 2013


Hello,

I'm a happy NixOS user on a Thinkpad x230. It's lvm-on-luks, with
/boot on /dev/sda1 ("x230-boot") and a luks-volume on /dev/sda2
("luksroot"). Different lvm volumes get mounted via labels on / and
/home:

boot.luks = {
  enable = true;
  devices = [
    {name = "luksroot";
     device = "/dev/sda2";
     allowDiscards = true;
   }];
};

fileSystems."/".label = "x230-root";
fileSystems."/boot".label = "x230-boot";
fileSystems."/home".label = "x230-home";
fileSystems."/tmp" = { device = "tmpfs"; fsType = "tmpfs"; };

Everything works fine when running on bare metal, starting a virtual
machine built via `nixos-rebuild build-vm' stops while booting:

Device /dev/sda2 doesn't exist or access denied.
starting device mapper and LVM
  No Volume groups found
failed to resume


Can anyone help me with this?

Cheers
Moritz Ulrich


More information about the nix-dev mailing list