adding void linux posts

This commit is contained in:
lee2sman 2022-10-28 02:56:29 -04:00
parent 420385c81b
commit b5b99c6caf
3 changed files with 219 additions and 0 deletions

View File

@ -25,6 +25,10 @@ This gemlog is best visited between 1am and 6am local time.
# Posts
=> installing-void.gmi 2022-10-28 - Notes on Installing Void Linux
=> void.gmi 2022-10-27 - Choosing Void Linux
=> magick.gmi 2022-09-06 - Basic image editing in the command line
=> trash.gmi 2022-08-07 - Trash rules everything around me

166
installing-void.gmi Normal file
View File

@ -0,0 +1,166 @@
# 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.
=> ./void.gmi Why Run 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:
* Dvorak keyboard, no qwerty
* simplest hard drive partitioning possible since this is new for me
* i3 window manager (plus dmenu, which comes with it)
* fish shell
### Documentation I referenced
=> https://docs.voidlinux.org/installation/live-images/guide.html Void Linux official install guide
=> http://www.troubleshooters.com/linux/void/quickinst.htm 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:
* did I have BIOS or UEFI?
* Lots of partitioning questions: how do I partition the drive? and how many gigabytes and what kind of partitions do I need? This was all pre-chosen for me when installing Ubuntu previously or even debian on a raspbprry pi.
* will I be able to get sound to work? (lots of people point out that it does not come preconfigured)
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.
=> https://voidbuilds.xyz 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.
```shell
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.
=> ./void.gmi Previously: Choosing Void Linux
=> ./index.gmi 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.

49
void.gmi Normal file
View File

@ -0,0 +1,49 @@
# Choosing Void Linux
2022-10-27
What follows is like one of those food articles you find on the internet when you're trying just to find a simple apple pie recipe but instead you find a 20 minute article about someone's grandmother's special childhood apple pie and lots of unnecessary detail. Feel free to skip down to the parts that seem relevant to you, if any :)
### Linux Background
My family bought a computer when I was in middle school and I used Mac computers for almost 2 decades. My intro to Linux came when I learned about the One Laptop Per Child computer project. This was the era of TED talks and such, and I got excited, and purchased one during their 'give one get one' campaign. These came out a few years after I graduated from college. Before actually trying one I was excited by the mission, and by the hardware itself. The OLPC XO-1 computers run SugarOS. In some ways it was a fun start to experimenting with tinkering on a computer. For example, I loved playing with Squeak (like Scratch), a smalltalk environment, I believe. I think this may have been when I first tried out the command line and did a short Python tutorial at the Machine Project DIY space in LA. But despite the computer's charm, the rubber OLPC keyboard broke quickly. Sugar didn't work super well for me. I couldn't get much use out of the computer with the software that was on it. It felt limited for making music or art. I tried out other Window Managers (Fluxbox) and even flashed Ubuntu on it. The computer's clock battery died. With my limited knowledge I lost interest and passed the computer on to someone else.
After this, I continued to mostly be a Mac user. But after I went back to grad school I saw various websites about Linux that piqued my interest again. Mac was no longer an underdog but a big corporate tool. I was interested in a free and more DIY system. I found some old computers in the trash at school, pulled them out and installed the Arch derivative Antergos OS. I ran it for about a year as a second computer to my Mac. I had issues with borking stuff when running updates occasionally. And the nail in the coffin was when they stopped supporting 32bit systems since that's what my system was. Over time I started using the command line on my Mac, and finding myself in the terminal a lot of the time. One of my professors gave me a copy of Neal Stephenson's "In the Beginning Was the Command Line" and I enjoyed it a ton. Around this time I realized I was spending most of my time either in a web browser or in the command line but I felt limited with the brew package manager on Mac. I was also getting more and more frustrated with the Mac ecosystem as a whole, so when I moved and got a job teaching I ditched the Mac entirely and switched fulltime to Linux. At school I got a Dell and first dual-booted Windows and Ubuntu on it but then switched to Ubuntu with Regolith (an Ubuntu with i3 desktop spin that I've written about previously).
I ran Debian on my Raspberry Pi's, but I never tried Debian unstable or testing repos previously. Earlier this year was announced Ubuntu Rolling Rhino, which is kind of a hack on top of Ubuntu to get these unstable rolling builds. But I've seen no longterm reports, so despite my interest, it seemed like I'd rather choose something that had more of a track record and community online if I get stuck.
As I spent more time working on Linux I began to understand better how distros differ. I found myself gravitating to certain preferences which included a large package repository. I also had certain interests in various kinds of computing minimalism, and over time became interested in trying out a distro that didn't use SystemD for its init system. I couldn't wrap my head around how Systemd worked, and I was interested in trying an init system that seemed more in keeping with the small interoperating Linux program philosophy.
I considered Devuan, the Systemd-less Debian distro, but while Debian was very functional for me, it lacked a certain fun factor for me, and I didn't know how well the testing repos would work for me. Alpine Linux I run virtualized on my iPad and iPhone, without a GUI. It's certainly interesting, using MUSL and Busybox, and OpenRC. But the repos are small, and the emphasis of the distro on stability and security feels more suited to servers than my own interest in desktop use.
I skipped Arch-derived Systemd-less distros like Artix just because I've already had an Arch experience. While I loved that any and all software was available in the aur community repos, things didn't always work for me and took numerous tinkering around when I used the Arch-derived distro previously. I'm sure with several more years of Linux experience now under my belt I could likely get things going a bit better, but I didn't necessarily feel a draw to 'the Arch way,' and the message boards and community around the distro don't particularly pull me in.
I also read reviews of Guix and Nix. These are rolling release and built around a package manager that makes it easier to reproduce your build systems and roll back upgrades if something breaks. But the reviews I read of both of these made it seem like they were fiddly and could use more refinement. I also read you can install nix as a secondary package manager on a Linux system, as a (better) alternative to snap or flatpack, so I could always install this on top of another distro if I so chose.
### Getting to Void
So that left Void, a distro I've long been interested in but was wary it wouldn't work for me. In fact, I'd tried installing it a year or so previous and had some success on my Raspberry Pi but I just tried running it off a prebuilt Rasberry Pi iso, which is no longer offered. Other smart people I know online have also have struggled with it, and even reading reviews on DistroWatch and listening to various Linux podcasts I've heard others run into issues. But many (though not all) folks who struggled at first and then eventually got it running said their experience after the install was great. So I thought I'd see if I could get it running. (Short answer: yes)
Here's what interested me in Void Linux:
* rolling-release packages but fairly stable nonetheless
* not having to build software from source every time (this ruled out Gentoo and Kiss Linux for example)
* a non-Systemd init system
* 'minimal' defaults with ability to customize
Void stuck out to me due to some of its unique choices (custom package manager), its smaller but seemingly fairly active and what I hope is a (mostly) polite community, and the choice to use the simple runit init system. I was interested in trying out xbps. I believe this unique package manager came first, and then the rest of the parts of Void were built around it. I lurked on the subreddit for Void (as well as Kiss Linux when I was comparing) for a few months, reading and watching reviews, and I read through install tutorials and documentation.
The official Void downloads include base installs, and versions with various desktop environments prepackaged. But they don't have an i3 version, my preferred window manager, so I used a premade iso that I downloaded from voidbuilds.xyz with i3 instead of just the base. In addition to basic i3 packages it comes with a variety of other basic packages including nano, wget, git, qutebrowser, gnome-keyring, adwaita icons, alsa/pulseaudio, xterm, flatpak, pipewire, midnight commander, i3blocks, basic fonts, xrandr and some grub settings, among a few other things.
=> https://voidbuilds.xyz/package_lists/i3-x64.packages.txt Voidbuilds i3 package list
The main idea is that you do pretty much everything exactly the same as a regular install, but this will have i3 pre-installed (and a number of other programs) so you won't need to install it, and you'll just update them with the regular updating process after install.
In the next post I'll go step by step (mostly) through the install process.
=> ./installing-void.gmi Next: Notes on Installing Void Linux
=> ./index.gmi back to index
---
To leave a comment send an email to lettuce at the current domain. You should put comment in the subject line, the name of the post and specify what name you'd like listed for your comment.