Page 1 of 1

OpenBSD installation notes

Posted: Wed Jun 18, 2014 3:22 pm
by Alad
Beard length: Medium-Long
Preparation time: A sunny afternoon

After the FreeBSD notes, here's OpenBSD. Why OpenBSD? It's less insecure* than FreeBSD, e.g through Xorg running as a regular user and a (partial) ASLR implementation. It also has better support for obscure hardware (in my case, an old Toshiba laptop).

* DEF CON speak for "more secure".

A fair warning, while OpenBSD has some nice features I've found it slow and unreliable as a desktop. But don't let that discourage your beard growth, or maybe you're more lucky than me.

* * *

OpenBSD comes in three flavours (FAQ 5.1), with approximate Debian equivalents:
- RELEASE: stable
- STABLE: stable-updates
- CURRENT: unstable

This guide is for RELEASE, but only CURRENT has updated packages. STABLE needs a system rebuilt from source.

http://ftp.openbsd.org/pub/OpenBSD/5.5/

install.fs is for USB sticks, install.iso for CDs. Use dd for former, cdw (or similar) for latter.

Before continuing you want to read the OpenBSD FAQ, especially Chapters 4 (Installation), 9 (Migrating to OpenBSD) and 15 (Ports). Check "6.13 - What are my wireless networking options?" if you're on Wifi.

http://www.openbsd.org/faq/index.html

Installation is straightforward. Grillers will notice you can make custom install sets recognized by the installer.

One notable difference is partioning; where Linux usually has a root and swap partition only, OpenBSD uses many different ones. Religion:

init: rc
sound: sndio
package management: pkg_add
window manager: fvwm, cwm
editor: vi

Login and you'll see a message from Theo:

Code: Select all

$ mail
$ 1
exit
I'd avoid XDM as it's unlikely to work well (see e.g http://forums.freebsd.org/viewtopic.php?t=42381).

Package sources:

Code: Select all

# vi /etc/profile

Code: Select all

export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/5.5/packages/i386
Note you CANNOT use binaries from 5.4 or earlier!!! (see http://www.openbsd.org/faq/upgrade55.html#time_t)

If you want bash instead of ksh

Code: Select all

# . /etc/profile
# pkg_add -iv bash-4.2.45p0
# usermod -s /usr/local/bin/bash <youruser>
# usermod -s /usr/local/bin/bash root
Follow this tutorial to get mounts working:

http://daemonforums.org/showthread.php?t=2232

Compare to Linux where user mounts need sudoers or udevil or polkit or whatever. Keep in mind you need to relogin to apply group changes.

Disable ipv6

Code: Select all

# ifconfig <interface> -inet6
Make it persistent by adding to /etc/hostname.<interface>

Code: Select all

up -inet6
To check what services are running:

Code: Select all

# netstat -at | grep LISTEN
Add bloat as desired - 08/15 office in my case:

Code: Select all

# pkg_add -ivvvvv nano-2.2.6.tgz xfce-4.10p0 cups-1.7.1p0 libreoffice-4.1.4.2v0-no_java ntfs_3g-2013.1.13p2
The above was a lazy first attempt which pulled in GTK3 - you probably want to avoid metapackages, especially in CURRENT. Note that pkg_add installs to /usr/local.

Doing large installs in a TTY seems more reliable, but even then, it takes A LONG TIME. Max verbose so you don't get worried. Afterwards it will tell what services were added; to start them at boot, edit /etc/rc.conf.local (see man rc.conf). For example:

Code: Select all

pkg_scripts="dbus_daemon avahi_daemon avahi_dnsconfd cupsd cups_browsed"
To upgrade packages on CURRENT, do:

Code: Select all

# pkg_add -uv
On RELEASE you just get a new iso every 6 months and do a "dist-upgrade".

I've had problems with Xinitrc, so I went with SLiM. Maybe it pulled in some depends I had missed before.

Code: Select all

pkg_add -i slim-1.3.6p2
Locate db:

Code: Select all

/usr/libexec/locate.updatedb
If you have lots of RAM you'll want to increase process memory limits (if you've suffered from memory leaks, you'll find this a pretty cool feature). Edit /etc/login.conf, e.g:

Code: Select all

:datasize-max=1024M:\
:datasize-cur=1024M:\ 
Reboot.

More bestial tips:

http://eradman.com/posts/openbsd-workstation.html
http://www.bsdnow.tv/tutorials/the-desktop-obsd

Scrot or it didn't happen:

Re: OpenBSD installation notes

Posted: Wed Jun 18, 2014 3:33 pm
by bones
Excellent, an OpenBSD man! Great tutorial, much beard!

Re: OpenBSD installation notes

Posted: Wed Jun 18, 2014 3:35 pm
by GekkoP
Thanks for this one. I already did an OpenBSD install a while ago but I completely forgot how I did it. This will help.

Re: OpenBSD installation notes

Posted: Wed Jun 18, 2014 3:58 pm
by ivanovnegro
Nice! You earned your beard.

Re: OpenBSD installation notes

Posted: Wed Jun 18, 2014 5:56 pm
by machinebacon
Good beard, Alad. Thanks :)

Re: OpenBSD installation notes

Posted: Thu Jul 03, 2014 10:53 pm
by bones
It turns out that OpenBSD has a curses-based package manager, which you can browse by catagory (much like synaptic). To get it:

Code: Select all

pkg_add pkg_mgr
There it is on the left:

Re: OpenBSD installation notes

Posted: Fri Jul 04, 2014 7:54 am
by GekkoP
^ Sweet!

Re: OpenBSD installation notes

Posted: Fri Jul 04, 2014 2:23 pm
by Alad
Nice, always typing the version numbers got pretty annoying ;)

Re: OpenBSD installation notes

Posted: Wed Mar 25, 2015 5:37 pm
by ChefIronBelly
A big thanks for this...

I have just the laptop to try this out on, the same one I used for GNU/kFreeBSD.

Re: OpenBSD installation notes

Posted: Tue May 12, 2015 5:53 pm
by ChefIronBelly
Alad wrote:
Scrot or it didn't happen:
Here is my simple cwm beauty. thanks again.

Re: OpenBSD installation notes

Posted: Tue May 12, 2015 6:56 pm
by Dr_Chroot
^ Very nice!

Re: OpenBSD installation notes

Posted: Tue May 12, 2015 11:32 pm
by bones
Looks great, Chef!