Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

Install LVM LUKS

From Void Linux Wiki
Revision as of 12:20, 21 December 2015 by Gottox (talk | contribs)
Jump to navigation Jump to search

Rough notes on a manual installation, with unencrypted /boot and encrypted / on LVM

Not meant to be copy&pasted, please think for yourself.

  • boot the Void Linux live CD
  • cfdisk /dev/sda
    • create two partitions:
      • /dev/sda1 of size 1G to mount as /boot
      • /dev/sda2 of all remaining free space to mount as /
  • mkfs.ext2 -L boot /dev/sda1
  • cryptsetup luksFormat /dev/sda2
  • cryptsetup luksOpen /dev/sda2 crypt-pool
  • vgcreate pool /dev/mapper/crypt-pool
  • lvcreate --name root -L 20G pool
  • mkfs.ext4 -L root /dev/mapper/pool-root
  • mount /dev/mapper/pool-root /mnt
  • mkdir /mnt/{boot,dev,proc,sys}
  • mount /dev/sda1 /mnt/boot
  • mount --rbind /dev /mnt/dev
  • mount --rbind /proc /mnt/proc
  • mount --rbind /sys /mnt/sys
  • xbps-install -S -R http://repo.voidlinux.eu/current -r /mnt base-system lvm2 cryptsetup grub
  • chroot /mnt /bin/bash
  • passwd root
  • chown root:root /
  • chmod 755 /
  • vi /etc/rc.conf
  • echo void-crypt >/etc/hostname
  • vi /etc/fstab
  • grub-install /dev/sda
  • echo "LANG=en_US.UTF-8" > /etc/locale.conf
  • echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales
  • xbps-reconfigure -f glibc-locales
  • echo hostonly=yes > /etc/dracut.conf.d/hostonly
  • add rd.auto=1 to GRUBCMDLINELINUX_DEFAULT variable in /etc/default/grub
  • if you want to use a different keyboard layout (e.g. dvorak) to enter your LUKS passphrase, add rd.vconsole.keymap=dvorak to GRUBCMDLINELINUX_DEFAULT variable in /etc/default/grub
  • force update of dracut and grub: xbps-reconfigure -f linux4.1
  • ^D
  • reboot