Setting up OpenBSD 7.4 on my Thinkpad T60
These notes are old now and were for a specific version of OpenBSD (7.4), but they should be broadly applicable.
Initial setup
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
Post install
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
Setup doas
echo 'permit nopass keepenv cosmic as root' > /etc/doas.conf
Get some packages
pkg_add freerdp chromium firefox rsync colorls htop neofetch zip unzip leafpad
Alternative simple text editor is nedit but it looks very dated.
Setup ksh profile
~/.profile:
HISTFILE=/home/cosmic/.kshhistory
HISTSIZE=2000
export TERM=xterm-256color
Set your .xsession file
~/.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
Setup xterm
~/.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
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
Edit the login screen and disable xconsole on boot
mg /etc/X11/xenodm/Xsetup_0
Set black login background
Add ${exec_prefix}/bin/xsetroot -solid black and comment out the original xsetroot line
Disable xconsole
Simply comment out the line that starts xconsole.
Disable private key prompt at login
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 ]
Update message of the day
Add your message to /etc/motd:
(sysctl -n kern.version | head -n 1; echo '\nPLACE MOTD HERE.\n') | tee /etc/motd