Installing Void Linux on a UEFI laptop

Here are my quick installation notes for Void Linux. These are not comprehensive by any means but they should help see you through the install in case you get stuck somewhere. Let's begin.

First off, get the iso from void's website. Keep the docs open while you go through the installation.

Check the shasum to verify the integrity of the iso, flash it to a usb & then boot into it.

Log in to the live iso using:

user: anon
pass: voidlinux

Networking

If you're on a laptop, you can try using wpa_supplicant to enable wifi. The wpa_supplicant package is installed by default on the base system. It includes utilities to configure wireless interfaces and handle wireless security protocols.

From the void docs:

# wpa_passphrase <MYSSID> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant.conf

Now, try using ping and see if wifi works.

Unfortunately, the wifi card on my laptop is relatively new mt 7921e and only the later kernel versions support it out of the box, so this didn't work for me. My laptop doesn't have an ethernet port either. So what can be done now? A solution is to use usb tethering from your phone to connect to the Internet. Phew, that worked perfectly!

Beginning Installation

  1. Start the installation by typing in void-installer as root. The installer instructions here are fairly straight forward & don't require much explanation. So lets quickly blaze through them.
  2. Follow the steps on screen to set up keyboard & network.
  3. For source you have two options, network & local. I prefer network install as it'll fetch the most up to date packages.
  4. Set hostname, locale & timezone.
  5. Set the root password, username & a password for this user.
  6. Select group memembership for the user. (Note: the defaults are quite alright.)
  7. Select the disk where the grub bootloader will be installed.

Partitioning

Ah yes, partitioning. Pretty much the only part where you need to pay some attention to avoid messing things up. So be careful here. I like using cfdisk for its ease of use.

On an empty drive, cfdisk will ask you for a label type. Select GPT if on uefi or MBR if using bios. Since I have a uefi laptop, I'll be using gpt here. According to the void docs, its possible to set up a GPT partition table on a bios system as well. See here.

Side Note: GPT is more flexible, it can handle larger drives(>2TB) & more partitions compared to MBR.

A few things to remember:

  • Create a 512M efi partition, must be fat32, set the type to efi system using cfdisk
  • You can choose to create a separate home partion or just use a single one for both home and root. Here, I'll create a separate root partition, say 60G and the rest goes to the home partition.
  • I set up a 12G swap partition to properly support hibernation on my laptop, set the type to Linux swap here using cfdisk.

So the final setup looks something like this:

nvme0n1p1 512M (efi)
nvme0n1p2 60GB (root)
nvme0n1p3 12GB  (swap)
nvme0n1p4 remaining space (home)

Once you're done, exit cfdisk.

Formatting & Mounting Partitions

Now the installer will prompt you to format and mount the partions. Be careful to choose the right format for the right partition (for eg: the efi partition should be formatted in fat32)

| Partition  | Format | Description          | Mount Points      |
| :--------- | :----- | :------------------- | :---------------- |
| efi        | vfat   | FAT32                | /boot/efi         |
| root       | ext4   | Linux ext4 (journal) | /                 |
| swap       | swap   | Linux swap           |                   |
| home       | ext4   | Linux ext4 (journal) | /home             | #if using a separate home partition

At the end, you can review all your choices in the settings tab at the bottom, it'll show you what all choices you've made up to this point.

And that's pretty much it for the base installation! Now you can finally reboot and enter the void!


Installing other essentials

To get our system in a more usable state we'll need some more packages. I have a Ryzen 5 APU in my laptop which is why I've listed some AMD specific packages here. You don't need to install them if you don't have any AMD hardware.

Install the following packages: linux-firmware , mesa-dri, amdvlk, mesa-vulkan-radeon, xorg-minimal, xf86-video-amdgpu, xdg-user-dirs.

For video accelaration, install mesa-vaapi and mesa-vdpau. And oh, install bash-completion as well.

Note: Don't forget to have linux-firmware installed! It does not come preinstalled and caused me a lot of headache figuring why the wifi wasn't working.


Installing a desktop environment

I'll be installing gnome now. Some of you might wince in horror at the bloated blasphemy I'm about to commit but I like the vanilla gnome experience on void. It runs fast on modern hardware, comes with nice quality of life features & doesn't get in my way. Someday, I might finally make the leap and learn to use/configure something like dwm but right now I just want to get on with my life.

Install the gnome package for the gnome DE (for a very minimal gnome install, just get gnome-core but you'll need to install a lot of stuff manually. It's better to just install gnome & then remove a few unwanted apps that get installed in the process.)

Enable the gdm service: sudo ln -s /etc/sv/gdm /var/service

also enable the dbus service, sudo ln -s /etc/sv/dbus /var/service. This'll boot you straight in to gnome.

Gnome relies on network manager for internet, so enable the NetworkManager service, (disable any other network related services like dhcpcd and wpa_supplicant because they interfere with network manager)

sudo ln -s /etc/sv/NetworkManager/ /var/service/

To enable ssh on void linux, just run: sudo ln -s /etc/sv/sshd/ /var/service/


Extras/Misc.

If you're running a dualboot with windows and your pc just keeps directly booting into it. You need to change the boot priority to make the linux bootloader come first rather than the windows one. You can find this setting somewhere in the bios most likely.

Now, to add windows to the grub bootloader:

  1. Run os-prober to discover all other bootable os's.

  2. Remember the grub config file which lives at/etc/default/grub? You'll need to add the following line to it if it's not already there: GRUB_DISABLE_OS_PROBER=false. Make sure that its uncommented. Then run the command sudo update-grub to update/recreate your grub boot menu.

And that's finally it! You're all set up with void linux ready at your service!

desktop


linux

1038 Words

2022-03-07