[Nix-dev] Encrypted root: LUKS over LVM

Luca Bruno lethalman88 at gmail.com
Mon Jan 5 01:17:04 CET 2015


Yes, as James says, you should really mount /mnt first. Mounting /mnt after
/mnt/boot means that /mnt/boot is seen empty.

On Sun, Jan 4, 2015 at 10:35 PM, James Cook <james.cook at utoronto.ca> wrote:

> On 4 January 2015 at 12:04, Nikita Karetnikov <nikita at karetnikov.org>
> wrote:
> > I’m trying to configure NixOS with LUKS over LVM as described in [1].
> > After partitioning the disk (see ‘partition-table.sfdisk’), I did the
> > following:
> >
> > # mkfs.ext3 /dev/sda1
> > # cryptsetup luksFormat -i 5000 /dev/sda2
> > # cryptsetup luksOpen /dev/sda2 main
> > # pvcreate /dev/mapper/main
> > # vgcreate main /dev/mapper/main
> > # lvcreate -n main --extent=100%FREE main
> > # mkfs.ext3 /dev/main/main
> > # mkdir /mnt/boot
> > # mount /dev/sda1 /mnt/boot
> > # mount /dev/main/main /mnt
> > # nixos-generate-config --root /mnt
> >
> > Then I edited ‘configuration.nix’ (attached) according to the wiki page
> > and ran ‘nixos-install’, which failed (see ‘nixos-install.log’).  Is
> > anything wrong with the config file?
> >
> > [1] https://nixos.org/wiki/Encrypted_Root_on_NixOS
>
> I'm not sure if this matters, but try mounting /mnt before /mnt/boot.
> I wonder if the second mount command is overriding the first, so that
> /mnt/boot points to your LVM logical volume.
>
> James
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>



-- 
NixOS Linux <http://nixos.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150105/d12f5375/attachment.html 


More information about the nix-dev mailing list