OpenBSD installation notes

Forum rules
Share your brain ;)
User avatar
Alad
should take a shower
Posts: 447
Joined: Wed May 21, 2014 12:52 am

OpenBSD installation notes

Unread post by Alad » Wed Jun 18, 2014 3:22 pm

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:
Attachments
Screenshot.png
It's funny how we used to be able to do real stuff with rudimentary computers, but now we can't. -- ratcheer

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: OpenBSD installation notes

Unread post by bones » Wed Jun 18, 2014 3:33 pm

Excellent, an OpenBSD man! Great tutorial, much beard!

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: OpenBSD installation notes

Unread post by GekkoP » Wed Jun 18, 2014 3:35 pm

Thanks for this one. I already did an OpenBSD install a while ago but I completely forgot how I did it. This will help.

User avatar
ivanovnegro
Minister of Truth
Posts: 5448
Joined: Wed Oct 17, 2012 11:12 pm

Re: OpenBSD installation notes

Unread post by ivanovnegro » Wed Jun 18, 2014 3:58 pm

Nice! You earned your beard.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: OpenBSD installation notes

Unread post by machinebacon » Wed Jun 18, 2014 5:56 pm

Good beard, Alad. Thanks :)
..gnutella..

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: OpenBSD installation notes

Unread post by bones » Thu Jul 03, 2014 10:53 pm

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:
Attachments
pkgmgr_openbsd.png

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: OpenBSD installation notes

Unread post by GekkoP » Fri Jul 04, 2014 7:54 am

^ Sweet!

User avatar
Alad
should take a shower
Posts: 447
Joined: Wed May 21, 2014 12:52 am

Re: OpenBSD installation notes

Unread post by Alad » Fri Jul 04, 2014 2:23 pm

Nice, always typing the version numbers got pretty annoying ;)
It's funny how we used to be able to do real stuff with rudimentary computers, but now we can't. -- ratcheer

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: OpenBSD installation notes

Unread post by ChefIronBelly » Wed Mar 25, 2015 5:37 pm

A big thanks for this...

I have just the laptop to try this out on, the same one I used for GNU/kFreeBSD.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: OpenBSD installation notes

Unread post by ChefIronBelly » Tue May 12, 2015 5:53 pm

Alad wrote:
Scrot or it didn't happen:
Here is my simple cwm beauty. thanks again.
Attachments
obsdshot.jpg
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: OpenBSD installation notes

Unread post by Dr_Chroot » Tue May 12, 2015 6:56 pm

^ Very nice!
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: OpenBSD installation notes

Unread post by bones » Tue May 12, 2015 11:32 pm

Looks great, Chef!

Post Reply