General notes on the puffy fish OS

OpenBSD

OpenBSD is a free and open-source UNIX-like BSD-based operating system focused on proactive security.

Basic usage

Package manager

pkg_info returns informations on a given package. The -Q option will query a list of package containing those characters.

# pkg_info firefox
# pkg_info -Q firefox

To install a package, use pkg_add. The -u option will update every packages or a given one.

# pkg_add vim
# pkg_add -u vim
# pkg_add -u

openbsd flavors

-release
The version that you downloaded from their homepage, two releases per year, every six months.
-stable
Fixes added to -release.
-current
The development version, with the latest fixes and features.

It is recommended to follow -stable or -current if patches matters. To follow the ‑stable flavor, you have to use syspatch. But you can’t install patches independently.

# #install patches
# syspatch

# #revert to -release
# syspatch -R

# #revert the last installed patch
# syspatch -r

To follow -current, the sysupgrade command is the way to go since OpenBSD 6.6.

# sysupgrade -s

Setting up vmm/vmd

vmm/vmd are the de facto utilities to run virtual machines. vmctl allows the user to control their virtual machines.

The following part is borrowed from Sigrid’s notes.

Edit /etc/vm.conf, /etc/hostname.vether0 and /etc/hostname.bridge0.

vm "9front" {
	disable
	memory 2048
	disk "/home/ftrvx/v/9front.qcow2"
	#cdrom "/home/ftrvx/v/9front.iso"
	owner $USER
	interface {
		lladdr 52:54:00:00:EE:03
		switch "uplink"
	}
}

vm "alpine" {
        disable
        memory 2048M
        disk "/home/$USER/var/vm/alpine.qcow2"
        #cdrom "/home/$USER/var/vm/alpine-virt-x86_64.iso"
        owner $USER
        interface {
                lladdr 52:54:00:00:EE:04
                switch "uplink"
        }
}

switch "uplink" {
	interface bridge0
}
fig. Content of /etc/vm.conf
inet 10.0.2.1/24
up
fig. Content of /etc/hostname.vether0
inet 10.0.2.1/24
up
fig. Content of /etc/hostname.bridge0

The configuration will work at next boot, or, if you have to test it right now, run:

# sh /etc/netstart vether0
# sh /etc/netstart bridge0

Configure 9front

Your plan9.ini won't work as intended with vmm.

It can be edited if you press Enter before 9front’s kernel is loaded.

Set console=0 at the prompt and then type boot to load the kernel with your modifications.

Once you are set, edit plan9.ini with ed or sam.

% 9fs 9fat
% sam -d /n/9fat/plan9.ini

Mine looks like this:

bootfile=9pc
nobootprompt=local!/dev/sdF0/fs -m 192 -A -a tcp!*!564
mouseport=ps2intellimouse
monitor=none
console=0
service=cpu

Your 9front can be launched with vmctl and you can use it with drawterm.

$ vmctl start 9front
$ vmctl stop 9front
$ drawterm -a 10.0.2.2 -h 10.0.2.2 -u glenda

$ #if you need a console
$ vmctl start -c 9front

openbsd links

Questions or corrections? Send an email to roy@royniang.com.

9 incoming links

9gridchan cpu auth cpu auth alpine git computer miminaga nejishiki oyabun

Updates


Last update on 20V13, edited 4 times (+10/27fh).

20O07
Installed OpenBSD on Thinkpad
20O01
Dualboot OpenBSD on MacBook