Technology & Life

Summary
Notes on setting up OpenBSD on my T60
Published
Updated
Reading time
3 min
Tags
,

These notes are old now and were for a specific version of OpenBSD (7.4), but they should be broadly applicable.

First, we can make our own softraid volume (before it became integrated into the installer):

cd /dev
sh MAKEDEV sd0 sd1 sd2 sd3 sd4
cd ..
bioctl -c C -l /dev/sd0a softraid0
# crypto attached as sdx
dd if=/dev/zero of=/dev/sdx bs=1m count=1
install

You may also want to ftp SHA256.sig from a mirror to your install media to verify the install media.

mount -uo rw /mnt2
cd /mnt2/..
ftp https://cdn.openbsd.org/pub/OpenBSD/7.4/amd64/SHA256.sig

syspatch
echo 'permit persist :wheel' >> /etc/doas.conf
echo 'hw.smt=1' >> /etc/sysctl.conf
echo 'keyboard.bell.volume=0' > /etc/wsconsctl.conf
echo '-inet6\nup' > /etc/hostname.lo0
echo 'kern.utc_offset=-300' >> /etc/sysctl.conf # -300 is CDT
rcctl enable apmd
rcctl disable slaacd

echo 'permit nopass keepenv cosmic as root' > /etc/doas.conf

pkg_add freerdp chromium firefox rsync colorls htop neofetch zip unzip leafpad

Alternative simple text editor is nedit but it looks very dated.

~/.profile:

HISTFILE=/home/cosmic/.kshhistory
HISTSIZE=2000

export TERM=xterm-256color

~/.xsession:

# black background
xsetroot -solid black

# disable xterm noise
xset b off
xset b 0 0 0

# show clock
xclock \
-geometry -0+0 \
-digital \
-update 1 \
-padding 10 \
-fg white \
-bg black \
-strftime "%a %b %d, %Y %H:%M:%S" &

exec cwm

~/.Xdefaults:

xterm*loginShell: true
xterm*background: black
xterm*foreground: white

xterm*rightScrollBar: true
xterm*ScrollBar: true
xterm*scrollTtyOutput: false
xterm*loginshell: true
xterm*savelines: 16384

rdp.sh:

# High DPI:
# xfreerdp /f /v:hostname /scale:180 /scale-desktop:200 >/dev/null 2>&1

# Normal DPI:
xfreerdp /f /v:hostname >/dev/null 2>&1

mg /etc/X11/xenodm/Xsetup_0

Add ${exec_prefix}/bin/xsetroot -solid black and comment out the original xsetroot line

Simply comment out the line that starts xconsole.

Commenting out lines 26-30 in the /etc/X11/xenodm/Xsession stopped ssh-askpass from running, which was unnecessary for my use case.

I just changed the if statement on line 26 of /etc/X11/xenodm/Xsession to if false, like this:

if false # [ -z "$SSH_AGENT_PID" ] && [ -x /usr/bin/ssh-agent ]

Add your message to /etc/motd:

(sysctl -n kern.version | head -n 1; echo '\nPLACE MOTD HERE.\n') | tee /etc/motd

Back to top ↑