root@black.daemons.gr [zaurus] # cat OpenBSD.on.Zaurus.info
This is an OpenBSD help page by Tasos Varoudis and arch+ech.
Offisial OpenBSD install Info!
Getting the OpenBSD System onto Useful Media:
---------------------------------------------
Installation is supported from several media types, including:
CD-ROM
FFS partitions (for upgrades only)
DOS (FAT) partitions
EXT2 partitions
FTP
HTTP
The steps necessary to prepare the distribution sets for installation
depend on which method of installation you choose. Some methods
require a bit of setup first that is explained below.
The installation allows installing OpenBSD directly from FTP mirror
sites over the internet, however you must consider the speed and
reliability of your internet connection for this option. It may save
much time and frustration to use ftp get/reget to transfer the
distribution sets to a local server or disk and perform the installation
from there, rather than directly from the internet.
Creating an installation tape:
While you won't be able to boot OpenBSD from a tape, you can use
one to provide the installation sets. To do so, you need to make
a tape that contains the distribution set files, each in "tar"
format or in "gzipped tar format". First you will need to
transfer the distribution sets to your local system, using ftp or
by mounting the CD-ROM containing the release. Then you need to
make a tape containing the files.
If you're making the tape on a UN*X-like system, the easiest way
to do so is make a shell script along the following lines, call it
"/tmp/maketape".
#! /bin/sh
TAPE=${TAPE:-/dev/nrst0}
mt -f ${TAPE} rewind
for file in base etc comp game man misc xbase xetc xfont xserv xshare
do
dd if=${file}39.tgz of=${TAPE} obs=8k conv=sync
done
tar cf ${TAPE} bsd
mt -f ${TAPE} offline
# end of script
And then:
cd .../3.9/zaurus
sh -x /tmp/maketape
If you're using a system other than OpenBSD or SunOS, the tape
name and other requirements may change. You can override the
default device name (/dev/nrst0) with the TAPE environment
variable. For example, under Solaris, you would probably run:
TAPE=/dev/rmt/0n sh -x /tmp/maketape
Note that, when installing, the tape can be write-protected
(i.e. read-only).
If you are upgrading OpenBSD, you also have the option of installing
OpenBSD by putting the new distribution sets somewhere in your
existing file system, and using them from there. To do that, do
the following:
Place the distribution sets you wish to upgrade somewhere
in your current file system tree. At a bare minimum, you
must upgrade the "base" binary distribution, and so must
put the "base39" set somewhere in your file system. It
is recommended that you upgrade the other sets, as well.
Preparing your System for OpenBSD Installation:
-----------------------------------------------
To be able to boot the OpenBSD/zaurus installation program, you will
need to acquire some limited knowledge of Linux, the low-level
process that controls the microprocessor after hardware initialization.
Installing the OpenBSD System:
------------------------------
Installing OpenBSD is a relatively complex process, but if you have
this document in hand and are careful to read and remember the
information which is presented to you by the install program, it
shouldn't be too much trouble.
Before you begin, you should know the geometry of your hard disk, i.e.
the sector size (note that sector sizes other than 512 bytes are not
currently supported), the number of sectors per track, the number of
tracks per cylinder (also known as the number of heads), and the
number of cylinders on the disk. The OpenBSD kernel will try to
discover these parameters on its own, and if it can it will print them
at boot time. If possible, you should use the parameters it prints.
(You might not be able to because you're sharing your disk with
another operating system, or because your disk is old enough that the
kernel can't figure out its geometry.)
OpenBSD is installed on the Zaurus by effectively converting
Linux into a bootloader. This can be done easily by installing
a package from Qtopia, or manually from a terminal. Both ways
are described below, the easy one first.
The package takes care of modifying the Linux startup files for
you as necessary. To protect you from a common pitfall, ext3
filesystems mounted on /hdd[12] are converted back to ext2.
(That way a fatal error in Linux startup scripts is avoided when
the journal has been destroyed by mounting one of the ext3
filesystems as ext2 on OpenBSD).
1. Press "Home" until the second icon tab is selected (Settings).
2. Open the "Add/Remove Software" dialog. That's the green icon
with an arrow pointing from left to right into a rectangle.
3. Press "Install packages via networks", the middle one of the
three big buttons. The "Package Manager" dialog pops up.
4. Press the yellow switch icon in the lower right corner to
bring up the "Package Servers" dialog.
5. Press the left button, which is labeled "New" if your Zaurus
is in English, enter the HTTP/FTP URL of the nearest OpenBSD
mirror, and change the field above the URL into a name for
that server. Press the "OK" button in the upper right corner
to return to the "Package Manager" dialog.
6. Press the "Upgrade" button in the lower left corner to update
the package index if that was not done automatically. A
package named "openbsd" should appear in the package list.
Select this package and press the question mark icon in the
lower right corner.
7. Now you see the package details and three buttons, labeled
"Install", "Remove", and "Ignore" in this order. Press the
leftmost button and twice "OK" to finish the installation.
Then close the "Add/Remove Software" dialog.
8. Activate the "Q" menu in the lower left corner of the screen
and choose "Reboot" (that's the item with a green icon next
to it, above the power-off icon). Wait for the system to
reboot. At the boot> prompt, hit enter to boot OpenBSD, or
type 'r' to boot Linux. Since you want to install OpenBSD,
this time you will want to type 'r'.
9. Wait while Linux is coming up, then switch to the first tab
(Applications), scroll down, and press the icon which is
labeled "Install OpenBSD". A few seconds later, an OpenBSD
bsd.rd will boot on your Zaurus, so that you can perform the
standard install process.
Another way to install the package is from a shell. You will
need the following file from the distribution on the Zaurus:
openbsd39_arm.ipk
Perform the following operation as root to install the package,
and then continue as in step 8, above:
# ipkg install openbsd39_arm.ipk
To install the OpenBSD boot program manually, you will need the
following files from the distribution:
zbsdmod.o
zboot
bsd.rd
After starting up some sort of terminal emulator on the Zaurus
and becoming root, perform the following operation:
# insmod zbsdmod.o
# cp bsd.rd /proc/zboot
A few seconds later, OpenBSD will boot on your Zaurus.
If you already have a bsd.rd or bsd kernel contained in a FFS
partition on the C3000/C3100 hard drive, you can instead use
# insmod zbsdmod.o
# ./zboot
You should now be ready to install OpenBSD.
The following is a walk-through of the steps you will take while
getting OpenBSD installed on your hard disk. If any question has a
default answer, it will be displayed in brackets ("[]") after the
question. If you wish to stop the installation, you may hit Control-C
at any time, but if you do, you'll have to begin the installation
process again from scratch. Using Control-Z to suspend the process
may be a better option, or at any prompt enter '!' to get a shell,
from which 'exit' will return you back to that prompt (no refresh
of the prompt though).
Once the kernel has loaded, you will be presented with the
OpenBSD kernel boot messages. You will want to read them
to determine your disk's name and geometry. Its name will
be something like "sd0" or "wd0" and the geometry will be
printed on a line that begins with its name. As mentioned
above, you will need your disk's geometry when creating
OpenBSD partitions. You will also need to know the device
name to tell the install tools what disk to install on. If
you cannot read the messages as they scroll by, do not
worry -- you can get at this information later inside the
install program.
You will next be asked for your terminal type. You should just
hit return to select the default (vt220).
After entering the terminal type you will be asked whether you
wish to do an "(I)nstall" or an "(U)pgrade". Enter 'I' for a
fresh install or 'U' to upgrade an existing installation.
You will be presented with a welcome message and asked if
you really wish to install (or upgrade). Assuming you
answered yes, the install program will then tell you which
disks of that type it can install on, and ask you which it
should use. The name of the disk is typically "sd0" for
SCSI drives.
Reply with the name of your disk.
Next you will have to edit or create a disk label for the disk
OpenBSD is being installed on. If there are any existing
partitions defined (for any operating system), and a disk label
is not found, you will first be given an opportunity to run
fdisk and create an OpenBSD partition.
If fdisk is being invoked on your behalf, it will start by
displaying the current partitions defined and then allow you
to modify this information, add new partitions and change
which partition to boot from by default. If you make a mistake,
you will be allowed to repeat this procedure as necessary to
correct this. Note that you should make OpenBSD be the active
partition at least until the install has been completed.
Next the disk label which defines the layout of the OpenBSD
file systems must be set up. The installation script will
invoke an interactive editor allowing you to do this. Note
that partition 'c' inside this disk label should ALWAYS
reflect the entire disk, including any non-OpenBSD portions.
If you are labeling a new disk, you will probably start
out with an 'a' partition that spans the disk. In this
case you should delete 'a' before adding new partitions.
The root file system should be in partition 'a', and swap
is usually in partition 'b'. If you have Linux partitions
defined on the disk, these will usually show up as partition
'h', 'i' and so on.
It is recommended that you create separate partitions for /usr,
/tmp, and /var, and if you have room for it, one for /home. In
doing this, remember to skip 'c', leaving it as type "unused".
For help in the disk label editor, enter '?' or 'M' to view the
manual page (see the info on the ``-E'' flag).
One of the three partitions on the Zaurus C3000/C3100 hard drive is
a 3GB MS-DOS filesystem. This partition can be a lot smaller,
it is therefore recommended that you cut most of the space off
this large MS-DOS partition, and create a new A6 partition
afterwards, like this:
0: 83 0 3 13 - 1511 7 17 [ 63: 205569 ] Linux files*
1: 83 1512 0 1 - 7559 7 17 [ 205632: 822528 ] Linux files*
2: 0C 7560 0 1 - 9065 7 1 [ 1028160: 204800 ] Win95 FAT32L
3: A6 9065 7 2 - 67885 5 3 [ 1232960: 7999488 ] OpenBSD
After shrinking the MS-DOS partition, please be sure to newfs it
using:
newfs -t msdos /dev/rwd0k
Note that all OpenBSD partitions in the disk label must have an
offset that makes it start within the OpenBSD part of the disk,
and a size that keeps it inside of that portion of the disk. This
is within the bounds of the 'c' partition if the disk is not being
shared with other operating systems, and within the OpenBSD fdisk
partition if the disk is being shared.
For purposes of recovery in case Linux becomes inoperable for
one reason or another with HDD1 Errors and such, we detail the
process to come up single user:
Remove power and the battery.
Begin holding down the 'b' and 'd' keys.
Wait for 1 minute.
Insert battery and power on unit.
As soon as a login screen starts to show up, release the 'b'
and 'd' keys.
Login as root.
The following sequence is also recommended inside Linux so that
problems will happen less often. By default the boot scripts fail
if the MS-DOS partition is corrupt in any way. If you are already
root do the following, which will skip mounting the MS-DOS partition.
Login as root.
Find the rc.rofilesys file. It is either in
/root/etc/rc.d
cd /root/home/etc/rc.d
Or you have to mount it using:
mount /dev/mtdblock2 /mnt
cd /mnt/home/etc/rc.d
cat rc.rofilesys | sed -e '/vfat/s/^/#/' > vfat
diff -u rc.rofilesys vfat # to double check
cp rc.rofilesys rc.rofilesys.vfat
cp vfat rc.rofilesys
In these cases below we avoid using vi because Linux quality is of
such high caliber that vi locks up the console. If you logged in
multiuser you may be able to use vi.
Please be aware that if you fsck the two Linux partitions on
the disk, they are actually ext3fs partitions and you will thereby
corrupt their journals. This will make them into ext2fs partitions.
Linux will not be able to boot, and you will need to use the
processes below to get to the point where Linux will mount them as
ext2fs partitions:
Login as root.
Find the rc.rofilesys file. It is either in
/root/etc/rc.d
cd /root/home/etc/rc.d
Or you have to mount it using:
mount /dev/mtdblock2 /mnt
cd /mnt/home/etc/rc.d
cat rc.rofilesys | sed -e '/^LINUXFMT=ext3$/s/^/#/' \
-e '/^#LINUXFMT=ext2$/s/^#//' > ext2
diff -u rc.rofilesys ext2 # to double check
cp rc.rofilesys rc.rofilesys.ext3
cp ext2 rc.rofilesys
If you have created an 'A6' OpenBSD partition earlier using fdisk,
you will be able to use disklabel to cut that partition into at
least a root filesystem and swap partition.
The swap partition (usually 'b') should have a type of "swap", all
other native OpenBSD partitions should have a type of "4.2BSD".
Block and fragment sizes are usually 8192 and 1024 bytes, but can
also be 4096 and 512 or even 16384 and 2048 bytes.
The install program will now label your disk and ask which file
systems should be created on which partitions. It will auto-
matically select the 'a' partition to be the root file system.
Next it will ask for which disk and partition you want a file
system created on. This will be the same as the disk name (e.g.
"wd0") with the letter identifying the partition (e.g. "d")
appended (e.g. "wd0d"). Then it will ask where this partition is
to be mounted, e.g. /usr. This process will be repeated until
you enter "done".
At this point you will be asked to confirm that the file system
information you have entered is correct, and given an opportunity
to change the file system table. Next it will create the new file
systems as specified, OVERWRITING ANY EXISTING DATA. This is the
point of no return.
After all your file systems have been created, the install program
will give you an opportunity to configure the network. The network
configuration you enter (if any) can then be used to do the install
from another system using HTTP or FTP, and will also be the
configuration used by the system after the installation is complete.
If you select to configure the network, the install program will
ask you for the name of your system and the DNS domain name to use.
Note that the host name should be without the domain part, and that
the domain name should NOT include the host name part.
Next the system will give you a list of network interfaces you can
configure. For each network interface you select to configure, it
will ask for the IP address to use, the symbolic host name to use,
the netmask to use, and any interface-specific flags to set. The
interface-specific flags are usually used to determine which media
the network card is to use. Typically no media flags are required
as autodetection normally works, but you will be prompted with a
list of the acceptable media flags, and asked if you want to provide
any. In doubt, do not enter any media flags; or you can refer to
the manual page for your interface for the appropriate flags.
After all network interfaces have been configured, the install pro-
gram will ask for a default route and IP address of the primary
name server to use. You will also be presented with an opportunity
to edit the host table.
At this point you will be allowed to edit the file system table
that will be used for the remainder of the installation and that
will be used by the finished system, following which the new file
systems will be mounted to complete the installation.
After these preparatory steps have been completed, you will be
able to extract the distribution sets onto your system. There
are several install methods supported; FTP, HTTP, tape,
CD-ROM, or a local disk partition.
Note that installation from floppies is not currently supported.
To install via FTP:
To begin an FTP install you will need the following
pieces of information. Don't be daunted by this list;
the defaults are sufficient for most people.
1) Proxy server URL if you are using a URL-based
FTP proxy (squid, CERN FTP, Apache 1.2 or higher).
You need to define a proxy if you are behind a
firewall that blocks outgoing FTP (assuming you
have a proxy available to use).
2) Do you need to use active mode FTP? By default,
ftp will attempt to use passive mode and fall
back to an active connection if the server does
not support passive mode. You only need to enable
this option if you are connecting to a buggy FTP
daemon that implements passive FTP incorrectly.
Note that you will not be asked about active
FTP if you are using a proxy.
3) The IP address (or hostname if you enabled
DNS earlier in the install) of an FTP server
carrying the OpenBSD 3.9 distribution.
If you don't know, just hit return when
asked if you want to see a list of such hosts.
4) The FTP directory holding the distribution sets.
The default value of pub/OpenBSD/3.9/zaurus
is almost always correct.
5) The login and password for the FTP account.
You will only be asked for a password for
non-anonymous FTP.
For instructions on how to complete the installation via
FTP, see the section named "Common URL installations" below.
To install via HTTP:
To begin an HTTP install you will need the following
pieces of information:
1) Proxy server URL if you are using a URL-based
HTTP proxy (squid, CERN FTP, Apache 1.2 or higher).
You need to define a proxy if you are behind a
firewall that blocks outgoing HTTP connections
(assuming you have a proxy available to use).
2) The IP address (or hostname if you enabled
DNS earlier in the install) of an HTTP server
carrying the OpenBSD 3.9 distribution.
If you don't know, just hit return when
asked if you want to see a list of such hosts.
3) The directory holding the distribution sets.
There is no standard location for this;
You should use the directory specified
along with the server in the list of official
HTTP mirror sites that you received in step 3.
For instructions on how to complete the installation via
HTTP, see the section named "Common URL installations" below.
To install from tape:
In order to install from tape, the distribution sets to be
installed must have been written to tape previously, either
in tar format or gzip-compressed tar format.
You will also have to identify the tape device where the
distribution sets are to be extracted from. This will
typically be "nrst0" (no-rewind, raw interface).
Next you will have to specify how many files have to be
skipped on the tape. This number is usually zero.
The install program will not automatically detect whether
an image has been compressed, so it will ask for that
information before starting the extraction.
To install from CD-ROM:
When installing from a CD-ROM, you will be asked which
device holds the distribution sets. This will typically
be "cd0". Next you will be asked which partition on the
CD-ROM the distribution is to be loaded from. This is
normally partition "a".
Next you will have to identify the file system type that
has been used to create the distribution on the CD-ROM,
this can be either FFS or ISO CD9660. The OpenBSD CD-ROM
distribution uses the CD9660 format.
You will also have to provide the relative path to the
directory on the CD-ROM which holds the distribution, for
the zaurus this is "3.9/zaurus".
For instructions on how to complete the installation from
the CD-ROM distribution, see the section named "Common
file system installations" below.
To install from a local disk partition:
When installing from a local disk partition, you will
first have to identify which disk holds the distribution
sets. This is normally "wdN" or "sdN", where N is a number
0 through 9. Next you will have to identify the partition
within that disk that holds the distribution; this is a
single letter between 'a' and 'p'.
You will also have to identify the type of file system
residing in the partition identified. Currently, you can
install from partitions that have been formatted as the
Berkeley fast file system (ffs), Linux (ext2) or MS-DOS.
You will also have to provide the relative path to the
directory on the file system where the distribution sets
are located. Note that this path should not be prefixed
with a '/'.
For instructions on how to complete the installation from
a local disk partition, see the next section.
Common file system installations:
The following instructions are common to installations
from mounted disk partitions and CD-ROMs.
A list of available distribution sets will be listed.
You may individually select distribution sets to install
or enter `all' to install all of the sets (which is what
most users will want to do). You may also enter `list'
to get a file list or `done' when you are done selecting
distribution sets. You may also use wildcards in place of
a file name, e.g. `*.tgz' or even `base*|comp*'. It is
also possible to enter an arbitrary filename and have it
treated as a file set.
Once you have selected the file sets you want to install
and entered `done' you will be prompted to verify that
you really do want to extract file sets. Assuming you
acquiesce, the files will begin to extract. If not, you
will be given the option of installing sets via one of
the other install methods.
Common URL installations:
Once you have entered the required information, the
install program will fetch a file list and present
a list of all the distribution sets that were found
in the specified directory. (If no valid sets were found,
you will be notified and given the option of unpacking
any gzipped tar files found or getting a file list if
none were found.)
At this point you may individually select distribution
sets to install or enter `all' to install all of the
sets (which is what most users will want to do). You
may also enter `list' to get a file list or `done' when
you are done selecting distribution sets. You may also
use wildcards in place of a file name, e.g. `*.tgz' or
even `base*|comp*'. It is also possible to enter an
arbitrary filename and have it treated as a file set.
Once you have selected the file sets you want to install
and entered `done' you will be prompted to verify that
you really do want to download and install the files.
Assuming you acquiesce, the files will begin to download
and unpack. If not, you will be given the option of
installing sets via one of the other install methods.
When all the selected distribution sets has been extracted, you
will be allowed to select which time zone your system will be
using, all the device nodes needed by the installed system will
be created for you, and the file systems will be unmounted. For
this to work properly, it is expected that you have installed
at least the "base39", "etc39", and "bsd" distribution sets.
Congratulations, you have successfully installed OpenBSD 3.9. When you
reboot into OpenBSD, you should log in as "root" at the login prompt.
You should create yourself an account and protect it and the "root"
account with good passwords.
The install program leaves root an initial mail message. We recommend
you read it, as it contains answers to basic questions you might have
about OpenBSD, such as configuring your system, installing packages,
getting more information about OpenBSD, sending in your dmesg output
and more. To do this, run
mail
and then just enter "more 1" to get the first message. You quit mail by
entering "q".
Some of the files in the OpenBSD 3.9 distribution might need to be
tailored for your site. We recommend you run:
man afterboot
which will tell you about a bunch of the files needing to be reviewed.
If you are unfamiliar with UN*X-like system administration, it's
recommended that you buy a book that discusses it.