BSD notes


OpenBSD is a dream of me (I don’t know why yet) but it is hard to get to dualboot. The first post solves it via UEFI boot and the second with a pre-created partition

# After installation commands in order

dhclient em0 # LAN connect
fw_update # update firmware
pkg_add -Uu # update packages
sysmerge -d
pkg_add vim tmux lynx dmenu firefox audacious cmus emacs hugo tor-browser transmission

# for xfce
pkg_add xfce xfce-extras xfce-power-manager upower xfce4-xkbd

rcctl enable apmd
rcctl set apmd flags -A # use apm to show battery state
rcctl start apmd
rcctl enable messagebus
rcctl start messagebus

vi ~/.xsession
startxfce4 --with-ck-launch # or enter whichever desktop command eg. cwm

# for xenodm display manager
rcctl enable xenodm
rcctl start xenodm

usermod -G staff nick

# doas config
vi /etc/doas.conf
permit persist nick
permit nopass nick as root cmd mount
permit nopass nick as root cmd umount
permit nopass nick as root cmd ntfs-3g
permit nopass nick as root cmd reboot
permit nopass nick as root cmd shutdown

# commands
zzz #suspend

# mount usb flash drive
sysctl hw.disknames
disklabel sd2
mount /dev/sd2i /mnt/usb


Commands to setup the system after installation

Used youtube freeBSD installation videos:

Rest of commands

freebsd-update fetch install
pkg update
pkg upgrade
pkg install sudo
visudo (uncomment line #%wheel...)
pkg install xorg dbus
sysrc dbus_enable="YES"
sysrc moused_enable="YES"
service dbus start
service moused start
dbus-uuidgen > /etc/machine-id (I don't know why)

Install Desktop (xfce)

pkg install xfce
sysrc hald_enable="YES"
vi .xinitrc (for each user you want startx to open xfce)
    add the line "exec xfce4-session"

Install Intel GPU Drivers

pkg install drm-kmod
vi /etc/rc.conf
  add the line -->  kld_list="/boot/modules/i915kms.ko"
sudo pw groupmod video -m nick

Other things to read