well, here's another blog post from myself. this time: openbsd on a virtual machine!!! it's uncompatible with my main laptop, i tried once but uh, it's generally a mess, missing drivers, hardware not detected and so on.
so i decided to make an install tutorial for openbsd, in this case the 7.6 version, because my artix system's messed up and it doesn't want to update, therefore virt-manager will report 'openbsd 7.6 (openbsd7.6)' if i try to select it, so, whatever, idk.
first create a new vm, give the version, ram, processors and basically resources and stuff like that.
then when it's booted, press 'I' to begin. choose the keyboard layout, in this case, 'es'.
then enter a hostname, then configure the network. for virtio networking it's gonna be 'vio0', so, enter, and press enter again on 'autoconf', then press again when 'none' pops up, then on 'done', again.
set the root password two times, enable sshd if you want, then it asks you for the x window system, press enter if you will run it, otherwise, enter 'no'.
when it asks for changing the default console, press enter on 'no', then enter a lowercase user, full name for it, set up a password, then enable/disable root ssh login if you want.
set the timezone, e.g. 'America/Montevideo'. then press enter on sd0 (sata disk no 0). enable encryption if you want, or just straight 'no'.
enter the disk label, in this case is generic bios/mbr, so i press 'W', and then it asks for a layout, so i press 'a' (automatic layout), you can customize it of course.
then when it asks you for the sets enter 'cd0' (it'll differ if you are using a usb drive, but since this is a vm...), then enter the path (7.6/amd64) by default.
then 'yes' on 'continue without verification'.
enter 'reboot' when done, then just let the installer reboot the machine.
so your new openbsd installation will be quite minimal, so you'll definitely need some packages installed.
let's get started.
you may now login as root in the prompt.
then you need a couple of things to get dwm and related stuff running.
the package manager of openbsd is called 'pkg_add(1)', so you'll grab your stuff from there.
first update the package database:
pkg_add -u
then install git, your text editor of choice. and also we'll need xorg, and *most important package here* your graphics card driver, in my case, red hat's qxl.
regarding the editor, we'll use vim here:
pkg_add git vim xorg xf86-video-qxl
then you need to clone suckless's dwm, i recommend you log out of root and log back in with your user, and use the doas(1) utility to compile. we'll discuss this later. you probably also need libx11, libxinerama and libxft installed in order to properly compile suckless programs.
clone the suckless's dwm repo:
git clone http://git.suckless.org/dwm
enter the 'dwm' directory, edit 'config.mk' to match your system's directory hierarchy, and run:
make && doas make clean install
then edit the generated config.h:
vim config.h
and recompile.
do the same thing for dmenu, st and related tools.
now create a file called .xinitrc, like this:
echo setxkbmap es \& > .xinitrc
echo exec dwm >> .xinitrc
obviously, replace 'es' with your x keyboard layout of choice. at this point, we'll pretty much set, so, fire up x:
startx
and x should parse your .xinitrc and initialize correctly. if not, check your syntax, and remember, if x doesn't start, exec <your de/wm startup binary here> should be the last line in it, because exec replaces your shell's process with whatever you put in it.
and that's about it, hope it has been useful, see ya next time! <3