💾 Archived View for gemini.ctrl-c.club › ~lettuce › installing-void.gmi captured on 2023-07-22 at 16:53:03. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Notes on Installing Void Linux

2022-10-28

This is part 2 on selecting, installing and running Void Linux. This is definitely only reading for a particular niche audience. You have been warned.

Part 1 contains info on my own entry and background in Linux and how I ended up getting to Void.

Choosing Void Linux

In this tutorial, I'll go through my install of Void on physical hardware. There are a number of other Void Linux install tutorials on YouTube and as articles. I linked to the one I found most useful below. I add my own notes here not to duplicate others' efforts but to document my own particular niche install needs since this info is not available in a single place elsewhere.

My bare minimum goals for this Void installation:

Documentation I referenced

Void Linux official install guide

Quick and Reliable Void Linux Installation

High level install process explained

Here's the main idea when installing Void Linux: You download an iso file. You have several official (and unofficial) options that come packaged with or without a window manager. You download this to a disk, real or virtual, then start up the machine running it instead of your previous OS. This launches you into the most minimalist of minimal systems, running Void Linux off that disk. Then you run void-installer in the command line as root to walk through the steps to write your new Void system onto your hard drive, virtual or physical depending on whether you're doing this in virtual machine or on actual physical hardware.

The install system is a text user interface program that has you run through various basic tasks. There are a few bugs of note unfortunately in this process. In any case, you choose your language (which takes no effect, a bug!), timezone, etc and then choose how to partition your hard drive, and where to mount the file system (sounds harder than it is). If all goes well, you 'burn' this to disk, reboot your computer, pull out the USB (or DVD) install disk, and cross your fingers until your new Void system boots up. When it boots up you have an extremely minimal environment and you need to configure it by updating the system, choosing your preferred keyboard, downloading needed software, terminal, fonts, shell, etc.

That's the main overview.

The tricky bits

Doing one of these 'minimal' installs has a few parts that felt intimidating to me previously, which is why I had never tried it before:

Well this is just to say: I figured this stuff out. It's not too bad. I made some mistakes. But nothing was permanently messed up. And I learned a lot and know how to do this now.

The actual steps to install

I knew I wanted i3 window manager and glibc (the mainstream C library, so more software is immediately available). The Void maintainers have many different varieties of Void packaged for download, but not one with i3. I decided to download an unofficial build of Void linux with i3 instead of doing a base minimal install and adding i3 myself afterwards.

Void Builds

After downloading the voidlinux iso with i3 and glibc I unzipped it. I used balena-etcher software to select the iso I downloaded and write it to a USB. While that was running I started up the computer I was going to install Void on. I pressed F2 (differs on various computers) and selected BIOS setup. I made sure legacy boot was on instead of UEFI. I turned secureboot off. There are many other options available but these were the things I needed to set up.

Next I took the USB with the Void iso written to it. I plugged it into my computer waiting to receive it. I rebooted and pressed F12 (differs by computer) and selected to boot from the USB, using 'legacy' BIOS not UEFI. Within a few seconds Void's logo flashes and Void starts up, running off the usb. Since I chose an i3 version the i3 setup wizard appears. I press down to select Alt as my mod key. There's nothing to see after this. In i3 we launch the terminal with Alt + Enter. I'm a dvorak keyboard user and don't have any keyboard setup qwerty and can't touch-type qwerty, so I needed to switch from the default qwerty. In the terminal I typed: ```setxkbmap dvorak```. This will temporarily switch to Dvorak for this session only. With that out of the way it's time to run the installer.

Void's installer is a Curses-based (text) TUI program. You go step by step down a menu of text dialog boxes, making choices. I won't go through all of these in detail because I think the choices are relatively obvious. For example, first you pick your keyboard, then you pick your timezone/locale, your country, etc.

For more excruciatingly detailed step by step directions use the Void handbook or the tutorial I linked to above.

Type void-installer to launch it. The first setting is keyboard. I opened it and chose ANSI-Dvorak but as previously mentioned it takes no effect whatsoever.

I keep running down the installer, doing each step top to bottom. The second menu item is the network. It will launch a terminal program to test your network. If you're plugged into ethernet it will confirm the network is configured properly. If you need wifi, oh no, let's set it up. Like above, we need to switch to a Terminal and configure wifi. Mod + Enter launches another terminal, type ```nmcli dev wifi connect "your network name" password "your wifi password"```. Then it should confirm, or else try again. Exit that terminal by typing exit or quitting with Ctrl-Shift-Q (in i3).

Go back to the installer menu. Confirm your network internet is working. After selecting locale and timezone, you also choose source. I did local disk install. I created a root password, then a new user and password for my username. When it asks me to pick a group membership I hit enter to accept the defaults (such as wheel, audio, etc).

The areas I had the most questions around were the bootloader and how to partition my computer. For bootloader, select the hard drive you're installing to (hint: it's not the USB drive that's stuck in). You can say yes to wanting a graphic terminal for GRUB.

Now we get to partitioning. This messed me up before I understood what I was doing. Now that I understand it, it's not bad at all. But this part is confusing in the installer as the installer shows old partition stats if you had a partitioned disk previously not a new hard drive. So instead of using it (since it shows the old info), I actually switch to a different workspace again and launch another terminal. Launch ```cfdisk -z``` to open the cfdisk program with no assumed previous partitioning. For BIOS, choose dos. We'll make two partitions. Step by step:

1. Make a new partition. This will be my "swap." For this first partition I typed in a size of 18G (aka 8GB) since my alienware has 12GB ram and the recommended amount from the Void installer tutorial for this size is 1.5 times the amount of RAM you have.

2. Then I selected to make this primary.

3. I changed its type to Linux Swap (82 in the list).

