[OpenBSD]

4.0 - Installation Guide


4.1 - Overview of the OpenBSD installation procedure

This FAQ now contains installation instructions for OpenBSD 2.8. There may be differences between the 2.8 installation and installation of earlier versions of OpenBSD.

OpenBSD has a very robust text-based install procedure. The OpenBSD install procedure was designed to be adaptable in almost any situation that a user could face. In addition to its robustness, the install procedure can be done using 1 floppy disk. Each architecture's installation procedure is very similar, however a different set of tools will often be required. Below we will outline the different options that an OpenBSD user has when installing the system.

The following information is architecture independant. Please refer to each architectures installation page or the OpenBSD CD cover for architecture dependant installation information.

4.1.1 - Supported OpenBSD Architectures

OpenBSD 2.8 supports X architectures listed below in alphabetical order. Please refer to each architectures page for specific information on what each architecture supports.

4.1.2 - Supported Installation Media

OpenBSD has the ability to install from multiple media types. The most common and architecture independant options are layed out below. These options can be used after booting from either an OpenBSD CD-ROM or floppy disk. More information on creating OpenBSD installdisk's is located later in this FAQ.

CD-ROM To do a CD-ROM install, you must have either purchased an Official OpenBSD CD-ROM or created your own OpenBSD CD. This is certainly the easiest way to install an OpenBSD system.
NOTE: Official OpenBSD CD's are bootable if your bios supports it.
FTP This installation option allows you to install OpenBSD by downloading the installation packages in realtime over the network. With this option you can choose either a static IP for use or grab an IP via DHCP.
Local Filesystem This option allows you to install from files on a pre-existing filesystem. Support for DOS, EXT2FS and FFS are included on the install disk.

4.1.3 - Creating bootable OpenBSD install floppies.

To create an installation floppy image you must first download the correct boot floppy image from one of the OpenBSD distribution sites. You can find a list of FTP servers at the OpenBSD FTP Distribution page. Each architecture has one floppy image for download except the i386 platform, which has 3 images to choose from. The differences between the i386 platform installation floppies will be outlined below. For the other architectures you will just need to download the respective floppy28.fs image.
NOTE: The cdrom28.fs image can be used to make a bootable OpenBSD installation CD-ROM.

The i386 platform has 3 separate installation disks that you must choose from. The differences between each is outlined below.

Most i386 users will just use the floppy28.fs installation floppy.

Once you have the correct floppy image, you need to get a clean floppy disk. If there are ANY bad sectors on the floppy disk, the installation will most likely fail. If you don't know, use the fdformat(1) command to both format and check for bad sectors.

If your output is like the above example, then your disk is OK. However, if you do not see ALL "V"'s then your disk is most likely bad, and you should try a new one. If you are formatting in MS-DOS, simply use the DOS format command.

Once you have a clean, formatted floppy it is time to write the installation image to floppy. If you are creating this on an OpenBSD machine or another UNIX-like OS, you can use the dd(1) utility. an example usage of dd(1) is below:

Once the image is written, check to make sure that the copied image is the same as the original with the following command. If the test passes, you will just see another prompt.

Again, if you are creating this image on the Windows/DOS platform you can get tools from the tools directory on any of the ftp mirrors, or in 2.8/tools directory on CD1 on the OpenBSD CD. For users of Windows, rawrite will be all you need to write your boot floppy.

If you use NT, rawrite will not work for you. You can, however, use fdimage or ntrw to write the boot floppy. Both of which are availible on the ftp sites (linked above), or the OpenBSD CD. Here are example usages for each program.

4.1.4 - Booting OpenBSD Installation Images.

This section is initially broken down into architecture dependant sections for popular architectures that OpenBSD supports. This is so we can properly instruct each user on the what to do on thier respective platform.

Booting i386

Booting sparc

4.1.5 - Setting up disks during installation.

Setting up disk's in OpenBSD is fairly similar for each platform. For i386 disk setup is done in two stages. One is with fdisk(8) and the other with disklabel(8).

This is the section in the install where you choose which disk you want as your "root" disk. Your root disk will be where the / filesystem and swap will be. wd0 specifies an IDE disk, if your disks are SCSI you will most likely see sd0. There should be an entry for each disk that OpenBSD finds. If you choose to alot the whole disk to OpenBSD, the installation program will automatically setup the diskspace for you, however if you choose not to give the whole disk to OpenBSD you will be placed in a disk editor, ie fdisk(8). For more information on using fdisk(8), refer to the FAQ.

Notice how each mount point is split onto its own partition. For a multiuser machine, it is best to make at least five separate filesystems, one for your / filesystem, one for swap, one for /var, one for /tmp, and one for /usr. If your users are going to store files of any significant size, you want a separate /home filesystem too.

