openbsd
setting up new system
pre install
- softraid encryption with keydisk
- select
(S)hell
from install menucd /dev && sh MAKEDEV sd0 dd if=/dev/urandom of=/dev/rsd0c bs=1m fdisk -iy sd0 #mbr disklabel -E sd0 Label editor (enter '?' for help at any prompt) sd0> a a offset: [64] size: [976773104] * FS type: [4.2BSD] RAID sd0*> w sd0> q No label changes. sh MAKEDEV sd2 #keydisk dd if=/dev/urandom of=/dev/rsd0c bs=1m fdisk -iy sd2 #mbr disklabel -E sd2 Label editor (enter '?' for help at any prompt) sd2> a a offset: [64] 31205376 #total - 2048 size: [2048] 1024 FS type: [4.2BSD] RAID sd2*> w sd2> a b offset: [64] 31206400 #total - 1024 size: [1024] * fs type: [swap] RAID sd2*> w sd2> a i offset: [64] size: [31205312] * fs type: [swap] msdos sd2*> w sd2> q No label changes. bioctl -c C -k sd2a -l sd0a softraid0 sh MAKEDEV sd3 #softraid dd if=/dev/zero of=/dev/rsd3c bs=1m count=1 exit
- continue with [installation][], selecting softraid disk (
sd3
) for install
post install
echo "permit nopass <username> > /etc/doas.conf
doas pkg_add -u
doas pkg_add \
git \
vim \
herbstluftwm \
rxvt-unicode \
stow \
zsh \
unclutter \
xbindkeys \
keychain \
dmenu \
gnupg \
irssi \
qutebrowser \
sacc \
xcape \
mpv \
wget \
mosh \
clipmenu
doas ln -s /usr/local/bin/zsh /usr/bin/zsh
git clone git://git.pyratebeard.net/dotfiles.git dot
cd dot
stow *
mkdir ~/.fonts
cd ~/.fonts
wget https://pyratebeard.net/trigon-font/trigon8x15r.bdf
# cp .xinitrc to .xsession
doas chsh pyratebeard
# urxvt LANG
mkdir lib src/warez tmp var
changes to dotfiles
- herbstluftwm needs to use bash not sh
- gpg-agent pinentry path
- ls(1) has no color option
wifi
on arch
lftp "http://firmware.openbsd.org/firmware/7.2/" cd ok, cwd=/firmware/7.2 lftp firmware.openbsd.org:/firmware/7.2> mget * 69709649 bytes transferred in 124 seconds (549.2 KiB/s) Total 26 files transferred lftp firmware.openbsd.org:/firmware/7.2> quit quit cd ../ tar czf ./firmware.tgz openbsd_firmware scp firmware.tgz laptop:
in openbsd
tar xzf firmware.tgz doas fw_update -p openbsd_firmware/ doas vi /etc/hostname.iwm0 join "<ssid>" wpakey "<password>" #join "<ssid>" wpakey "<password>" #join "<ssid>" wpakey "<password>" inet autoconf doas sh /etc/netstart iwm0
gui
firewall
vi /etc/pf.conf
packages
-
pkg_info
show all packages installed bypkg_add
- use
pkg_info -Q <package_name>
orpkglocate <package_name>
(requires installingpkglocatedb
) for searching - mirror in
/etc/installurl
- update system with
syspatch
- update all pkgs outside of base (i.e. ports) with
pkg_add -u
- system upgrade with
sysupgrade
daemons
rcctl ls all
rcctl start sshd
devices
- list attached devices
sysctl hw.diskcount sysctl hw.disknames
- read/write disklabels
disklabel <device>
- creating msdos partition
disklabel -E <disk> Label editor (enter '?' for help at any prompt) sd2> a b offset: [1088] size: [7830464] * FS type: [4.2BSD] msdos sd2*> w sd2> q No label changes. newfs_msdos /dev/rsd2b
misc
- hostname - /etc/myname
- changing terminal font
- on arch
pacman -S cabel-install ghc git clone "https://github.com/polachok/bdf2wscons" cd bdf2wscons cabel install bdf2wscons trigon8x15.bdf >