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/sda1of size 200MB (at least) to mount as/boot/dev/sda2of all remaining free space for the LUKS container
- format boot disk:
mkfs.ext2 -L boot /dev/sda1
- initialize LUKS container:
cryptsetup luksFormat /dev/sda2cryptsetup luksOpen /dev/sda2 crypt-poolvgcreate pool /dev/mapper/crypt-pool
- create root pool:
lvcreate --name root -L 20G poolmkfs.ext4 -L root /dev/mapper/pool-root
- create home:
lvcreate --name home -L 20G poolmkfs.ext4 -L home /dev/mapper/pool-home
- create swap:
lvcreate --name swap -L 8G poolmkswap -L swap /dev/mapper/pool-swap
- set up new root:
mount /dev/mapper/pool-root /mntmkdir /mnt/{boot,dev,proc,sys}mount /dev/sda1 /mnt/bootmount --rbind /dev /mnt/devmount --rbind /proc /mnt/procmount --rbind /sys /mnt/sys
- bootstrap xbps:
xbps-uhelper fetch https://repo.voidlinux.eu/static/xbps-static-latest.x86_64-musl.tar.xztar 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/bashpasswd rootchown root:root /chmod 755 /vi /etc/rc.confecho void-crypt >/etc/hostnamevi /etc/fstabgrub-install /dev/sdaecho "LANG=en_US.UTF-8" >/etc/locale.confecho "en_US.UTF-8 UTF-8" >>/etc/default/libc-localesxbps-reconfigure -f glibc-localesecho hostonly=yes >/etc/dracut.conf.d/hostonly.conf- force update of dracut and grub:
xbps-reconfigure -f linux4.11 ^D
reboot