[Nix-dev] Stuck After Logical Volume Active

Andika Riyandi andika.riyan at gmail.com
Wed Feb 24 11:58:50 CET 2016


Dear All,

I am following this https://bluishcoder.co.nz/2014/05/14/installing-nixos-with-encrypted-root-on-thinkpad-w540.html and this http://chris-martin.org/2015/installing-nixos/ guide to install LVM and LUKS on my 1 SSD and 1 HDD. Below are my detail configuration:

1. SSD:
    /dev/sda1 1MB EF02
    /dev/sda2 1GB EF00
   /dev/sda3   the rest (approx. 490GB) 8E00

2. HDD:
    /dev/sdb1 2TB 8E00

And below are the command that i am executed:
> cryptsetup luksFormat --hash=sha512 --key-size=512 --verify-passphrase /dev/sda3
> cryptsetup luksFormat --hash=sha512 --key-size=512 --verify-passphrase  /dev/sdb1
> cryptsetup luksOpen /dev/sda3 enc_sda
> cryptsetup luksOpen /dev/sdb1 enc_sdb
> pvcreate /dev/mapper/enc_sda
> pvcreate /dev/mapper/enc_sdb
> vgcreate vg /dev/mapper/enc_sda /dev/mapper/enc_sdb
> lvcreate -L 128G -n swap vg
> lvcreate -L 2T -n home vg
> lvcreate -L 390G -n root vg
> 
> mkfs.ext2 -L boot /dev/sda2
> mkfs.ext4 -O dir_index -j -L root /dev/vg/root
> mkfs.ext4 -O dir_index -j -L home /dev/vg/home
> mkswap -L swap /dev/vg/swap
>
> mount /dev/vg/root /mnt
> mkdir /mnt/boot /mnt/home
> mount /dev/sda2 /mnt/boot
> mount /dev/vg/home /home
> swapon /dev/vg/swap
>
> nixos-generate-config --rot /mnt

and here is my configuration.nix:

{

boot.initrd.luks.devices = [ { name = "root"; device = "/dev/sda3"; preLVM = true;} { name = "home"; device = "/dev/sdb1"; preLVM = true;}]
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.version =2;

networking.networkmanager.enable = true;
security.sudo.enable = true;
users.extraUsers.R = { isNormalUser = true; createHome = true; home = "/home/R"; shell = "/bin/bash";};

};

i have success with nixos-install, and when reboot it stuck on the message:
<<< NixOS Stage 1 >>>

loading module dm_mod...
running udev...
starting version 217
Enter passphrase for /dev/sda3:
Enter passphrase for /dev/sdb1:
starting device mapper and LVM...
   3 logical volume(s) in volume group "vg" now active


regards,
Andika


More information about the nix-dev mailing list