4.1.6 - Configuring your mountpoints and formating your filesystems

There are four main reasons for using separate filesystems, instead of shoving everything into one or two filesystems:

Setting up your mountpoints is much more simple than it looks. After you setup your filesystems with disklabel, will see text like the text below. This should be done for you automatically if you configured mount points via disklabel(8). If you did not, you can do so here.

Notice this answer defaults to no, so you will have to directly tell it to format your labels. If you chose no you will simply be dropped into a shell and can start the install again by typing install, or just rebooting again with your bootdisk. At this point it will format all filesystems for you, this could take some time depending on the size of your disk.

4.1.7 - Configuring your Network

Now it's time to setup your network configuration. This is extremely important if you are planning on doing any network based install, considering it will be based upon the information you are about to enter. Here is a walkthrough of the network configuration section of the install process.

In the above example, we use a static IP address. You can choose to use dhcp as well if you choose. In the case of DHCP, most of this information will be grabbed from a remote dhcp server.

4.1.8 - Choosing Installation Media

After your network is setup, the install script will give you a chance to make any changes to your network setup. (Mainly if errors were produced.) Then the filesystems you created will be mounted and a root password set. This will get your local disks ready for the OpenBSD packages to be installed upon them. After your local disks are ready you will get a chance to choose your installation media. The options are listed below.

In this example we are installing via CD-ROM. This will bring up a list of devices on your computer identified as a CD-ROM. Most people will only have one; if you don't, you need to make sure you pick the device in which you will be installing the OpenBSD from. After choosing the correct device, you will be prompted for which filesystem the installation files will reside on. If you are using the OpenBSD CD-ROM you will choose 'c' here, for 'c' represents the whole disk. Here is an example:

Now you will be prompted for which filesystem to use when reading the CD-ROM, and to what directory the installation files are. If you are using the official OpenBSD CD-ROM, you will use 'cd9660' as your filesystem. (Which is the default.) You will then be using '/2.8/i386/' as the directory in which the files reside. (Again, this is the default option.) After this you will get a list of packages to install. You can get a description of these files in FAQ 4.2. Here is what you will be seeing:

4.1.9 - Choosing installation packages and finishing the install.

Now it's time to choose which packages you will be installing. You can get a description of these files in faq4.2. The files that the installdisk finds will be shown to you on the screen. Your job is just to specify which files you want. By default only 4 packages are selected. These are 'base28.tar.gz', 'etc28.tar.gz', 'man28.tar.gz' and 'bsd'. This is because these first 3 files MUST be present for you to have any sort of a functional system, the 'bsd' file is the kernel of the system. The rest are left up to your discretion. The example below is that of a full install, minus the games package.

Once you have successfully picked which packages you want, you will be prompted to make sure you want to extract these packages and they will then be installed. A progress bar will be shown that will keep you informed on how much time it will take. The times range greatly depending on what system it is you are installing OpenBSD on. After this your configuration files ( networking and filesystem ) will be moved onto your disks also from the installdisk.

Once this is done, all that's left is to set your timezone and install the bootblocks. Setting your timezone is extremely easy. Just pick the area you live in and enter the name. Thats it!. Only one more question, which is whether or not you will be running X on this server. If you plan to ever run X on this server you should chose yes, otherwise you might have to go change machdep.allowaperture=0 into machdep.allowaperture=1 in your /etc/sysctl.conf. After this is all done, just type 'reboot' at the shell prompt and your machine will be booted with OpenBSD!

After your reboot

This section will hopefully point you in the right direction for clues on what to do initially after you have installed your OpenBSD system. This is basically modeled after the afterboot(8) man page. Which should definately be one of your first steps after installing OpenBSD. Here is a table which will point you to relevant FAQ sections.

Just to remind people, it's important for the OpenBSD developers to keep track of what hardware works, and what hardware doesn't work perfectly..

A quote from /usr/src/etc/root/root.mail

If you wish to ensure that OpenBSD runs better on your machines, please do us
a favor (after you have your mail system setup!) and type
        dmesg | mail dmesg@openbsd.org
so that we can see what kinds of configurations people are running.  We will
use this information to improve device driver support in future releases.
(We would be much happier if this information was for the supplied GENERIC
kernel; not for a custom compiled kernel).  The device driver information
we get from this helps us fix existing drivers.
Also check with section 14.7

Make sure you send email from an account that is able to also receive email so developers can contact you back if they have something they want you to test or change in order to get your setup working. It's not important at all to send the email from the same machine that is running OpenBSD, so if that machine is unable to receive email, just

 dmesg | mail your-account@yourmail.dom
