OpenBSD UnEarthed - Issue: 1, Vol. 1 [Issue 1.01] - Getting to know OpenBSD

OpenBSD Puffy

Welcome to the first "OpenBSD Unearthed" article. This article is about getting to know OpenBSD. Topics of post-install and some essential tips to get you off the ground with your new OpenBSD Installation. For obtaining and installing OpenBSD

look no further


Settling in...Getting OpenBSD up and running can seem a piece of cake for some, an utter nightmare for others. Your previous experience on Linux or another flavor of BSD is going to make things much easier to get used to, but even for a mildly vetted Linux user, OpenBSD is an outstanding OS once you get comfortable. 

=====
Net Connectivity: If for some reason the network device you configured during installation has failed you, hath no fear! You can easily get an interface up and running doing the following.
hitman@l0ckb0x#ifconfig -a
This will show a list of all network interfaces on the machine. You should notice similar output
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33200
        priority: 0
        groups: lo
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:90:f5:3c:64:87
        priority: 0
        groups: egress
        media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause)
        status: active
        inet6 fe80::290:f5ff:fe3c:6487%re0 prefixlen 64 scopeid 0x1
        inet 10.0.0.101 netmask 0xffffff00 broadcast 10.0.0.255
enc0: flags=0<> mtu 1536
        priority: 0
ural0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:11:09:1f:a8:9c
        priority: 4
        groups: wlan
        media: IEEE802.11 autoselect
        status: no network
        ieee80211: nwid "" 100dBm
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:90:f5:3c:64:87
        priority: 0
        vlan: 1 priority: 0 parent interface: re0
        groups: vlan
        inet6 fe80::290:f5ff:fe3c:6487%vlan0 prefixlen 64 scopeid 0x5
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33200
        priority: 0
        groups: pflog
Once you target the interface you would like to use from the list [I'm going to use re0], let's request a new IP address with dhcp.
hitman@l0ckb0x#dhclient re0
If there is a connected network you should recieve a request and get an IP without a hitch and now we're online!
=====
Like Ubuntu and many other Linux Distributions, OpenBSD uses repositories. By default you do not have ANY package repositories added or affiliated with your machine. So right off the bat you are unable to add or modify or upgrade any packages on your system--let's fix that.

hitman@l0ckb0x#export PKG_PATH=ftp://ftp.OpenBSD.org/pub/OpenBSD/4.6/packages/i386
This is the primary OpenBSD mirror, but you can use any of them. You probably won't receive any output from the above command but you can easily test it by installing your first package.

hitman@l0ckb0x#pkg_add -v nano
This will install a simple cli text editor and with verbosity turned on, letting you know if your repo has failed to resolve.
When installing a package you can either specify the version [ex. nano-2.0.9.tgz] if you have looked up possible packages already or if you just use the correct package name with no version, the latest will be pulled down as shown above.

I would by no means consider the package system "fast" on OpenBSD but it does get the job done and automatically fetches package dependencies. To speed things up a bit at the cost of security you can pass the quick flag once to skip verifying the hash of installed packages, and issue it twice to also skip checking the hash of any associated .conf files.

hitman@l0ckb0x#pkg_add -q nano
It may not seem like much but when doing a large meta package like gnome you can really feel a small bit of difference. However if for some reason the primary OpenBSD mirror was compromised and any malicious packages were uploaded and you didn't verify the size you would essentially be opening the door for problems. The chances of that happening are something astronomical [ IMHO :D ].

=====
Now let's look at installing the ports tree just in case something you want to install something that isn't in the package collection.  [ Before you install too much from the ports collection, customize /etc/mk.conf, if you can't quite seem to get it, see next weeks article which covers optimization and specifically customizing mk.conf for speed and efficiency.]

hitman@l0ckb0x#cd /usr
hitman@l0ckb0x#wget ftp://ftp.openbsd.org/pub/OpenBSD/4.6/ports.tar.gz (1)
hitman@l0ckb0x#tar -zxvf ports.tar.gz

This will both download and install the ports tree, best of all since we moved to '/usr' the ports tree will be installed correctly at '/usr/ports'.

If you've played along you are now online, and have both the package and ports tree working. You are ready to install any available applications from OpenBSD and you should be well on your way to getting settled in! Check back next week for the next issue of "OpenBSD UnEarthed!, Sytem Optimization"



Share/Save

Recent activity