Skip to content

Instantly share code, notes, and snippets.

@lapwat

lapwat/void_luks

Last active Jun 17, 2018
Embed
What would you like to do?
$ cryptsetup open --type plain /dev/nvme0n1 ssd
$ dd if=/dev/zero of=/dev/mapper/ssd bs=4M
$ fdisk /dev/nvme0n1
> p1: 500M EFI System
> p2: reste Linux filesystem
$ mkfs.ext2 -L boot /dev/nvme0n1p1
$ cryptsetup benchmark
$ cryptsetup -c aes-xts-plain64 -h sha512 -s 256 -y luksFormat /dev/nvme0n1p2
> YES
> PASSPHRASE
$ cryptsetup luksOpen /dev/nvme0n1p2 ssd
> PASSPHRASE
$ pvcreate /dev/mapper/ssd
$ vgcreate vg /dev/mapper/ssd
$ lvcreate -n swap -L 16G vg
$ lvcreate -n void -l +100%FREE vg
$ mkswap -L SWAP /dev/mapper/vg-swap
$ mkfs.btrfs -K -L VOID /dev/mapper/vg-arch
$ mount -o defaults,noatime,ssd,discard,compress=lzo /dev/mapper/vg-void /mnt
$ cd /mnt
$ btrfs subvolume create __active
$ btrfs subvolume create __active/rootvol
$ btrfs subvolume create __active/home
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment