void linux installation notes
install information:
- luks encrypted
- ext4 filesystem
- no lvm
- chroot install (https://docs.voidlinux.org/installation/guides/chroot.html)
login
root:voidlinux
interactive shell
bash
create partition table
partition | size | code | fs |
---|---|---|---|
boot (/dev/sda1) | 512 MiB | ef00 | efi |
root (/dev/sda2) | the rest | 8300 | ext4 |
create filesystems
cryptsetup luksFormat /dev/sda2
cryptsetup open /dev/sda2 cryptroot
mkfs.ext4 /dev/mapper/cryptroot
mount /dev/mapper/cryptroot /mnt
mkfs.fat -F32 /dev/sda1
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
mount linux system
mkdir /mnt/dev && mount --rbind /dev /mnt/dev
mkdir /mnt/proc && mount --rbind /proc /mnt/proc
mkdir /mnt/sys && mount --rbind /sys /mnt/sys
or
for d in dev proc sys; do mkdir /mnt/$d && mount --rbind /$d /mnt/$d; done
install void base-system
xbps-install -Sy -R https://repo-fi.voidlinux.org/current -r /mnt base-system cryptsetup grub-x86_64-efi neovim
copy resolv.conf so dns works in the chroot
cp /etc/resolv.conf /mnt/etc/resolv.conf
chroot
chroot /mnt /bin/bash
set root password
passwd
root permissions
chown root:root /
chmod 755 /
set hostname
echo <yr-hostname> > /etc/hostname
add user
useradd -m -G wheel rj1
passwd rj1
enable sudo
nvim /etc/sudoers
set timezone/keymap
nvim /etc/rc.conf
set locale
echo "LANG=en_US.UTF-8" > /etc/locale.conf
uncomment your locale in /etc/default/libc-locales
nvim /etc/default/libc-locales
enable nonfree repo + install microcode patch
xbps-install -S void-repo-nonfree
xbps-install -S intel-ucode
setup fstab
nvim /etc/fstab
example fstab:
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
UUID=21b8b8e9-29ca-4d2f-a7fc-3face2fc2b0a / ext4 defaults 0 0
UUID=0536-48CF /boot vfat defaults 0 2
use :r!blkid /dev/sda2 -sUUID -ovalue
in vim to insert the desired UUID
edit grub config
edit /etc/default/grub
nvim /etc/default/grub
append rd.auto=1
to GRUB_CMDLINE_LINUX_DEFAULT
e.g. GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 rd.auto=1"
install grub
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="void"
grub-mkconfig -o /boot/grub/grub.cfg
add cryptsetup to our initramfs
echo 'add_dracutmodules+=" crypt "' > /etc/dracut.conf.d/dracutmodules.conf
add hostonly setting to dracut
echo 'hostonly=yes' > /etc/dracut.conf.d/hostonly.conf
build initramfs
note: the following command will reconfigure all of the packages you have
installed, this is a simple way to generate the initramfs and enable our locale
choice(s) by reconfiguring the glibc-locales
package
xbps-reconfigure -fa
you can exit
the chroot and reboot
now
have fun!