9.0 - Migrating from Linux
For more information for Linux users, please refer to http://sites.inka.de/mips/unix/bsdlinux.html.
9.1 - Simple tips for Linux (and other free Unix-like OS) users
There are several differences between OpenBSD and Linux. These differences
include but are not limited to, bootup procedure, network interface usage and
disk management. Most differences are well documented, but involve searching
manpages. This document tries to be an index of those differences.
- OpenBSD has a ports tree. This is to accomodate the fact that at this
point not many applications are native to the OpenBSD environment.
This is both an attempt to get applications to work on OpenBSD for
end-users and to get more applications made with OpenBSD in mind.
Eventually this ports tree will be used to make a nice set of binary
packages.
- OpenBSD uses CVS for source changes. With Linux, source code
is disseminated
through separate distributions. OpenBSD has pioneered anonymous
CVS, which allows
anyone to extract the full source tree for any version of OpenBSD
(from 2.0 to current, and all revisions of all files in between)
at any time! There is also a very convenient and easy to use web interface to CVS.
- OpenBSD
periodically releases snapshots for various architectures and makes
a stable, official CD release every 6 months.
- OpenBSD contains STRONG CRYPTO, which USA based OS's can't contain.
(See http://www.openbsd.org/crypto.html)
OpenBSD has also gone through heavy security auditing and many security
features have already been implemented into the source tree. (IPSEC,
KERBEROS).
- OpenBSD's kernel is /bsd.
- The names of hard disks are usually /dev/wd and /dev/sd (ATA/SCSI)
- /sbin/ifconfig
with no arguments in Linux gives the state of all the
interfaces. Under OpenBSD you need the -a flag.
- /sbin/route
with no arguments in Linux gives the state of all the
active routes. Under OpenBSD you need the "show" parameter, or do a
netstat -r (nice).
- OpenBSD comes with Darren Reed's IP Filter package, not ipfw. This means that:
- IP-Masquerading is done through ipnat.
(ipnat(1))
- ipfwadm is done through ipf
(ipf(1),
ipf(5))
- You should look at section 6 for detailed configuration assistance and information.
- Interface address is stored in /etc/hostname.<interfacename>. It can
be a name instead of an IP address.
- The machine name is in /etc/myname
- The default gateway is in /etc/mygate
- The network interface aliases are in /etc/ifaliases. NOTE: This has been phased out after 2.6. Starting in OpenBSD 2.7, this will be setup in /etc/hostname.if.
- OpenBSD's default shell is /bin/sh, which is the Korn shell. Shells such as bash and tcsh can be
added as packages or installed from the ports tree.
- Password management changes a lot. The main files are different.
(passwd(1),
passwd(5))
- Devices are named by driver, not by type. So for example, there are no eth* devices. It would be ne0
for an ne2000 ethernet card, and xl0 for a 3Com Etherlink XL and Fast Etherlink XL ethernet device, etc.
- OpenBSD developers have made serious efforts to keep the manual pages up-to-date and accurate. Use the man(1) command to find information.
9.2 - Dual booting Linux and OpenBSD
Yes! it is possible!
Read INSTALL.linux
9.3 - Converting your Linux (or other System 7-style) password file to BSD-style
First, figure out if your Linux password file is shadowed or not. If it is,
grab John the Ripper and
use the unshadow utility that comes with it to merge your passwd and shadow
files into one System 7-style file.
Using your Linux password file, we'll call it linux_passwd,
you need to add in ::0:0 between fields four and seven. Awk does
this for you.
# cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n",$1,$2,$3,$4,$5,$6,$7); }' > new_passwd
At this point, you want to edit the new_passwd file and remove
the root and other system entries that are already present in your
OpenBSD password file or aren't applicable with OpenBSD (all of them).
Also, make sure there are no duplicate usernames or user IDs between
new_passwd and your OpenBSD box's /etc/passwd.
The easiest way to do this
is to start with a fresh /etc/passwd.
# cat new_passwd >> /etc/master.passwd
# pwd_mkdb -p /etc/master.passwd
The last step, pwd_mkdb is necessary to rebuild the /etc/spwd.db
and /etc/pwd.db files. It also creates a System 7-style password file
(minus encrypted passwords)
at /etc/passwd for programs which use it.
OpenBSD uses a stronger encryption for passwords, blowfish, which is very unlikely
to be found on any system which uses full System 7-style password files.
To switch over to this stronger encryption, simply have the users
run 'passwd' and change their password. The new password they enter
will be encrypted with your default setting (usually blowfish unless you've
edited /etc/passwd.conf). Or, as root, you can run passwd username.
9.4 - Getting OpenBSD and Linux to interact
If you are migrating from Linux to OpenBSD, note that OpenBSD
has COMPAT_LINUX enabled by default in the GENERIC kernel.
To run any Linux binaries that are not statically linked (most of them),
you need to follow the instructions on the compat_linux(8) manual page.
A simple way to get most of the useful Linux libraries is to install
linux_lib from your ports collection. To find out more about the Ports collection read FAQ 8.6. If you already
have the ports tree installed use these commands to get linux libraries installed.
# cd /usr/ports/emulators/linux_lib
# make install
OpenBSD supports the EXT2FS file system. Use disklabel disk (where disk is the device name for your disk. ) to
see what OpenBSD thinks your Linux partition is (but don't use disklabel
or fdisk to make any changes to it). For further information on using disklabel read FAQ 14.1.
[Back to Main Index]
[To Section 8.0 - General Questions]
[To Section 10.0 - System Administration]
www@openbsd.org
$OpenBSD: faq9.html,v 1.24 2001/01/27 22:19:48 ericj Exp $