User is anon and password is voidlinux.
$ loadkeys $(ls /usr/share/kbd/keymaps/i386/**/*.map.gz | grep br-abnt2)$ cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-<interface>.conf
$ wpa_passphrase <ssid> <passphrase> | tee -a /etc/wpa_supplicant/wpa_supplicant-<interface>.conf
$ sv restart dhcpcd
$ ip link set up <interface>Run:
$ fdisk /dev/sdaThen:
- Select
gto generate a GTP table - Select
nto create the EFI partition with size of +200M - Change the created partition's type by selecting
tand then selecting the option that representsEFI Partition - Select
nto create the GRUB partition with size of +500M - Select
nto create thebtrfspartition with the remaining size
$ mkfs.vfat -n boot -F 32 /dev/sda1
$ mkfs.ext2 -L GRUB /dev/sda2
$ cryptsetup luksFormat --type=luks -s=512 /dev/sda3
$ cryptsetup open /dev/sda3 cryptroot
$ mkfs.btrfs -L void /dev/mapper/cryptroot$ mount -o rw,noatime,ssd,compress=zstd,space_cache,commit=120 /dev/mapper/cryptroot /mnt
$ btrfs subvolume create /mnt/@
$ btrfs subvolume create /mnt/@home
$ btrfs subvolume create /mnt/@snapshots$ umount /mnt
$ mount -o rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvol=@ /dev/mapper/cryptroot /mnt
$ mkdir -p /mnt/home
$ mkdir -p /mnt/.snapshots
$ mount -o rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvol=@home /dev/mapper/cryptroot /mnt/home
$ mount -o rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvol=@snapshots /dev/mapper/cryptroot /mnt/.snapshots
$ mkdir /mnt/boot
$ mount -o rw,noatime /dev/sda2 /mnt/boot
$ mkdir /mnt/boot/efi
$ mount -o rw,noatime /dev/sda1 /mnt/boot/efi$ mkdir -p /mnt/var/cache
$ btrfs subvolume create /mnt/var/cache/xbps
$ btrfs subvolume create /mnt/var/tmp
$ btrfs subvolume create /mnt/srv$ export XBPS_ARCH=x86_64-musl
$ xbps-install -Sy -R https://alpha.de.repo.voidlinux.org/current/musl -r /mnt base-system btrfs-progs cryptsetup grub-x86_64-efi$ mount -t proc proc /mnt/proc
$ mount -t sysfs sys /mnt/sys
$ mount -o bind /dev /mnt/dev
$ mount -t devpts pts /mnt/dev/pts
$ cp -L /etc/resolv.conf /mnt/etc/
$ cd /mnt
$ chroot /mnt /bin/bash
$ passwd root
$ chown root:root /
$ chmod 755 /
$ echo <hostname> > /etc/hostnameThen edit the file /etc/rc.conf to contain the following:
HOSTNAME="<hostname>"
# Set RTC to UTC or localtime.
HARDWARECLOCK="UTC"
# Set timezone, availables timezones at /usr/share/zoneinfo.
TIMEZONE="America/Sao_Paulo"
# Keymap to load, see loadkeys(8).
KEYMAP="br-abnt2"
# Console font to load, see setfont(8).
#FONT="lat9w-16"
# Console map to load, see setfont(8).
#FONT_MAP=
# Font unimap to load, see setfont(8).
#FONT_UNIMAP=
# Kernel modules to load, delimited by blanks.
#MODULES=""Then run the following commands:
$ echo 'GRUB_CMDLINE_LINUX="rd.luks=1 rd.luks.uuid=<luks-device-uuid>"' >> /etc/default/grub
$ echo 'add_dracutmodules+="crypt btrfs resume"' >> /etc/dracut.conf
$ echo 'tmpdir=/tmp' >> /etc/dracut.conf
$ dracut --force --hostonly --kver <kernel-version>
$ grub-mkconfig -o /boot/grub/grub.cfg
$ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=void_grub --boot-directory=/boot --recheck --debug
$ xbps-install -S void-repo-nonfree
$ xbps-install -Su
$ xbps-install intel-ucode
$ echo 'early_microcode="yes"' >> /etc/dracut.conf.d/intel_ucode.conf
$ xbps-reconfigure -f linux<kernel-version-major.minor>
$ exit
$ exit
$ umount -R /mnt
$ rebootNote: one can also add splash quiet to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub.
Log in as root
$ xbps-install -S zsh
$ usermod -m -G wheel -s $(which zsh) <username>
$ passwd <username>
$ visudoAfter running visudo, uncomment the line that contains %wheel.
Run the proper wpa_supplicant steps to set Wi-Fi or stuff you need. Then, register and start the needed services:
$ sudo ln -s /etc/sv/dhcpcd /var/service/
$ sudo ln -s /etc/sv/wpa_supplicant /var/service/
By symlinking the services, runit will pick them up in the next five seconds and start them!