4. Press down and choose new partition again for the second (and final partition). I allowed it to use all remaining GB of the drive, the default for its size.

5. I chose to make this partition primary as well.

6. Change its type to Linux (83). Now highlight this second partition (press down if you need to, to get to /dev/sda2, and select to make it bootable. A little star * appears in the bootable column.

7. Finally, select write to write this to disk and then select to quit.

8. Now we switch back to the installer. If you were in another workspace you can choose Mod + 1 to move back. In the installer select filesystems. Highlight /dev/sda1 our swap, select SWAP, press OK and enter to format it.

9. Then move down and highlight /dev/sda2 our main drive and select ext4 for its type and OK and press enter. Tell the program to mount it at / (the root). Confirm "yes" you want to write. Navigate to "back" to exit this area.

10. Choose install and wait a few minutes. This took less than 3 minutes on my system but it could take perhaps up to 10 minutes depending on the speed of your hardware. When done choose **back** to exit and then in a terminal type ```poweroff```.

11. Yank out the USB. Cross your fingers. Turn the computer back on and hopefully your new Void system turns on. You'll be greeted by the login screen (which is in qwerty again, oy vay, last time). Type your password in qwerty just this one time and hit enter. You'll be greeted by the i3 config wizard again so press down to select alt key for mod if that's your choice. And now you're in your new void system.

Immediately after install

After install I launched my new system.

One last time launch the terminal with mod+return and run the following command to switch to Dvorak for this session. We'll make it permanent in a moment.

setxkbmap dvorak

Okay, let's make it permanent. When I was confused why setting ANSI-Dvorak hadn't changed anything, I posted a question about it on the Voidlinux reddit and got some immediate anwers. One person told me to create a file dvorak.conf and put it inside /etc/X11/xorg.conf.d/ I had to create the directory first and then I launched vim and saved this file.

Section "InputClass"
Identifier "Keyboard"
Option "XxbLayout" "us"
Option "XkbModel" "pc105"
Option "XkbVariant" "dvorak"
EndSection

Then I updated the system packages:

sudo xbps-install -Su

I ran this twice to make sure I had updated xbps-install and then all the packages I had in the base unoffical i3 install system (which I believe are built nightly). To be safe, you can run this command a few times!

Next I added the non-free repos so I have access to that software as well:

sudo xbps-install void-repo-nonfree void-repo-multilib-nonfree

As mentioned, xbps is the package manager on Void. It's a series of multiple programs for install, querying, removing, etc, each with their own minor differences. I wanted a single easier-to-type command since I kept mistyping xbps and then having to look up update, install, search flags, etc.

sudo xbps-install vpm

I installed an alternative wrapper around the package manager that simplifies commands for noobs. It's called vpm, seemingly standing for 'void package manager'. Like everything else on Void, it takes a split second to install. It's really noticeable how much faster Void is than Debian's apt repositories and package manager for example.

The vpm commands are:

vpm update
vpm install package-name
vpm remove package-name
vpm search package-name
vpm list
vpm cleanup

There are more commands than this but these are what I use most of the time. vpm will always show you the underlying xbps alias command that it's running and then the output. So it's possible I may commit the original xbps commands to memory and switch back at some point from using vpm.

You prepend vpm commands with sudo. Or switch for this session with ```sudo su```.

Here's some of the starter programs I installed, keeping in mind that alsa, git and a bunch of other programs were pre-installed in my unofficial build. This is in alphabetical order. You may need to scroll:

vpm install terminology busybox cool-retro-term cowsay ffmpeg fff feh fish-shell firefox gnome-screenshot lua luarocks mplayer neofetch neovim nnn pyradio sox vlc w3m w3m-img tldr pandoc

If I'm not mistaken, qutebrowser came pre-installed, along with git, python, qt, and many other useful programs. If you don't want anything preinstalled, use a minimal install iso. I'm already noticing some advantages over my Ubuntu install with fff, nnn, and pyradio being available since I had to build them from source on Ubuntu, and firefox was a simple install away versus Ubuntu that forces it packaged as a snap build even though you download from the apt repository, requiring a hack workaround to prevent the crappy snap build from re-installing. An aside: the snap build of Firefox is slow to launch (over 10 seconds), and when saving from snap it defaults to a generic downloads folder and has to be reset every time, requiring a number of mouse clicks. Decisions like this from the Ubuntu team are yet another reason why I appreciate the sane minimal consistent defaults made by the Void dev team.

My next step after initial setup was to download my dotfiles from github. I pulled my i3 config down and used that. I specified the terminology terminal instead of the default terminal xterm for example. I also pulled down a folder of images and had the feh program set my desktop background image.

Lastly, I changed my default shell from the default dash to fish. Since I had installed fish now I had to run:

chsh -s $(which fish)

The next time I restart the computer that would be the default shell.

Though I was on Void rather than Ubuntu the consistency of i3 meant the launching of programs worked pretty much the same as my Ubuntu laptop with i3 (running Regolith, which prepackages good i3 defaults on Ubuntu).

Beyond the difference of xbps versus apt, a lot of things just felt about the same as my typical Ubuntu with i3 experience so far, and that's good. Despite the change from an LTS distro to rolling release, a different init system, and package manager the most immediate thing I notice was how blazing fast the system is both installing and launching programs, and for some of the additional and more recent packages I was able to find in void that were missing from the Ubuntu repos.

That speed and the variety of software available in the void repos, plus the ability to use xbps-source to package my own programs and the welcoming void community means it feels like a good system to try for a while. I'll continue to use this for a while and possibly post an update if I have more to share.

Previously: Choosing Void Linux

Back to index

---

You can leave a comment by emailing lettuce at the current domain. Put comment in the subject line and list what name you'd like posted with your comment.