-
-
Save lnlsn/4ed3afb2dc68b9079251b48e1ee2125f to your computer and use it in GitHub Desktop.
Revisions
-
gbrlsnchs revised this gist
Aug 19, 2019 . 1 changed file with 18 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,6 +71,11 @@ btrfs subvolume create /mnt/srv ``` ### Installing the base system #### Using `glibc` ```sh xbps-install -Sy -R https://alpha.de.repo.voidlinux.org/current -r /mnt base-system btrfs-progs cryptsetup grub-x86_64-efi ``` #### Using `musl` ```sh 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 @@ -119,27 +124,29 @@ KEYMAP="br-abnt2" Then run the following commands: ```sh echo 'en_US.UTF-8 UTF-8' > /etc/default/libc-locales export GRUB_UUID=$(blkid -s UUID -o value /dev/sda2) export UEFI_UUID=$(blkid -s UUID -o value /dev/sda1) export ROOT_UUID=$(blkid -s UUID -o value /dev/mapper/cryptoroot) export LUKS_UUID=$(blkid -s UUID -o value /dev/sda3) cat <<EOF > /etc/fstab UUID=$GRUB_UUID /boot ext2 defaults,noatime 0 2 UUID=$UEFI_UUID /boot/efi vfat defaults,noatime 0 2 UUID=$ROOT_UUID / btrfs rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvolid=257 0 1 UUID=$ROOT_UUID /home btrfs rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvolid=258 0 2 UUID=$ROOT_UUID /.snapshots btrfs rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvolid=259 0 2 EOF echo "GRUB_CMDLINE_LINUX=\"${LUKS_UUID} i915.modeset=1\"" >> /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 -
gbrlsnchs revised this gist
Aug 19, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -119,7 +119,7 @@ KEYMAP="br-abnt2" Then run the following commands: ```sh echo "GRUB_CMDLINE_LINUX=\"rd.luks=1 rd.luks.uuid=${blkid -s UUID -o value /dev/sda3} i915.modeset=1\"" >> /etc/default/grub echo 'add_dracutmodules+="crypt btrfs resume"' >> /etc/dracut.conf echo 'tmpdir=/tmp' >> /etc/dracut.conf dracut --force --hostonly --kver <kernel-version> -
gbrlsnchs revised this gist
Aug 19, 2019 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -119,7 +119,7 @@ KEYMAP="br-abnt2" Then run the following commands: ```sh echo "GRUB_CMDLINE_LINUX=\"rd.luks=1 rd.luks.uuid=${blkid -s UUID -o value /dev/sda3}\"" >> /etc/default/grub echo 'add_dracutmodules+="crypt btrfs resume"' >> /etc/dracut.conf echo 'tmpdir=/tmp' >> /etc/dracut.conf dracut --force --hostonly --kver <kernel-version> @@ -130,6 +130,16 @@ 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> export GRUB_UUID=$(blkid -s UUID -o value /dev/sda2) export UEFI_UUID=$(blkid -s UUID -o value /dev/sda1) export ROOT_UUID=$(blkid -s UUID -o value /dev/mapper/cryptoroot) cat <<EOF > /etc/fstab UUID=$GRUB_UUID /boot ext2 defaults,noatime 0 2 UUID=$UEFI_UUID /boot/efi vfat defaults,noatime 0 2 UUID=$ROOT_UUID / btrfs rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvolid=257 0 1 UUID=$ROOT_UUID /home btrfs rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvolid=258 0 2 UUID=$ROOT_UUID /.snapshots btrfs rw,noatime,ssd,compress=zstd,space_cache,commit=120,subvolid=259 0 2 EOF exit exit umount -R /mnt -
gbrlsnchs revised this gist
Aug 16, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -150,7 +150,7 @@ visudo After running `visudo`, uncomment the line that contains `%wheel`. Log out and log in with the newly created user. #### Locking the root account :warning: **Important** :warning: Only run this after setting up the main user! ```sh sudo passwd -dl root -
gbrlsnchs revised this gist
Aug 16, 2019 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -150,8 +150,7 @@ visudo After running `visudo`, uncomment the line that contains `%wheel`. Log out and log in with the newly created user. #### Locking the root account :warning: **Important** :warning Only run this after setting up the main user! ```sh sudo passwd -dl root -
gbrlsnchs revised this gist
Aug 16, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -150,7 +150,8 @@ visudo After running `visudo`, uncomment the line that contains `%wheel`. Log out and log in with the newly created user. #### Locking the root account **Important** Only run this after setting up the main user! ```sh sudo passwd -dl root -
gbrlsnchs revised this gist
Aug 16, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -150,7 +150,7 @@ visudo After running `visudo`, uncomment the line that contains `%wheel`. Log out and log in with the newly created user. #### Locking the root account **Important** Only run this after setting up the main user! ```sh sudo passwd -dl root -
gbrlsnchs revised this gist
Aug 16, 2019 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -150,7 +150,11 @@ visudo After running `visudo`, uncomment the line that contains `%wheel`. Log out and log in with the newly created user. #### Locking the root account **Important** Only run this after setting up the main user! ```sh sudo passwd -dl root ``` ### Connecting to the internet Run the proper `wpa_supplicant` steps to set Wi-Fi or stuff you need. Then, register and start the needed services: -
gbrlsnchs revised this gist
Aug 16, 2019 . 1 changed file with 11 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -143,7 +143,7 @@ Note: one can also add `splash quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/d Log in as root ```sh xbps-install -S zsh usermod -m -G wheel -s $(which zsh) <username> passwd <username> visudo ``` @@ -174,5 +174,14 @@ First, check whether [KMS](https://en.wikipedia.org/wiki/Mode_setting#Linux) is ```sh sudo cat /sys/module/i915/parameters/modeset ``` If it returns `1`, then KMS is enabled. If not, add `i915.modeset=1` to the kernel parameters. Then, ensure `/etc/X11/Xwrapper.config` has `needs_root_rights = no` and add the user to the following groups: ```sh sudo usermod -aG input,video <username> ``` Finally, to start Xorg, you should run, without sudo: ```sh startx -- vt1 ``` https://wiki.voidlinux.org/Xorg -
gbrlsnchs revised this gist
Aug 16, 2019 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ ### Logging in User is `anon` and password is `voidlinux`. The root user is `root` and has the same password. This document implies you're using the `root` user, so no `sudo` is used until the main user is created and used. ### Setting keyboard layout ```sh @@ -162,11 +163,16 @@ By symlinking the services, runit will pick them up in the next five seconds and ### Installing drivers needed by Xorg ```sh 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 ``` #### Rootless Xorg First, check whether [KMS](https://en.wikipedia.org/wiki/Mode_setting#Linux) is enabled: ```sh sudo cat /sys/module/i915/parameters/modeset ``` If it returns `1`, then KMS is enabled. https://wiki.voidlinux.org/Xorg -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -142,7 +142,7 @@ Note: one can also add `splash quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/d Log in as root ```sh xbps-install -S zsh usermod -m -G wheel,input,video,audio,docker -s $(which zsh) <username> passwd <username> visudo ``` -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -159,11 +159,14 @@ 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! ### Installing drivers needed by Xorg ```sh 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 ``` #### Rootless Xorg https://wiki.voidlinux.org/Xorg -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -165,5 +165,5 @@ 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 ``` -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -165,5 +165,5 @@ 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' >> ~/.xinit ``` -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -157,4 +157,13 @@ Run the proper `wpa_supplicant` steps to set Wi-Fi or stuff you need. Then, regi 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! ### Installing drivers needed by X11 ```sh 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' ``` -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 68 additions and 64 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,24 +3,25 @@ ## Live image ### Logging in User is `anon` and password is `voidlinux`. The root user is `root` and has the same password. ### Setting keyboard layout ```sh loadkeys $(ls /usr/share/kbd/keymaps/i386/**/*.map.gz | grep br-abnt2) ``` ### Connecting to the internet ```sh 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> ``` ### Formatting disk Run: ```sh fdisk /dev/sda ``` Then: 1. Select `g` to generate a GTP table @@ -31,62 +32,62 @@ Then: ### Creating the filesystems ```sh 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 ``` ### Mounting the `btrfs`partition and creating subvolumes ```sh 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 ``` #### Mounting top-level partitions ```sh 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 ``` #### Creating nested partitions ```sh mkdir -p /mnt/var/cache btrfs subvolume create /mnt/var/cache/xbps btrfs subvolume create /mnt/var/tmp btrfs subvolume create /mnt/srv ``` ### Installing the base system ```sh 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 ``` #### Running `chroot` ```sh 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/hostname ``` Then edit the file `/etc/rc.conf` to contain the following: @@ -117,21 +118,21 @@ KEYMAP="br-abnt2" Then run the following commands: ```sh 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 reboot ``` Note: one can also add `splash quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. @@ -140,17 +141,20 @@ Note: one can also add `splash quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/d ### Creating the main user and adding them to sudoers Log in as root ```sh xbps-install -S zsh usermod -m -G wheel -s $(which zsh) <username> passwd <username> visudo ``` After running `visudo`, uncomment the line that contains `%wheel`. Log out and log in with the newly created user. #### Locking the root account https://wiki.voidlinux.org/Locking_the_root_account_and_using_sudo ### Connecting to the internet Run the proper `wpa_supplicant` steps to set Wi-Fi or stuff you need. Then, register and start the needed services: ```sh 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! -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -149,7 +149,7 @@ After running `visudo`, uncomment the line that contains `%wheel`. ### Connecting to the internet Run the proper `wpa_supplicant` steps to set Wi-Fi or stuff you need. Then, register and start the needed services: ```sh $ sudo ln -s /etc/sv/dhcpcd /var/service/ $ sudo ln -s /etc/sv/wpa_supplicant /var/service/ ``` -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -149,7 +149,7 @@ After running `visudo`, uncomment the line that contains `%wheel`. ### Connecting to the internet Run the proper `wpa_supplicant` steps to set Wi-Fi or stuff you need. Then, register and start the needed services: ```terminal $ sudo ln -s /etc/sv/dhcpcd /var/service/ $ sudo ln -s /etc/sv/wpa_supplicant /var/service/ ``` -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 64 additions and 64 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,22 +5,22 @@ User is `anon` and password is `voidlinux`. ### Setting keyboard layout ```sh $ loadkeys $(ls /usr/share/kbd/keymaps/i386/**/*.map.gz | grep br-abnt2) ``` ### Connecting to the internet ```sh $ 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> ``` ### Formatting disk Run: ```sh $ fdisk /dev/sda ``` Then: 1. Select `g` to generate a GTP table @@ -31,62 +31,62 @@ Then: ### Creating the filesystems ```sh $ 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 ``` ### Mounting the `btrfs`partition and creating subvolumes ```sh $ 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 ``` #### Mounting top-level partitions ```sh $ 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 ``` #### Creating nested partitions ```sh $ mkdir -p /mnt/var/cache $ btrfs subvolume create /mnt/var/cache/xbps $ btrfs subvolume create /mnt/var/tmp $ btrfs subvolume create /mnt/srv ``` ### Installing the base system ```sh $ 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 ``` #### Running `chroot` ```sh $ 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/hostname ``` Then edit the file `/etc/rc.conf` to contain the following: @@ -117,21 +117,21 @@ KEYMAP="br-abnt2" Then run the following commands: ```sh $ 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 $ reboot ``` Note: one can also add `splash quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. @@ -140,17 +140,17 @@ Note: one can also add `splash quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/d ### Creating the main user and adding them to sudoers Log in as root ```sh $ xbps-install -S zsh $ usermod -m -G wheel -s $(which zsh) <username> $ passwd <username> $ visudo ``` After running `visudo`, uncomment the line that contains `%wheel`. ### Connecting to the internet Run the proper `wpa_supplicant` steps to set Wi-Fi or stuff you need. Then, register and start the needed services: ```sh $ 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! -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,10 +11,10 @@ User is `anon` and password is `voidlinux`. ### Connecting to the internet ```sh % 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> ``` ### Formatting disk -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,8 @@ User is `anon` and password is `voidlinux`. ### Setting keyboard layout ```zsh % loadkeys $(ls /usr/share/kbd/keymaps/i386/**/*.map.gz | grep br-abnt2) ``` ### Connecting to the internet -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ User is `anon` and password is `voidlinux`. ### Setting keyboard layout ```bash # loadkeys $(ls /usr/share/kbd/keymaps/i386/**/*.map.gz | grep br-abnt2) ``` -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ User is `anon` and password is `voidlinux`. ### Setting keyboard layout ```shell # loadkeys $(ls /usr/share/kbd/keymaps/i386/**/*.map.gz | grep br-abnt2) ``` -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 17 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -123,6 +123,10 @@ Then run the following commands: # 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 @@ -136,9 +140,17 @@ Note: one can also add `splash quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/d ### Creating the main user and adding them to sudoers Log in as root ```sh # xbps-install -S zsh # usermod -m -G wheel -s $(which zsh) <username> # passwd <username> # visudo ``` After running `visudo`, uncomment the line that contains `%wheel`. ### Connecting to the internet Run the proper `wpa_supplicant` steps to set Wi-Fi or stuff you need. Then, register and start the needed services: ```sh 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! -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -130,4 +130,15 @@ Then run the following commands: # reboot ``` Note: one can also add `splash quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. ## Post-installation ### Creating the main user and adding them to sudoers Log in as root ```sh xbps-install -S zsh usermod -m -G wheel -s $(which zsh) <username> passwd <username> visudo ``` After running `visudo`, uncomment the line that contains `%wheel`. -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -90,7 +90,7 @@ Then: ``` Then edit the file `/etc/rc.conf` to contain the following: ```ini HOSTNAME="<hostname>" # Set RTC to UTC or localtime. -
gbrlsnchs revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -90,7 +90,7 @@ Then: ``` Then edit the file `/etc/rc.conf` to contain the following: ```config HOSTNAME="<hostname>" # Set RTC to UTC or localtime. -
gbrlsnchs revised this gist
Aug 12, 2019 . 1 changed file with 21 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,16 +91,16 @@ Then: Then edit the file `/etc/rc.conf` to contain the following: ```conf 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" @@ -113,4 +113,21 @@ KEYMAP="us" # Kernel modules to load, delimited by blanks. #MODULES="" ``` Then run the following commands: ```sh # 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-reconfigure -f linux<kernel-version-major.minor> # exit # exit # umount -R /mnt # reboot ``` Note: one can also add `quiet` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. -
gbrlsnchs revised this gist
Aug 12, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,8 +33,8 @@ Then: ```sh # 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 ``` -
gbrlsnchs revised this gist
Aug 12, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -82,7 +82,7 @@ Then: # 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 /
NewerOlder