GNU/Linux User Group


Blog: OpenBSD First Impressions

Ben - Nov 29, 2022

After an unexpected issue arose with my SSD, I had to upgrade it over break, which was an excuse to try out another operating system. I had already used a number of different GNU/Linux distros in the past (Debian, NixOS, Devuan, Arch, CRUX, …) so, true to the manic energy that’s essential to the art of distro-hopping, I decided that this time I wasn’t even going to install GNU/Linux.

After looking around on Wikipedia, I decided to try installing OpenBSD. To a devoted GNU/Linux user such as myself, it sounded exciting and exotic — after all, their logo is a pufferfish, with a human face! How weird is that?

Installation

Installing operating systems is fun because there’s a sort of clandestine feeling to it, as if you’re hacking into the machine (not too far from the truth) or performing a sketchy surgery. I set up the usual equipment (bootable USB, ethernet cable, big can of Thai tea), put on some rock music, and got to work.

Of course, I messed up the installation quite a few times, so my process changed gradually with each new attempt. Before going on, I’ll note that there were only really two resources that I needed to use for the working installation:

Those pages said pretty much everything, so go check them out if you want detailed commands and all that. I won’t go into those details in this post.

The installer is pretty bare-bones, and mostly just prompts you to select options for wifi, mirrors, partition schemes, etc. You can also enter ! to drop into a shell, which I did at the beginning, in order to do full-disk encryption with RAID. It took several hours to overwrite the SSD with random data, so I ended up going to bed in the middle of that part.

Aside from encryption, my use-case was pretty simple; I just wanted to have OpenBSD as my “daily driver,” so I needed a network connection, a graphical environment, etc, which the installer made very easy. One thing that messed me up a couple times was that I wrote to the wrong drive in various steps, so sometimes the bootable USB got screwed up and I had to dd the ISO again. But eventually, I finished installing and proceeded to get my usual workflow set up.

Oops

After installing lots of packages and making customizations, I copied my backed-up data onto the new drive. Unfortunately, I made a rookie mistake: the backed-up data needed its permissions adjusted, and at some point I screwed up a chown -R command, and ended up making my non-root user have ownership of almost everything on the system.

As a result, basic things like doas and su got broken, and it wasn’t long before other parts of the system began to fail. Though I was trying to manually fix permissions, this became too much to handle, and I had to reinstall everything, which took a few more hours. After that, things have been working fine, and hopefully I’ll continue to steer clear of catastrophic errors.

Filesystems

One of the most immediate differences between OpenBSD and GNU/Linux is that filesystems are handled differently. OpenBSD has its own scheme for naming partitions (usually something like sdNX, where N is a number and X is a letter). When mounting external media, the convention seems to be that you mount the i partition. As it turns out, OpenBSD is generally pretty picky about mounting, because it can’t fully handle ext4 or things like LUKS.

Documentation

The quality of documentation on OpenBSD is stellar. It was hard to search for OpenBSD-related tutorials on the internet, and I came to realize that most of my questions could be answered by just reading the man pages. The man pages are extremely well-written compared to on GNU/Linux, where many programs aren’t even fully documented.

In general, there’s less software available on OpenBSD, but what is available is quite simple to use, and cooperates well with other programs. Things are cleaner and more consistent than on most GNU/Linux systems.

Desktop

Most screenshots of OpenBSD (outside of ricing threads anyway) show a homely, 90s-looking desktop environment. This is indeed what’s installed by default; but since OpenBSD uses X11, it’s possible to install most of the window managers available on GNU/Linux. I compiled and set up stumpwm without too much trouble, and was able to get my system to look exactly like it did when I was running Devuan.

Wifi

OpenBSD uses ifconfig for wifi, and drivers are available for common types of network adapters. I’ve had success connecting to public networks as well as ones that use WPA, but WPA-EAP is difficult. There are actually a decent number of tutorials on how to connect to WPA-EAP networks (wpa_supplicant is required in addition to ifconfig) and I was able to connect to one today for a brief period of time. However, I still haven’t gotten it to work perfectly.

Other quirky things

feh

The default keybindings for feh(1), an image viewer, set d to delete the current image. d is usually configured to display the image’s name, so this was a nasty surprise; although I just had to edit /etc/feh/keys once it became apparent what was wrong.

doas

A command called doas is used to run things as root (and as other users). After installation, you have to configure doas, otherwise users in wheel won’t be able to run it. There’s also su which does sort of similar.

CPU

Part of OpenBSD’s selling point aesthetic is security. In fact, one of the security measures is that some type of CPU multithreading is disabled by default; it was startling to see htop say that two CPUs were offline, but that’s why, apparently. I had to use an interesting system configuration command called sysctl to find and reconfigure this setting. Now my system is open to more vulnerabilities, but if Theo de Raadt wants to personally fly over to my house and beat me over the head with a 2x4, he’ll have to pay a lot of money for plane tickets. I think I’m safe for now.

Web browsers

Initially I used firefox, because the browser I used to use (librewolf) doesn’t have an actively maintained package for OpenBSD. firefox is pretty locked down by default, for security reasons: it can’t read or write to most directories unless you change the security configuration, and it seems to get killed after using up too many system resources. This prompted me to search for other browsers, and I ended up settling on qutebrowser for general-purpose stuff. I still use firefox for critical things, in order to avoid website compatibility issues, and so far it hasn’t crashed or done anything weird in several days.

The End

OpenBSD is an interesting OS, and I’m not sure how long I’ll stick with it. There are definitely benefits and drawbacks compared to GNU/Linux, but it can accomplish most of the same things. Maybe I’ll post more about it later; but for now, I’m just having fun and hoping things don’t break.


© 2020-2024 GNU/Linux User Group
Unless otherwise noted, content is under a CC BY 4.0 license.
Source code is available here under a GPLv3 license.