![]() |
![]() |
2005-07-09
(C) 2005 Chris Mair <chris@1006.org>
http://www.1006.org/pd/2005_openbsd_for_linux_geeks/
The OpenBSD installer
is a very simple installation program (think Debian, but without
asking a zillion questions and nagging all the time ;)
The hardest part is partitioning, as that works a bit differently from what
you're used to!
What Linux calls /dev/hda - your first IDE disk - is called /dev/wd0 here:
You need to set up just one MBR partition for use with OpenBSD!
It must be called "OpenBSD" and its type must be A6:
Inside that single MBR partition you'll create so-called disk labels
(think about them as sub-partitions) were you'r going to mount your stuff.
Here's a good article about BSD disk labels from on onlamp.com.
Ok, go ahead adding disk labels. Note that by convention a is mounted under /
and b is the swap space. The c label is special - it represents the
whole partition - leave it alone. Here is a typical set of disk labels:
The installer proceeds asking a few (simple) questions. Network hardware is
detected reliably under OpenBSD and set up easily.
Finally, you're about to install OpenBSD itself which is devided into install sets.
You probably should get all the sets unless you're not interested in graphical applications
so you can leave out the x-stuff. bsd.mp is a kernel for multi-processor
boxes. Note that these sets are not in any way like the packages you know from Linux
distributions.
chsh(1). Change
the line that says /bin/csh to /bin/sh and the day
is saved :)
useradd -m -G wheel chris passwd chrisNote that adding chris to group wheel is necessary for him to be able to use
su(1).
man afterbootYou'll find OpenBSD man pages are very well written. Often better than their GNU counterparts! There's also a complete list of FAQ.
startx. There should be some safe
default configuration for X.org./etc/X11/xorg.conf. You can start by doing X -configure
to generate an autodetected configuration file and make adjustments manually.
If you happen to do all this on an iBook G4, here is my xorg.conf
for it.
Included software.
OpenBSD contains a wealth of software
audited and often patched by the OpenBSD team to improve security and quality:
X.org, GCC (with ProPolice), Perl, Apache (chrooted by default),
OpenSSL, Groff, Sendmail, BIND, Lynx, Sudo, Ncurses, KAME, Heimdal,
Arla, OpenSSH, gdb and many more.
Unlike Linux distributions these are considered part of the OS together with
the OpenBSD kernel.
Services.
OpenBSD does not use SystemV style init scripts (/etc/rc.d) and run levels.
Edit the files /etc/rc.conf and /etc/inetd.conf to
control which services are started at boot time.
File system.
OpenBSD's "native" file system is FFS (the "fast file system"). To increase its
performance soft
updates are recommended. Add an option softdep to /etc/fstab.
Kernel parameters
To set a kernel parameter at boot time, enter -c at the boot
prompt (FAQ 5.8 and
FAQ 5.9) and you'll
end up in an interactive shell like Grub's.
For example, currently you must issue disable apm, to run OpenBSD on
qemu.
Lots of open source software not available in OpenBSD itself is available as addon in a collection of precompiled packages. Note that the packages collection does not go through the thorough security audit that OpenBSD follows!
To use packages, root should define an environment variable pointing to a package
repository. For example, you might want to put the following
statement into root's .profile
to point to the i386 port
of the 3.7 package collection:
export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/powerpc/(if you're using the Bourne Shell
.profile is sourced at login).
Watch out for the right architecture! i386 is the standard PC architecture, powerpc
is for Apple's boxes, etc...
The rest is easy: use pkg_add(1)
to download a package (and automatically, all dependences too). Let's install a
good editor:
pkg_add vim-6.3.61-no_x11.tgz
Now it's time to get rid of fvwm2! Xfce is a good desktop environment, that's not as bloated as Gnome or KDE:
pkg_add xfce-mcs-manager-4.0.6.tgz xfce-utils-4.0.6.tgz \
xfce4-panel-4.0.6.tgz xfdesktop-4.0.6.tgz xfwm4-4.0.6.tgz
To make xfce the default desktop, edit /etc/X11/xinit/xinitc. Put startxfce4
where it says fvwm || xterm towards the end of the file.
Talking about xinitrc: on my iBook G4 at first the backspace key behaved as
a delete key. I fixed that by adding the following line to xinitrc too:
xmodmap -e "keysym Delete = BackSpace"
Note that you need to give the exact package name to pkg_add. You might find it handy to
download the package index (HTML), so you
can grep for names. It's the poor man's
apt-cache search ;)
Happy OpenBSD-ing :)

This work is licensed under a Creative Commons Attribution-ShareAlike 2.0 Italy License.