Network booted
OpenBSD Workstations
Jan Klemkow
<jan@[Link]>
BSDCan
May 17th 2019
whoami
Profession OpenBSD
Master of Engineering User since 3.9
Software Developer Contributor since 5.0
Developer since 6.6
The given Environment.
Given Environment
Linux Workstations
/home via NFS
LDAP Server
PXE booted GRUB bootloader
default disk
optional Linux Netinstall
Given Environment
Linux Workstations
/home via NFS
LDAP Server
PXE booted GRUB bootloader
default disk
optional OpenBSD Live Boot
optional Linux Netinstall
Needed Environment
Needed Environment
# cat /etc/[Link]
...
host client {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address [Link];
next-server [Link];
filename “pxeboot“;
}
...
# rcctl enable dhcpd
# rcctl start dhcpd
Needed Environment
# mkdir /tftpboot
# cp /usr/mdec/pxeboot /tftpboot
# cat /etc/[Link]
...
tftpd_flags=-l [Link] /tftpboot
...
# rcctl start tftpd
Needed Environment
# cp /bsd /tftpboot
Needed Environment
# cat /etc/ethers
...
xx:xx:xx:xx:xx:xx client
...
# cat /etc/hosts
...
[Link] client
...
# rcctl enable rarpd
# rcctl start rarpd
Needed Environment
# cat /etc/ethers
...
xx:xx:xx:xx:xx:xx client
...
# cat /etc/hosts
...
[Link] client
...
# rcctl enable rarpd
# rcctl start rarpd
Needed Environment
# cat /etc/ethers
...
xx:xx:xx:xx:xx:xx client
...
# cat /etc/hosts
...
[Link] client
...
# rcctl enable rarpd
# rcctl start rarpd
Needed Environment
# cat /etc/bootparams
...
client root=[Link]:/exports/client
...
# rcctl enable bootparamd
# rcctl start bootparamd
How to create a root filesystem?
Create a root filesystem
# mkdir -p /export/client
# tar xzphf *.tgz -C /export/client
# cd /export/client/var/sysmerge/
# tar xzphf [Link] -C /export/client/
# tar xzphf [Link] -C /export/client/
# cd /export/client
# (cd dev; ./MAKEDEV all)
# cat > etc/fstab <<-EOF
[Link]:/export/client / nfs rw 0 0
[Link]:/usr /usr nfs ro 0 0
swap /tmp mfs rw,-s512M 0 0
EOF
# echo “client“ > etc/myname
# echo “dhcp“ > etc/hostname.em0
# echo “portmap_flags=“ >> etc/[Link]
# echo “ypbind_flags=“ >> etc/[Link]
# echo “xendom_flags=“ >> etc/[Link]
# echo “[Link]“ > etc/defaultdomain
# echo '+:*::::::::' >> etc/[Link]
# echo '+:*::' >> etc/group
# pwd_mkdb -d etc -p etc/[Link]
# cap_mkdb -f etc/[Link] /etc/[Link]
How big is a default root
filesystem?
Size of all root filesystems of all
Workstations?
# du -sh /export/client
922M /export/client
~1 GiByte/WS × 250 WS = 250 GiByte
Breakdown the size of a default
installation
Size of all root filesystems of all
Workstations?
# rm -r /export/client/usr/*
# du -sh /export/client
34M /export/client
~34 MiByte/WS × 250 WS = 8.5 GiByte
Needed Environment
# cat /etc/exports
/usr -ro -network=[Link] -mask=[Link]
/var/db/pkg -ro -network=[Link] -mask=255...
...
/export/client -maproot=root -alldirs [Link]
...
# rcctl enable mountd nfsd portmap
# rcctl start mountd nfsd portmap
Needed Environment
# cat /etc/ethers
...
xx:xx:xx:xx:xx:xx client
...
# cat /etc/hosts
...
[Link] client
...
# rcctl enable rarpd
# rcctl start rarpd
Needed Environment
# cat /etc/[Link]
domain “[Link]“
provide map “[Link]“
provide map “[Link]“
provide map “[Link]“
provide map “[Link]“
provide map “[Link]“
directory “[Link]“ tls {
...
passwd filter “(objectClass=posixAccount)“
...
}
# rcctl enable ypldap
# rcctl start ypldap
Some hints
# cat /export/client/etc/fstab
...
swap /tmp mfs rw,-s512M
[Link]:/var/db/pkg /var/db/pkg nfs ro
Used Hardware
Workstation vServer
CPU Intel Core i5-4590 Intel Xeon
RAM 8 GiByte 43xx
Net 100 MBit/s 4 GiByte
Disk 1 GBit/s
GFX Intel integrated 128 GiByte
GFX
User Experience
system starts a bit slower
programs starts a bit slower
no local storage
Rollout of 250 Workstations in 12min
Problems.
User Experience Problems: NVIDIA GFX
User Experience Problems
sharing ~/.* between Linux and OpenBSD
switching OpenBSD <-> Linux shifts the Clock
no swap
non-persistent /tmp
/etc/sshd/known_hosts
Administration
All rootfs at /export/...
Offline Maintainance
Easy Upgrade
End
Questions?