Installation and Setup
So I downloaded the media and reviewed the instructions here: https://www.openbsd.org/faq/faq4.html#Overview
At first, I downloaded install61.iso to load to a usb drive. However, my work laptop has a no-usb-flash-drive group policy and … well, I didn’t feel like getting up and walking across the room to my primary Linux workstation. So (and admittedly, I don’t know a lot about ISO vs FS file system stuff), I used ‘dd’ to load the ISO onto a USB.
This didn’t work. Unrecognized filesystem and whatever else. So I went back and reread the faq linked above and consulted the “Flash drives” section. Particularly, the “a bootable USB flash drive can be created by attaching the target device and copying over the image with dd(1)“. The example specifically listed the install61.fs file.
This did work. So – probably good advice to read the directions carefully.
I used default partitioning.
$ df -h Filesystem Size Used Avail Capacity Mounted on /dev/sd0a 1005M 62.3M 892M 7% / /dev/sd0k 298G 14.1M 283G 0% /home /dev/sd0d 3.9G 14.0K 3.7G 0% /tmp /dev/sd0f 2.0G 347M 1.5G 18% /usr /dev/sd0g 1005M 177M 778M 19% /usr/X11R6 /dev/sd0h 9.8G 139M 9.2G 1% /usr/local /dev/sd0j 2.0G 2.0K 1.9G 0% /usr/obj /dev/sd0i 2.0G 870M 1.0G 45% /usr/src /dev/sd0e 11.7G 8.1M 11.1G 0% /var $
I also installed the complete file set (as per the recommendation).
The installer was ridiculously easy and at the end of the day, I’ve got a OpenBSD system booted.
One of the first things I wanted to do was ensure that, at the very least, I could get a development environment operational to justify (at least to some small degree) the existence of this computer. So – What does this mean for me? It means Python, Vim, and some basic utilities. Let’s look at how the installation went.
Well, pkg_add didn’t work out of the box because I installed everything from media, and so the default mirror information wasn’t set for me. I checked out the “installurl” man page and found that I needed to add a mirror to /etc/installurl file before pkg_add (and family) would work. I added a single line to that file:
After this was configured, I was able to very easily install some basic tools that I need. Specifically:
- vim (pkg_add vim-8.0.0388-no_x11-perl-python3-ruby)
- colorls (pkg_add colorls)
- git (pkg_add git-2.12.2)
- curl (pkg_add curl-7.53.1)
- python (pkg_add python-3.6.0p0)
There were some pieces of software that weren’t in the pkg repository and so I installed them manually. They included:
- pip — package manager for python
- pathogen — runtime path manager for vim (makes jedi-vim easier to install)
- jedi — required library for jedi-vim (“pip install jedi”)
- jedi-vim — used for autocomplete in python
- jpterm — used for testing/writing jmespath expressions (“pip install jmespath-terminal”)
At this point I’ve got a usable system for programming and continuing to learn OpenBSD. The one outstanding annoyance is that I don’t yet fully understand terminal types and, consequently when I connect either via the console or via a ssh session (mostly using putty from my Windows 7 work laptop) – I get the following:
These look terrible. In /etc/ttys, all of the terminals are defined at vt220. So what’s the deal? I have found that if I start tmux with “tmux -u2” (to support UTF-8 and 256 colors), then tmux renders correctly. And more interestingly, I found that if I change this setting:
Then my screens look correct:
So – I probably need to spend some time understanding the terminal types and maybe putty (I saw on stack overflow that putty may have a bug(?)). Keep in mind the console still renders with the ‘q’ / ‘m’ for lines. As I work through that problem, I’ll post my results here.