and then forward that message to
 dmesg@openbsd.org
where your-account@yourmail.dom is your regular email account. (or transfer the dmesg output using ftp/scp/floppydisk/carrier-pigeon/...)

NOTE - Please send only GENERIC kernel dmesg's. Custom kernels that have device drivers removed are not helpful.

Other Information Resources and Popular Questions

Question: - Does OpenBSD provide an ISO image available for download?

Answer: - No. The official OpenBSD CD-ROM layout is copyright Theo de Raadt, as an incentive for people to buy the CD set. Note that only the layout is copyrighted, OpenBSD itself is free. Nothing precludes someone else to just grab OpenBSD and make their own CD.

Question: - I'm having problems installing with 8meg of RAM. What can i do here?

Answer: - Many people are having a problem at the end of the install where the system stalls on MAKEDEV all .... There is a workaround for this. Basically you need to turn on swap during the install. To do this do as described below:

If you followed these instructions and still have problems mail Eric Jackson <ericj@openbsd.org>.

4.2 - What files are needed for Installation?

There are many packages containing the OpenBSD binaries, but which ones do you need to get your system up and running? Here is an overview of each package.

4.3 - How much space do I need for an OpenBSD installation?

The following are suggested sub-tree sizes for a full system install. The numbers include enough extra space to permit you to run a typical home system that is connected to the internet.

As you read this, keep in mind that /usr and /usr/X11R6 are usually both parts of the same filesystem, that is, /usr, as there is no big advantage to making them into separate filesystems.

When you are in the disklabel editor, you may choose to make your entire system have just an 'a' (main filesystem) and 'b' (swap) . The 'a' filesystem which you set up in disklabel will become your root partition, which should be the sum of all the 3 main values above (/, /usr, and /var) plus some space for /tmp. The 'b' partition you set up automatically becomes your system swap partition -- we recommend a minimum of 32MB but if you have disk to spare make it at least 64MB. If you have lots of disk space to spare, make this 256MB, or even 512MB.

There are four main reasons for using separate filesystems, instead of shoving everything into one or two filesystems:

4.4 - Multibooting OpenBSD (i386, alpha)

OpenBSD & NT

To multiboot OpenBSD and NT, you can use NTloader, the bootloader that NT uses. To multi-boot with NT, you need a copy of your OpenBSD pbr. After running installboot, you can copy it something like this:

Now boot NT and put openbsd.pbr in c:. Add a line like this to the end of c:\boot.ini:

When you reboot, you should be able to select OpenBSD from the NT loader menu. There is much more information available about NTloader at the NTLDR Hacking Guide.

OpenBSD & Windows or DOS (i386)

To boot OpenBSD along with Windows 3.1, Windows95, or DOS you must use a boot loader on the system that can handle OpenBSD, Windows, and DOS! Some bootloaders of choice are osbs20b8.zip or The Ranish Partition Manager. Both of these are able to boot OpenBSD partitions.

OpenBSD & Linux (i386)

Please refer to INSTALL.linux, which gives indepth instructions on getting OpenBSD working with Linux.

4.5 - Sending your dmesg to dmesg@openbsd.org after the install

Just to remind people, it's important for the OpenBSD developers to keep track of what hardware works, and what hardware doesn't work perfectly..

A quote from /usr/src/etc/root/root.mail

If you wish to ensure that OpenBSD runs better on your machines, please do us
a favor (after you have your mail system setup!) and type
        dmesg | mail dmesg@openbsd.org
so that we can see what kinds of configurations people are running.  We will
use this information to improve device driver support in future releases.
(We would be much happier if this information was for the supplied GENERIC
kernel; not for a custom compiled kernel).  The device driver information
we get from this helps us fix existing drivers.
Also check with section 14.7

Make sure you send email from an account that is able to also receive email so developers can contact you back if they have something they want you to test or change in order to get your setup working. It's not important at all to send the email from the same machine that is running OpenBSD, so if that machine is unable to receive email, just

 dmesg | mail your-account@yourmail.dom
and then forward that message to
 dmesg@openbsd.org
where your-account@yourmail.dom is your regular email account. (or transfer the dmesg output using ftp/scp/floppydisk/carrier-pigeon/...)

NOTE - Please send only GENERIC kernel dmesg's. Custom kernels that have device drivers removed are not helpful.

[Back to Main Index] [To Section 3.0 - Obtaining OpenBSD] [To Section 5.0 - Kernel configuration and Disk Setup]


[back] www@openbsd.org
$OpenBSD: faq4.html,v 1.80 2001/01/02 20:27:00 wvdputte Exp $