User is anon and password is voidlinux.
The root user is root and has the same password.
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/cryptrootmount -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/@snapshotsumount /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/efimkdir -p /mnt/var/cache
btrfs subvolume create /mnt/var/cache/xbps
btrfs subvolume create /mnt/var/tmp
btrfs subvolume create /mnt/srvexport 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-efimount -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,input,video,audio,docker -s $(which zsh) <username>
passwd <username>
visudoAfter running visudo, uncomment the line that contains %wheel. Log out and log in with the newly created user.
https://wiki.voidlinux.org/Locking_the_root_account_and_using_sudo
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!
sudo xbps-install -S xorg-minimal xorg-fonts \
xf86-video-intel xf86-video-ati \
xf86-input-evdev xf86-video-fbdev \
xf86-input-synaptics
echo 'exec bspwm' >> ~/.xinitrc