Rough notes on a manual installation, with unencrypted /boot and encrypted / on LVM
(Rescued from the voidlinux/documentation wiki.)
Not meant to be copy & pasted, please think for yourself.
- boot hrmpf or GRML (any live CD should do)
cfdisk /dev/sda
- create two partitions:
/dev/sda1
of size 200MB (at least) to mount as/boot
/dev/sda2
of all remaining free space for the LUKS container
- format boot disk:
mkfs.ext2 -L boot /dev/sda1
- initialize LUKS container:
cryptsetup luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 crypt-pool
vgcreate pool /dev/mapper/crypt-pool
- create root pool:
lvcreate --name root -L 20G pool
mkfs.ext4 -L root /dev/mapper/pool-root
- create home:
lvcreate --name home -L 20G pool
mkfs.ext4 -L home /dev/mapper/pool-home
- create swap:
lvcreate --name swap -L 8G pool
mkswap -L swap /dev/mapper/pool-swap
- set up new 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
- bootstrap xbps:
xbps-uhelper fetch https://repo.voidlinux.eu/static/xbps-static-latest.x86_64-musl.tar.xz
tar xof xbps-static-latest.x86_64-musl.tar.xz -C /mnt
/mnt/usr/bin/xbps-install -S -R https://repo.voidlinux.eu/current -r /mnt base-system lvm2 cryptsetup grub
- Enter chroot:
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.conf
- force update of dracut and grub:
xbps-reconfigure -f linux4.11
^D
reboot