[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-newbies
Subject:    4 - OpenBSD 3.4 Installation Guide
From:       Bob <bodem () new ! rr ! com>
Date:       2003-12-30 16:11:47
Message-ID: 3FF1A3C3.1090000 () new ! rr ! com
[Download RAW message or body]

Greg, Look at this link it should give you all the info you need to 
determine the proper size of partitions. Hope this helps.
Bob
http://www.openbsd.org/faq/faq4.html#SpaceNeeded

["www.openbsd.org/faq/faq4.html#SpaceNeeded" (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>4 - OpenBSD 3.4 Installation Guide</title>
<link rev= "made" href= "mailto:www@openbsd.org">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name= "resource-type" content= "document">
<meta name= "description"   content= "the OpenBSD FAQ page">
<meta name= "keywords"      content= "openbsd,faq">
<meta name= "distribution"  content= "global">
<meta name= "copyright"     content= "This document copyright 1998-2003 by OpenBSD.">


			<!-- ZoneLabs Privacy Insertion -->
			<script language='javascript' \
src='http://127.0.0.1:1028/js.cgi?pcaw&r=28009'></script>

</head>

<!-- Passes validator.w3.org.  Please keep it this way -->

<body bgcolor= "#ffffff" text= "#000000">

<img alt="[OpenBSD]" height=30 width=141 src="../images/smalltitle.gif">
<p>

<font color= "#0000e0">
<a href= "index.html">[FAQ Index]</a>
<a href= "faq3.html">[To Section 3 - Obtaining OpenBSD]</a>
<a href= "faq5.html">[To Section 5 - Building the System from Source]</a>
</font>

<h1><font color="#e00000">4 - OpenBSD 3.4 Installation Guide</font></h1>
<hr>

<p>
<h3>Table of Contents</h3>
<ul>
<li><a href= "#Overview"    >4.1 - Overview of the OpenBSD installation
                                     procedure</a>
<li><a href= "#Checklist"   >4.2 - Pre-installation checklist</a>

<li><a href="#MkInsMedia"   >4.3 - Creating bootable OpenBSD install
                                     media</a>
    <ul>
    <li><a href="#UnixFlop" >4.3.1 - Creating floppies on Unix</a>
    <li><a href="#DosFlop"  >4.3.2 - Creating floppies on Windows or DOS</a>
    <li><a href="#MkCD-ROM" >4.3.3 - Creating a boot CD</a>
    </ul>
<li><a href="#Boot"         >4.4 - Booting OpenBSD install media</a>
<li><a href="#Install"      >4.5 - Performing an install</a>
  <ul>
  <li><a href="#Start"      >4.5.1 - Starting the install</a>
  <li><a href="#Disks"      >4.5.2 - Setting up disks</a>
  <li><a href="#Hostname"   >4.5.3 - Setting the system hostname</a>
  <li><a href="#Network"    >4.5.4 - Configuring the network</a>
  <li><a href="#InstMedia"  >4.5.5 - Choosing installation media</a>
  <li><a href="#Filesets"   >4.5.6 - Choosing filesets</a>
  <li><a href="#Finish"     >4.5.7 - Finishing up</a>
  <li><a href="#OtherInf"   >4.5.8 - Other Information Resources</a>
  </ul>

<li><a href= "#FilesNeeded" >4.6 - What files are needed for installation?</a>
<li><a href= "#SpaceNeeded" >4.7 - How much space do I need for an
                                     OpenBSD installation?</a>
<li><a href= "#Multibooting">4.8 - Multibooting OpenBSD/i386</a>
<li><a href= "#SendDmesg"   >4.9 - Sending your dmesg to dmesg@openbsd.org
                                     after the install</a>
<li><a href= "#AddFileSet"  >4.10 - Adding a file set after install</a>
<li><a href= "#bsd.rd"      >4.11 - What is 'bsd.rd'?</a>
<li><a href= "#InstProb"    >4.12 - Common installation problems</a>
  <ul>
  <li><a href="#cpq16m"     >4.12.1 - My Compaq only recognizes 16M RAM</a>
  <li><a href="#noboot"     >4.12.2 - My i386 won't boot after install</a>
  <li><a href="#sshhang"    >4.12.3 - My machine booted, but hung at the
     ssh-keygen process</a>
  <li><a href="#noftplist"  >4.12.4 - I got the message "Failed to change
     directory" when doing an install</a>
  <li><a href="#krb4"       >4.12.5 - When I login, I get 
     "login_krb4-or-pwd: Exec format error"</a>
  </ul>
<li><a href= "#site"        >4.13 - Customizing the install process</a>
<li><a href= "#Multiple"    >4.14 - How can I install a number of similar
     systems?</a>
<li><a href="#getdmesg"     >4.15 - How can I get a dmesg(8) to report an
     install problem?</a>
<li><a href="#bsdrdaout"    >4.16 - Upgrading/reinstalling OpenBSD/i386
     using <tt>bsd.rd-a.out</tt></a>.
</ul>
<hr>

<p>
<a name= "Overview"></a>
<h2>4.1 - Overview of the OpenBSD installation procedure</h2>

<p>
OpenBSD has a robust and adaptable text-based installation procedure,
and can be installed from a single floppy disk.
Most platforms follow a similar installation procedure;
however there are some differences in the details.
In all cases, you are urged to read the platform-specific INSTALL
document in the <i>platform</i> directory on the CD-ROM or FTP sites
(for example, <tt>i386/INSTALL.i386</tt>, <tt>mac68k/INSTALL.mac68k</tt>
or <tt>sparc/INSTALL.sparc</tt>).

<p>
On most platforms, the OpenBSD installation uses a special
kernel with a number of utilities and install scripts embedded in a
preloaded RAM disk.
After this kernel is booted, the operating system is extracted from
a number of compressed
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=tar&amp;sektion=1">tar(1)</a>
(<tt>.tgz</tt>) files.
There are several ways to boot this install kernel:

<ul>
<li><b>Floppy disk:</b>
Floppy disk images are provided which can be
used to create an install floppy on another
<a href="#UnixFlop">Unix-like</a> system, or on a
<a href="#DosFlop">DOS/Windows</a> system.
Typical file names are <tt>floppy34.fs</tt>, though several platforms
have multiple floppy images available.

<li><b>CD-ROM:</b> On several platforms a CD-ROM image
(<tt>cd34.iso</tt>) is provided allowing creation of a bootable CD-ROM.
This just contains the installation kernel - install files must still be
retrieved via FTP or other source.
You can, of course, build your own CD-ROM with whatever files and
tools you desire.

<li><b><a href="#bsd.rd">bsd.rd</a>:</b> The RAM disk kernel,
intended for booting off either an already existing OpenBSD partition or
booting over the network.

<li><b>Network:</b> Some platforms support booting over a network.

<li><b>Writing a file system image to disk:</b> a filesystem image that
can be written to an existing partition, and then can be booted.

<li><b>Bootable Tape:</b> Some platforms support booting from tape.
These tapes can be made following the INSTALL.<i>platform</i>
instructions.

</ul>

Not every <a href="../plat.html">platform</a> supports all boot options:

<ul>
<li><a href="../alpha.html"><b>alpha:</b></a> Floppy, CD-ROM, writing a
floppy image to hard disk.

<li><a href="../hp300.html"><b>hp300:</b></a> CD-ROM, network.

<li><a href="../hppa.html"><b>hppa:</b></a> Network.

<li><a href="../i386.html"><b>i386:</b></a> Floppy, CD.

<li><a href="../mac68k.html"><b>mac68k:</b></a> Installed (and booted)
using MacOS utilities.
See
<a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/mac68k/INSTALL.mac68k">INSTALL.mac68k</a> \
for details.

<li><a href="../macppc.html"><b>macppc:</b></a> CD-ROM, network.

<li><a href="../mvme68k.html"><b>mvme68k:</b></a> Network, bootable tape.

<li><a href="../sparc.html"><b>sparc:</b></a> Floppy, CD-ROM, network,
writing image to existing swap partition, bootable tape.

<li><a href="../sparc64.html"><b>sparc64:</b></a> Floppy (U1/U2 only),
CD-ROM, network, writing image to existing partition.

<li><a href="../vax.html"><b>vax:</b></a> Floppy, network.

</ul>

All platforms other than mac68k can also use a
<a href="#bsd.rd">bsd.rd</a> to reinstall or upgrade.

<p>
Once the install kernel is booted, you have several options of where to get
the <a href="#FilesNeeded">install file sets</a>.
Again, not every platform supports every option.

<ul>
<li><b>CD-ROM:</b> Of course, we prefer you use the
<a href="../orders.html">Official CD-ROM set</a>, but for special needs,
you can also make your own.

<li><b>FTP:</b>
Either one of the OpenBSD
<a href="../ftp.html">FTP mirror sites</a>
or your own local FTP server holding the file sets.

<li><b>HTTP:</b>
Either one of the OpenBSD
<a href="../ftp.html#http">HTTP mirror sites</a>
or your own local web server holding the file sets.

<li><b>Local disk partition:</b>
In many cases, you can install file sets from another partition
on a local hard disk.
For example, on <a href="../i386.html">i386</a>,
you can install from a FAT partition or a CD-ROM formatted in
ISO9660, Rock Ridge or Joliet format.
In some cases, you will have to manually mount the file system before using it.

<li><b>NFS:</b>
Some platforms support using NFS mounts for the file sets.

<li><b>Tape:</b>
File sets can also be read from a supported tape.
</ul>

<a name="Checklist"></a>
<h2>4.2 - Pre-installation checklist</h2>

<p>
Before you start your install, you should have some idea what you
want to end up with.

You will want to know the following items, at least:
<ul>
<li>Machine name
<li>Hardware installed and available
  <ul>
  <li>Verify compatibility with your platform's hardware
      compatibility page
  <li>If ISA, you also need to know hardware settings, and confirm
      they are as OpenBSD requires.
  </ul>
<li>Install method to be used (CD-ROM, FTP, etc.)
<li>How will the system be updated and patched?
  <ul>
  <li>If done locally, you will need to have
      <a href="#SpaceNeeded">sufficient space</a> available for the
      source tree and building it.
  <li>Otherwise, you will need access to another machine to build
      a patched
      <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=release&amp;sektion=8">release</a>
  on.
  </ul>
<li>Desired disk layout
  <ul>
  <li>Does existing data need to be saved elsewhere?
  <li>Will OpenBSD co-exist on this system with another OS?
      If so, how both will be booted?
      Will you need to install a "boot manager"?
  <li>Will the entire disk be used for OpenBSD, or do you want to
      keep an existing partition/OS (or space for a future one)?
  <li>How do you wish to sub-partition the OpenBSD part of your
      disk?
  </ul>
<li>Network settings, if not using DHCP:
  <ul>
  <li>Domain name
  <li>Domain Name Server(s) (DNS) address
  <li>IP addresses and subnet masks for each NIC
  <li>Gateway address
  </ul>
<li>Will you be running the X Window System?
</ul>


<a name="MkInsMedia"></a>
<h2>4.3 - Creating bootable OpenBSD install media</h2>

<p>
As examples, we will look at the installation images available for the
<a href="../i386.html">i386</a>
and <a href="../sparc.html">sparc</a> platforms.

<p>
The <a href="../i386.html">i386</a> platform has five separate
installation disk images to choose from:

<ul>
<li><b><tt>floppy34.fs</tt></b> (Desktop PC) supports many
	PCI and ISA NICs, IDE and simple SCSI adapters and some PCMCIA
	support.  <i>Most</i> users will use this image.
<li><b><tt>floppyB34.fs</tt></b> (Servers) supports many RAID controllers,
	and some of the less common SCSI adapters.  However,
	support for many standard SCSI adapters and many EISA and ISA
	NICS has been removed.
<li><b><tt>floppyC34.fs</tt></b> (Laptops) supports the CardBus and PCMCIA
	devices found in many laptops.
<li><b><tt>cdrom34.fs</tt></b> is, in effect a combination of
	all three boot disks. It can be used to make a bootable 2.88M
	floppy, or more commonly,  as a boot image for a custom
	recordable CD.
<li><b><tt>cd34.iso</tt></b> is an ISO9660 image that can be used to
	create a bootable CD with most popular CD-ROM creation software
	on most platforms.
        This is <tt>cdrom34.fs</tt> in a "ready-to-record" format.
</ul>

Yes, there may be situations where one install disk is required
to support your SCSI adapter and another disk is required to support
your network adapter.
Fortunately, this is a rare event, and can usually be worked around.

<p>
The <a href="../sparc.html">sparc</a> platform has three separate
installation disk images to choose from:

<ul>
<li><b><tt>floppy34.fs:</tt></b> Supports systems with a floppy disk.
<li><b><tt>cd34.iso</tt></b> An ISO image usable to make your own
  CD for booting SPARC systems with a CD-ROM.
<li><b><tt>miniroot34.fs</tt></b> Can be written to a swap partition
  and booted.
</ul>

<a name="MkFlop"></a>
<a name="UnixFlop"></a>
<h3>4.3.1 - Creating floppies on Unix</h3>

<p>
To create a formatted floppy, use the
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=fdformat&amp;sektion=1&amp;arch=i386">fdformat(1)</a>
 command to both format and check for bad sectors.

<p>
<table border=0 width="650"> <tr> <td nowrap bgcolor="#EEEEEE"><pre>
  # <b>fdformat /dev/rfd0c</b>
  Format 1440K floppy `/dev/rfd0c'? (y/n): y
  Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done.
</pre></td></tr> </table>

<p>
If your output is like the above example, then the disk is OK.
However, if you do not see ALL "Vr"'s then the disk is most
likely bad, and you should try a new one.

<p>
Note that some Unix-like systems have different commands for formatting
floppies.
Refer to your system's documentation for the exact procedure.

<p>
Once you have a clean, formatted floppy it is time to write the
installation image to floppy.
For this, you can use the
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=dd&amp;sektion=0">dd(1)</a>
utility.
An example usage of <tt>dd(1)</tt> is below:

<p>
<table border=0 width="650"> <tr> <td nowrap bgcolor="#EEEEEE"><pre>
  # <b>dd if=floppy34.fs of=/dev/rfd0c bs=32k</b>
</pre></td></tr></table>

<p>
Once the image is written, check to make sure that the copied image is
the same as the original with the
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=cmp&amp;sektion=1">cmp(1)</a>
command.
If the diskette is identical to the image, you will just see another prompt.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  # <b>cmp /dev/rfd0c floppy34.fs</b>
</pre></td> </tr> </table>

<a name="DosFlop"></a>
<h3>4.3.2 - Creating floppies on Windows or DOS</h3>

<p>
This section describes how to write the installation images to
floppy disk under Windows or DOS.
You can get the tools mentioned below from the
<a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/tools/">tools</a>
directory on any of the ftp mirrors,
or from the <tt>3.4/tools</tt> directory on CD1 of the OpenBSD CD set.

<p>
To prepare a floppy in MS-DOS or Windows, first use the native
formatting tools to format the disk.

<p>
To write the installation image to the prepared floppy you can use
<i>rawrite</i>, <i>fdimage</i>, or <i>ntrw</i>.
<i>rawrite</i> will not work on Windows NT, 2000 or XP.

<p>
Note that <tt>FDIMAGE.EXE</tt> and <tt>RAWRITE.EXE</tt> are both
MS-DOS applications, and thus are limited to MS-DOS's "8.3" file naming
convention.
As <tt>floppyB34.fs</tt> and <tt>floppyC34.fs</tt> have longer file names,
you will have to find out how your system stored
the file in "8.3 format" before using <tt>FDIMAGE.EXE</tt> or
<tt>RAWRITE.EXE</tt> to make your boot floppies.

<p>
Example usage of <i>rawrite</i>:
<table border=0 width="650"> <tr> <td nowrap bgcolor="#EEEEEE"><pre>
  C:\> <b>rawrite</b>
  RaWrite 1.2 - Write disk file to raw floppy diskette

  Enter source file name: <b>floppy34.fs</b>
  Enter destination drive: <b>a</b>
  Please insert a formatted diskette into drive A: and press -ENTER- : \
<i><b>Enter</b></i> </pre> </td> </tr> </table>

<p>
Example usage of <i>fdimage</i>:
<table border=0 width="650"> <tr> <td nowrap bgcolor="#EEEEEE"><pre>
  C:\> <strong>fdimage -q floppy34.fs a:</strong>
</pre></td></tr></table>

<p>
Example usage of <i>ntrw</i>:
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  C:\> <strong>ntrw floppy34.fs a:</strong>
  3.5", 1.44MB, 512 bytes/sector
  bufsize is 9216
  1474560 bytes written
</pre></td></tr></table>

<a name="MkCD-ROM"></a>
<h3>4.3.3 - Making a CD-ROM</h3>

<p>
You can create a CD-ROM using either the <tt>cd34.iso</tt> file or, in
the case of the i386 platform, you can also use the <tt>cdrom34.fs</tt>
as the bootable floppy image that is used to boot an i386 system from
CD-ROM.
The exact details here are left to the reader to determine with
the tools they have at their disposal.

<p>
Some of the tools in OpenBSD are:
<ul>
<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mkhybrid&amp;sektion=8">mkhybrid(8)</a>
 <li><a href="http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html">cdrecord</a>,
 part of the cdrtools collection in the <a href="faq8.html#Ports">OpenBSD
Ports System</a>.
</ul>

<a name="Boot"></a>
<h2>4.4 - Booting OpenBSD install media</h2>

<h3>Booting i386</h3>

Booting an install image on the i386 PC platform is nothing new to most
people.
If you are using a floppy disk, simply insert the floppy into
the floppy drive and boot the system.
The install image will then load, provided floppy boot is enabled in your BIOS.
If you want to boot from CD, you must go into your system's BIOS
and set the boot options to allow booting from CD.
Some older BIOSes do not have this option, and you must use a floppy
for booting your installation image.
Don't worry though; even if you boot from floppy you can still install
from the CD.

<h3>Booting sparc/sparc64</h3>

<b>NOTE:</b>
On the <a href="../sparc64.html">sparc64</a> platform, only the SBus
machines (Ultra 1, Ultra 2) are bootable from floppy.

<p>
To boot from floppy, place the floppy disk with the OpenBSD
installation image on it into the floppy drive.
Then use the following command to boot from the floppy:

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  ok <b>boot floppy</b>
</pre></td></tr></table>

<p>
To boot from CD-ROM, place the OpenBSD CD-ROM disk into the drive.
If your Sun only has one CD-ROM drive, then just go to the boot prompt,
where you can '<tt>boot cdrom</tt>':

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  ok <b>boot cdrom</b>
</pre></td></tr></table>

<p>
Of course, this will only work in new command mode.
If you are at the old command mode prompt (a right arrow), type 'n'
for the new command mode.
(If you are using an old sparc that is pre-sun4c, you probably
don't have a new command mode.
In this case, you need to experiment.)
If you have multiple CD-ROM devices, you need to boot from the correct one.
Try <tt>probe-scsi</tt> from the new command mode.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  ok <b>probe-scsi</b>

  Target 0
    Unit 0   Disk     QUANTUM LIGHTNING 365S
  Target 1
    Unit 0   Removable Disk     QUANTUM EMPIRE_1080S
  Target 3
    Unit 0   Removable Disk     Joe's CD-ROM
</pre></td></tr></table>

<p>
Figure out which disk is the CD-ROM you want to boot from.  Note the
target number.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  ok <b>boot /sbus/esp/sd@X,0</b>
</pre></td></tr></table>


<a name="Install"></a>
<h2>4.5 - Performing an install</h2>
<a name="Start"></a>
<h3>4.5.1 - Starting the install</h3>
<!-- XXXrelease -->
Whatever your means of booting is, it is now time to use it.  During 
the boot process, the kernel and all of the programs used to install
OpenBSD are loaded into memory.  The most common problem
when booting is a bad floppy disk or a drive alignment problem.  The
boot floppy is quite tightly packed -- any bad spot will cause problems.

<p>
At almost any point during the OpenBSD install process, you can
terminate the current install attempt by hitting CTRL-C and can restart
it without rebooting by running <tt>install</tt> at the shell prompt.

<p>
When your boot is successful, you will see a lot of text messages scroll by.
This text, on many architectures in white on blue, is the
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=dmesg&amp;sektion=8">dmesg</a>, \
 the kernel telling you what devices have been found,
and where. Don't worry about remembering this text, as a copy is saved as
<tt>/var/run/dmesg.boot</tt>. On some architectures, SHIFT+PGUP will
let you examine text that has scrolled off the screen.

<p>
Then, you will see the following:

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02
  erase ^?, werase ^W, kill ^U, intr ^C, status ^T
  (I)nstall, (U)pgrade or (S)hell? <b>i</b>
</pre></td></tr></table>

<p>
And with that, we reach our first question.  Most of the time, you have
the three options shown:
<ul>
<li><b>Install:</b> load OpenBSD onto the system, overwriting whatever
may have been there.  Note that it is possible to leave some partitions
untouched in this process, such as a <tt>/home</tt>, but otherwise, 
assume everything else is overwritten.
<li><b>Upgrade:</b> Install a new set of <a href="#FilesNeeded">install
files</a> on this machine, but do not overwrite any configuration
information, user data, or additional programs.  No disk formatting is
done, nor are the /etc or /var directories overwritten.
A few important notes:
<ul>
<li> You will not be given the option of installing the
<tt>etc34.tgz</tt> file.
After the install, you will have to manually merge the changes of
<tt>etc34.tgz</tt> into your system before you can expect it to be
fully functional.
This is an important step which must be done, as otherwise certain key
services (such as
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=pf&amp;sektion=4">pf(4)</a>)
may not start.

<li>The Upgrade process is not designed to skip releases!
While this will often work, it is not supported.
For OpenBSD 3.4, upgrading 3.3 to 3.4 is the only supported upgrade.
If you have to upgrade from an older version, a complete reinstall is
recommended.<br>

<li>The i386 platform has switched to the
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=elf&amp;sektion=5">ELF</a>
binary format, and will require uninstalling all installed packages and ports
before upgrade.
Reinstallation is <i>highly</i> recommended over upgrade.
</ul>

<li><b>Shell:</b> Sometimes, you need to perform repairs or maintenance
to a system which will not (or should not) boot to a normal kernel.  
This option will allow you to do maintenance to the system.
</ul>

On occasion, you will not see the "Upgrade" option listed.
After a <i>flag day</i> event, it is not possible to directly upgrade;
one must rebuild the system from scratch.

<p>
In this example, we will do an install, but the upgrade process is similar.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Welcome to the OpenBSD/i386 3.4 install program.

  This program will help you install OpenBSD in a simple and rational way. At
  any prompt except password prompts you can run a shell command by typing
  '!foo', or escape to a shell by typing '!'. Default answers are shown in []'s
  and are selected by pressing RETURN. At any time you can exit this program by
  pressing Control-C and then RETURN, but quitting during an install can leave
  your system in an inconsistent state.

  Specify terminal type: [vt220]
  Do you wish to select a keyboard encoding table? [n] <b><i>ENTER</i></b>
</pre></td></tr></table>

<p>
In most cases, the default terminal type is appropriate; however if you
are using a <a href="faq7.html#SerCon">serial console</a> for install,
don't just take the default,
respond appropriately.

<p>
If you do not select a keyboard encoding table, a US keyboard layout
will be assumed.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this
  program can cause SIGNIFICANT data loss.

  It is often helpful to have the installation notes handy. For complex disk
  configurations, relevant disk hardware manuals and a calculator are useful.

  Proceed with install? [n] <b>y</b>
</pre></td></tr></table>

<p>
If you take the default here, the install process will terminate and
drop you to a shell prompt.

<a name="Disks"></a>
<h3>4.5.2 - Setting up disks</h3>

<p>
Setting up disks in OpenBSD varies a bit between platforms. For
<a href="../i386.html">i386</a> and <a href="../macppc.html">macppc</a>,
disk setup is done in two stages.  First, the OpenBSD slice of the hard
disk is defined using fdisk(8), then that slice is subdivided into
OpenBSD partitions using disklabel(8).

<p>
Some users may be a little confused by the terminology used here. It
will appear we are using the word "partition" in two different ways.
This observation is correct. There are two layers of partitioning in
several OpenBSD platforms, the first, one could consider the Operating
System partitioning, which is how multiple OSs on one computer mark out
their own space on the disk, and the second one is how the OpenBSD
partition is sub-partitioned into individual filesystems.  The first
layer is visible as a disk partition to DOS, Windows, and any other OS
that can coexist with other Operating Systems on the IBM AT descended
machines.  The second layer of partitioning is visible only to OpenBSD
and those OSs which can directly read an OpenBSD filesystem.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Cool!  Let's get to it...

  You will now initialize the disk(s) that OpenBSD will use. To enable all
  available security features you should configure the disk(s) to allow the
  creation of separate filesystems for /, /tmp, /var, /usr, and /home.

  Available disks are: wd0.
  Which one is the root disk? (or done) [wd0] <b><i>Enter</i></b>
</pre></td></tr></table>

<p>
The root disk is the disk the system will boot from, and normally where
swap space resides.  Usually, this will be the default -- if it isn't, you
will need to know how to force your computer to boot from a non-standard
disk.  IDE disks will show up as <tt>wd0</tt>, <tt>wd1</tt>, etc., SCSI disks and
RAID devices will show up as <tt>sd0</tt>, <tt>sd1</tt>, and so on.  All the
disks OpenBSD can find are listed here -- if you have drives which are
not showing up, you have unsupported or improperly configured hardware.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Do you want to use *all* of wd0 for OpenBSD? [no] <b><i>Enter</i></b>
</pre></td></tr></table>

<p>
If you say "yes" to this question, the entire disk will be allocated to
OpenBSD.  This will result in a standard Master Boot Record and partition
table being written out to disk -- one partition, the size of the entire
hard disk, set to the OpenBSD partition type, and flagged as the
bootable partition.  This will be a common choice for most production
uses of OpenBSD; however, there are some systems this should not be done
on.  Many Compaq systems, many laptops, some Dell and other systems use a
"maintenance" or "Suspend to Disk" partition, which should be kept intact.
If your system
has any other partitions of any type you do not wish to erase, do not
select "yes" to the above question.

<p>
For the sake of this example, we will assume the disk is to be split
between OpenBSD and a pre-existing Windows 2000 partition, so we
take the default of "no", which will take us into the 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=fdisk&amp;sektion=8&amp;arch=i386">fdisk(8)</a>
 program.  You can also get more information on fdisk(8)
<a href="faq14.html#fdisk">here</a>.

<p>
<b>Important Note:</b>
Users with a large hard disk (larger than 8G on a newer i386, though on
older machines and different platforms, often much smaller) will want to
see <a href="faq14.html#LargeDrive">this section</a> before going any
further.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  You will now create a single MBR partition to contain your OpenBSD data. This
  partition must have an id of 'A6'; must *NOT* overlap other partitions; and
  must be marked as the only active partition.

  The 'manual' command describes all the fdisk commands in detail.

  Disk: wd0       geometry: 2586/240/63 [39100320 Sectors]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
  *0: 06    0   1  1 -  202 239 63 [          63:     3069297 ] DOS > 32MB
   1: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
   2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
  Enter 'help' for information
  fdisk: 1> <b>help</b>
          help            Command help list
          manual          Show entire OpenBSD man page for fdisk
          reinit          Re-initialize loaded MBR (to defaults)
          setpid          Set the identifier of a given table entry
          disk            Edit current drive stats
          edit            Edit given table entry
          flag            Flag given table entry as bootable
          update          Update machine code in loaded MBR
          select          Select extended partition table entry MBR
          print           Print loaded MBR partition table
          write           Write loaded MBR to disk
          exit            Exit edit of current MBR, without saving changes
          quit            Quit edit of current MBR, saving current changes
          abort           Abort program without saving current changes
  fdisk: 1> 
</pre></td></tr></table>

<p>
A few commands are worthy of elaboration:
<ul>
<li><b><tt>r</tt></b> or <b><tt>reinit</tt>:</b> Clears existing
partition table, makes one big OpenBSD partition, flags it active.
Equivalent to saying "yes" to the "<tt>use *all* of ...</tt>" question.
<li><b><tt>p</tt></b> or <b><tt>print:</tt></b> Displays the current
partition table in sectors.  "<tt>p m</tt>" will show the partition
table in megabytes, "<tt>p g</tt>" will show it in gigabytes.
<li><b><tt>e</tt></b> or <b><tt>edit:</tt></b> edit or alter a table
entry.
<li><b><tt>f</tt></b> or <b><tt>flag:</tt></b> Marks a partition as the
active partition, the one that will be booted from
<li><b><tt>exit</tt></b> and <b><tt>quit:</tt></b> Careful on these, as
some users are used to "exit" and "quit" having opposite meanings.
</ul>

It is worth pointing out once again, a error here will result in
significant data loss.  If you are going to do this on a drive with
important data, it might be worth practicing on a "disposable" drive, in
addition to having a good backup.

<p>
Our drive here has a 1.5G partition for Windows 2000 (using the FAT 
filesystem).  Looking at the info from the above display, we can see 
that the Windows partition occupies through cylinder 202 on the drive.
So, we are going to allocate the rest of the disk to OpenBSD, starting
at cylinder 203.  You could also calculate OpenBSD's starting sector of
3069360 by adding the existing partition's starting sector (63) and its
size (3069297).

<p>
You can edit the drive layout in either Cylinder/Heads/Sectors
form or just raw sectors.  Which is easier depends upon what you 
are doing; in this case, working around an existing partition, using
CHS format will probably be easier.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  fdisk: 1> <b>e 1</b>
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
   1: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
  Partition id ('0' to disable)  [0 - FF]: [0] (? for help) <b>a6</b>
  Do you wish to edit in CHS mode? [n] <b>y</b>
  BIOS Starting cylinder [0 - 2585]: [0] <b>203</b>
  BIOS Starting head [0 - 239]: [0] <b><i>Enter</i></b>
  BIOS Starting sector [1 - 63]: [0] <b>1</b>
  BIOS Ending cylinder [0 - 2585]: [0] <b>2585</b>
  BIOS Ending head [0 - 239]: [0] <b>239</b>
  BIOS Ending sector [1 - 63]: [0] <b>63</b>
  fdisk:*1> <b>p</b>
  Disk: wd0       geometry: 2586/240/63 [39100320 Sectors]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
  *0: 06    0   1  1 -  202 239 63 [          63:     3069297 ] DOS > 32MB
   1: A6  203   0  1 - 2585 239 63 [     3069360:    36030960 ] OpenBSD
   2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
  fdisk:*1> <b>p m</b>
  Disk: wd0       geometry: 2586/240/63 [19092 Megabytes]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
  *0: 06    0   1  1 -  202 239 63 [          63:        1499M] DOS > 32MB
   1: A6  203   0  1 - 2585 239 63 [     3069360:       17593M] OpenBSD
   2: 00    0   0  0 -    0   0  0 [           0:           0M] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0M] unused
  fdisk:*1> 
</pre></td></tr></table>

<p>
Note that the prompt changed to include an asterisk ('<tt>*</tt>') to
indicate you have unsaved changes.  As we can see from the output of 
<tt>p&nbsp;m</tt> we have not altered our Windows partition, we have
successfully allocated the rest of the drive for OpenBSD, and the partitions
do not overlap.  We are in business.  Almost.

<p>
What we haven't done is flagged the partition as active so the machine 
will boot OpenBSD on the next reboot:

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  fdisk:*1> <b>f 1</b>
  Partition 1 marked active.
  fdisk:*1> <b>p</b>
  Disk: wd0       geometry: 2586/240/63 [39100320 Sectors]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
   0: 06    0   1  1 -  202 239 63 [          63:     3069297 ] DOS > 32MB
  *1: A6  203   0  1 - 2585 239 63 [     3069360:    36030960 ] OpenBSD
   2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
  fdisk:*1>
</pre></td></tr></table>

<p>
And now, we are ready to save our changes:

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  fdisk:*1> <b>w</b>
  Writing MBR at offset 0.
  wd0: no disk label
  fdisk: 1> <b>q</b>
</pre></td></tr></table> 

<p>

<a name="disklabel"></a>
<h3>Creating a disklabel</h3>
The next step is to use 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=disklabel&amp;sektion=8">disklabel(8)</a> \
 to slice up the OpenBSD partition.  More details on using disklabel(8) 
can be found in 
<a href="faq14.html#disklabel">FAQ 14, disklabel</a>.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Here is the partition information you chose:
  
  Disk: wd0       geometry: 2586/240/63 [39100320 Sectors]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
  *0: 06    0   1  1 -  202 239 63 [          63:     3069297 ] DOS > 32MB
   1: A6  203   0  1 - 2585 239 63 [     3069360:    36030960 ] OpenBSD
   2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused

  You will now create an OpenBSD disklabel inside the OpenBSD MBR
  partition. The disklabel defines how OpenBSD splits up the MBR partition
  into OpenBSD partitions in which filesystems and swap space are created.

  The offsets used in the disklabel are ABSOLUTE, i.e. relative to the
  start of the disk, NOT the start of the OpenBSD MBR partition.

  disklabel: no disk label
  WARNING: Disk wd0 has no label. You will be creating a new one.
  
  # using MBR partition 1: type A6 off 3069360 (0x2ed5b0) size 36030960 (0x225c9f0)

  Treating sectors 3069360-39100320 as the OpenBSD portion of the disk.
  You can use the 'b' command to change this.

  Initial label editor (enter '?' for help at any prompt)
  > <b>?</b>
  Available commands:
          p [unit]  - print label.
          M         - show entire OpenBSD man page for disklabel.
          e         - edit drive parameters.
          a [part]  - add new partition.
          b         - set OpenBSD disk boundaries.
          c [part]  - change partition size.
          d [part]  - delete partition.
          D         - set label to default.
          g [d|b]   - Use [d]isk or [b]ios geometry.
          m [part]  - modify existing partition.
          n [part]  - set the mount point for a partition.
          r         - recalculate free space.
          u         - undo last change.
          s [path]  - save label to file.
          w         - write label to disk.
          q         - quit and save changes.
          x         - exit without saving changes.
          X         - toggle expert mode.
          z         - zero out partition table.
          ? [cmnd]  - this message or command specific help.
  Numeric parameters may use suffixes to indicate units:
          'b' for bytes, 'c' for cylinders, 'k' for kilobytes, 'm' for megabytes,
          'g' for gigabytes or no suffix for sectors (usually 512 bytes).
          Non-sector units will be rounded to the nearest cylinder.
  Entering '?' at most prompts will give you (simple) context sensitive help.
  > 
</pre></td></tr></table>

<p>
Again, a few of these commands could use a little elaboration:
<ul>
<li><b><tt>p</tt></b> - displays (prints) the current disklabel to the
screen, and you can use the modifiers <tt>k, m</tt> or <tt>g</tt> for
kilobytes, megabytes or gigabytes.

<li><b><tt>D</tt></b> - Clears any existing disklabel, creates a new
default disklabel which covers just the current OpenBSD partition.  This
can be useful if the disk previously had a disklabel on it, and the
OpenBSD partition was recreated to a different size -- the old disk
label may not get deleted, and may cause confusion.

<li><b><tt>m</tt></b> - Modifies an existing entry in a disklabel.
Do not over estimate what this will do for you. While it may alter the
size of a disklabel partition, it will NOT alter the filesystem on the
drive.  Using this option and expecting it to resize existing partitions
is a good way of losing large amounts of data.

</ul>

<p>
Slicing up your disk properly is important.  The answer to the question,
"How should I partition my system?" is "Exactly how you need it".  This
will vary from application to application.  There is no universal
answer.  If you are unsure of how you want to partition your system, see
<a href="#SpaceNeeded">this discussion</a>.

<p>
In this system, we have over 17G available for OpenBSD.  That's a lot 
of space, and it isn't likely we will need most of it.  So, we will 
deliberately not use absolute minimum sizes.  We would rather have a 
few hundred megabytes of unused space than a kilobyte too little.  

<p>
On the root disk, the two partitions 'a' and 'b' <b>must</b> be 
created. The installation process will not proceed until these two
partitions are available. 'a' will be used for the root filesystem (/)
and 'b' will be used as swap space.

<p>
After a little thought, we decide to create just enough partitions to
allow the creation of the recommended separate filesystems (<tt>/, /tmp,
/var, /usr, /home</tt>) along with a swap partition:
<ul>
<li><i><b>wd0a: /</b></i> (root) - 150M.  Should be more than enough.
<li><i><b>wd0b: </b></i>(swap) - 300M.
<li><i><b>wd0d: /tmp</b></i> - 120M.  <tt>/tmp</tt> is used for building
  some software, 120M will probably be enough for most things.
<li><i><b>wd0e: /var</b></i> - 80M.  If this were to be a web or mail
  server, we'd have made this partition much larger, but, that's not
  what we are doing.
<li><i><b>wd0g: /usr</b></i> - 2G.  We want this partition to be large
  enough to load quite a few user applications, plus be able to update
  and rebuild the system if desired or needed.  The 
  <a href="../ports.html">Ports tree</a> will be here as well, which
  will take almost 100M of this space before ports are built.
<li><i><b>wd0h: /home</b></i> - 4G.  This will allow plenty of user file
  space.
</ul>

Now, if you add those up, you will see over 10G of space is unused!
Unused space won't hurt anything, and it gives us flexibility to enlarge
things in the future if need be.  Need more <i>/tmp</i>?  No problem,
create a new one in the unused space, change <i>/etc/fstab</i> and
problem solved.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  > <b>p m</b>
  device: /dev/rwd0c
  type: ESDI
  disk: ESDI/IDE disk
  label: ST320011A
  bytes/sector: 512
  sectors/track: 63
  tracks/cylinder: 16
  sectors/cylinder: 1008
  cylinders: 16383
  total sectors: 39102336
  free sectors: 36030960
  rpm: 3600
  
  16 partitions:
  #        size   offset    fstype   [fsize bsize   cpg]
    a: 17593.2M  1498.7M    unused        0     0
    c: 19092.9M     0.0M    unused        0     0
    i:  1498.7M     0.0M     MSDOS
  > <b>d a</b>
  > <b>a a</b>
  offset: [3069360] <b><i>Enter</i></b>
  size: [36030960] <b>150M</b>
  Rounding to nearest cylinder: 307440
  FS type: [4.2BSD] <b><i>Enter</i></b>
  mount point: [none] <b>/</b>
  > <b>a b</b>
  offset: [3376800] <b><i>Enter</i></b>
  size: [35723520] <b>300M</b>
  Rounding to nearest cylinder: 614880
  FS type: [swap] <b><i>Enter</i></b>
  > <b>a d</b>
  offset: [3991680] <b><i>Enter</i></b>
  size: [35108640] <b>120m</b>
  Rounding to nearest cylinder: 245952
  FS type: [4.2BSD] <b><i>Enter</i></b>
  mount point: [none] <b>/tmp</b>
  > <b>a e</b>
  offset: [4237632] <b><i>Enter</i></b>
  size: [34862688] <b>80m</b>
  Rounding to nearest cylinder: 164304
  FS type: [4.2BSD] <b><i>Enter</i></b>
  mount point: [none] <b>/var</b>
  > <b>a g</b>
  offset: [4401936] <b><i>Enter</i></b>
  size: [34698384] <b>2g</b>
  Rounding to nearest cylinder: 4194288
  FS type: [4.2BSD] <b><i>Enter</i></b>
  mount point: [none] <b>/usr</b>
  > <b>a h</b>
  offset: [8596224] <b><i>Enter</i></b>
  size: [30504096] <b>4g</b>
  Rounding to nearest cylinder: 8388576
  FS type: [4.2BSD] <b><i>Enter</i></b>
  mount point: [none] <b>/home</b>
  > <b>p m</b>
  device: /dev/rwd0c
  type: ESDI
  disk: ESDI/IDE disk
  label: ST320011A
  bytes/sector: 512
  sectors/track: 63
  tracks/cylinder: 16
  sectors/cylinder: 1008
  cylinders: 16383
  total sectors: 39102336
  free sectors: 22115520
  rpm: 3600
  
  16 partitions:
  #        size   offset    fstype   [fsize bsize   cpg]
    a:   150.1M  1498.7M    4.2BSD     1024  8192    16  # /
    b:   300.2M  1648.8M      swap
    c: 19092.9M     0.0M    unused        0     0
    d:   120.1M  1949.1M    4.2BSD     1024  8192    16  # /tmp
    e:    80.2M  2069.2M    4.2BSD     1024  8192    16  # /var
    g:  2048.0M  2149.4M    4.2BSD     1024  8192    16  # /usr
    h:  4096.0M  4197.4M    4.2BSD     1024  8192    16  # /home
    i:  1498.7M     0.0M     MSDOS
  > <b>q</b>
  Write new label?: [y] <b><i>Enter</i></b>
</pre></td></tr></table>

<p>
You will note there is a <i>c</i> partition we seem to have ignored.  This
partition is your entire hard disk; don't attempt to alter it.  You will
also note the <i>i</i> partition wasn't defined by us; this is the
pre-existing Windows 2000 partition. Partitions are not assigned any particular \
letters -- with the exception of <i>a</i> (root), <i>b</i> (swap) and <i>c</i> \
(entire disk), the rest of the partitions (through letter <i>p</i>) are available for \
use as you desire.

<p>
If you look closely at the output of the disklabel, you will note that 
your drive RPM rating is probably wrong.  This is historical; the
drive speed is not used in any way by the system. Do not worry about
it.

<h3>Configuring your mount points and formatting your filesystems</h3>

Now comes the final configuration of your mount points.  If you configured the
mount points through 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=disklabel&amp;sektion=8">disklabel(8)</a>, \
 this step consists of just verifying
your selections; otherwise, you can specify them now.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  The root filesystem will be mounted on wd0a.
  wd0b will be used for swap space.
  Mount point for wd0d (size=122976k), none or done? [/tmp] <b><i>Enter</i></b>
  Mount point for wd0e (size=82152k), none or done? [/var] <b><i>Enter</i></b>
  Mount point for wd0g (size=2097144k), none or done? [/usr] <b><i>Enter</i></b>
  Mount point for wd0h (size=4194288k), none or done? [/home] <b><i>Enter</i></b>
  Mount point for wd0d (size=122976k), none or done? [/tmp] <b>done</b>
  Done - no available disks found.
 
  You have configured the following partitions and mount points:

  wd0a /
  wd0d /tmp
  wd0e /var
  wd0g /usr
  wd0h /home

  The next step creates a filesystem on each partition, ERASING existing data.
  Are you really sure that you're ready to proceed? [n] y
  /dev/rwd0a:     307440 sectors in 305 cylinders of 16 tracks, 63 sectors
          150.1MB in 20 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
  /dev/rwd0d:     245952 sectors in 244 cylinders of 16 tracks, 63 sectors
          120.1MB in 16 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
  /dev/rwd0e:     164304 sectors in 163 cylinders of 16 tracks, 63 sectors
          80.2MB in 11 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
  /dev/rwd0g:     4194288 sectors in 4161 cylinders of 16 tracks, 63 sectors
          2048.0MB in 261 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
  /dev/rwd0h:     8388576 sectors in 8322 cylinders of 16 tracks, 63 sectors
          4096.0MB in 521 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
  /dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Thu Oct 10 21:
  50:36 2 002)
  /dev/wd0h on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid,
   ctime=Thu Oct 10 21:50:36 2002)
  /dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid, 
  ctime=Thu Oct 10 21:50:36 2002)
  /dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Th
  u Oct 10 21:50:36 2002)
  /dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, 
  ctime=Th u Oct 10 21:50:36 2002)
</pre></td></tr></table>

<p>
You may wonder why the installer again asks for mount points.  This
allows you to recover from any errors or omissions in the mount
points specified during the creation of the disklabel. For instance,
the installation process will automatically delete any duplicate
mount points you enter during the configuration of the disklabel. The
disklabel program will allow you to enter such duplicates, and thus
they must be checked for after the disklabel program exits. The
deleted duplicate mount points will result in partitions without mount
points, that you must assign new mount points for if you wish to use
the space.

<p>
Notice the "Are you really sure that you are ready to proceed?" question
defaults to no, so you will have to deliberately tell it to proceed and
format your partitions. If you chose no, you would simply be dropped
into a shell and could start the install again by typing install, or
just by rebooting again with your boot disk.

<p>
At this point all filesystems will formatted for you.  This could take
some time depending on the size of the partitions and the speed of the
disk.

<a name="Hostname"></a>
<h3>4.5.3 - Setting the system hostname</h3>
<p>
Now you must set the system hostname.
This value, along with the DNS domain name (specified
<a href="#Network">below</a>), will be saved in the
file <tt>/etc/myname</tt>, which is used during normal boot to set
the hostname of the system.
If you do not set the domain name of the system, the default value of
'my.domain' will be used.

<p>
It is important to set this name now, because it will be used when the
cryptographic keys for the system are generated during the first boot
after installation. This generation takes place whether the network is
configured or not.

<p> 
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Enter system hostname (short form, e.g. 'foo'): <b>puffy</b>
</pre></td></tr></table>

<a name="Network"></a>
<h3>4.5.4 - Configuring the network</h3>

<p>
Now it is time to configure your network.  The network must be
configured if you are planning on doing a ftp or nfs based install,
considering it will be based upon the information you are about to
enter. Here is a walk through of the network configuration section of
the install process.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Configure the network? [y] <b><i>Enter</i></b>
  Available interfaces are: fxp0.
  Which one do you wish to initialize? (or 'done') [fxp0] <b><i>Enter</i></b>
  Symbolic (host) name for fxp0? [puffy] <b><i>Enter</i></b>
  The default media for fxp0 is
          media: Ethernet autoselect (100baseTX full-duplex)
  Do you want to change the default media? [n] <b><i>Enter</i></b>
  IP address for fxp0? (or 'dhcp') <b>199.185.137.55</b>
  Netmask? [255.255.255.0] <b><i>Enter</i></b>
  Done - no available interfaces found.
  DNS domain name? (e.g. 'bar.com') [my.domain] <b>example.com</b>
  DNS nameserver? (IP address or 'none') [none] <b>199.185.137.1</b>
  Use the nameserver now? [y] <b><i>Enter</i></b>
  Default route? (IP address, 'dhcp' or 'none') <b>199.185.137.128</b>
  add net default: gateway 199.185.137.128
  Edit hosts with ed? [n] <b><i>Enter</i></b> 
  Do you want to do any manual network configuration? [n] <b><i>Enter</i></b>
</pre></td></tr></table>

<p>
In the above example, we use a static IP address. As indicated, you can
use "<tt>dhcp</tt>" instead on most platforms (not
<a href="../alpha.html">Alpha</a>), assuming your environment supports
it. In the case of DHCP, most of the information will be grabbed from
the remote DHCP server; you will be given a chance to confirm it.
Here is a sample of the network configuration part of the install, this
time done with DHCP:

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Configure the network? [y] <b><i>Enter</i></b>
  Available interfaces are: fxp0.
  Which one do you wish to initialize? (or 'done') [fxp0] <b><i>Enter</i></b>
  Symbolic (host) name for fxp0? [puffy] <b><i>Enter</i></b>
  The default media for fxp0 is
          media: Ethernet autoselect (100baseTX full-duplex)
  Do you want to change the default media? [n] <b><i>Enter</i></b>
  IP address for fxp0? (or 'dhcp') <b>dhcp</b>
  Issuing hostname-associated DHCP request for fxp0.
  Internet Software Consortium DHCP Client 2.0pl5-OpenBSD
  Listening on BPF/fxp0/00:08:c7:77:b4:6b
  Sending on   BPF/fxp0/00:08:c7:77:b4:6b
  Sending on   Socket/fallback/fallback-net
  DHCPDISCOVER on fxp0 to 255.255.255.255 port 67 interval 1
  DHCPOFFER from 199.185.137.128
  DHCPREQUEST on fxp0 to 255.255.255.255 port 67
  DHCPACK from 199.185.137.128 
  New Network Number: 199.185.137.0
  New Broadcast Address: 199.185.137.255
  bound to 199.185.137.55 -- renewal in 43200 seconds.
  Done - no available interfaces found.
  DNS domain name? (e.g. 'bar.com') [example.org] <b><i>Enter</i></b>
  DNS nameserver? (IP address or 'none') [199.185.137.1] <b><i>Enter</i></b>
  Use the nameserver now? [y] <b><i>Enter</i></b>
  Default route? (IP address, 'dhcp' or 'none') [199.185.137.128] <b><i>Enter</i></b>
  add net default: gateway 199.185.137.128
  Edit hosts with ed? [n] <b><i>Enter</i></b>
  Do you want to do any manual network configuration? [n] <b><i>Enter</i></b>
</pre></td></tr></table>
<p>
<b>NOTE: </b>Only <b>one</b> interface can easily be configured using
DHCP during an install. If you attempt to configure more than one
interface using DHCP you will encounter errors. You have to manually
configure the additional interfaces after the installation.

<p>
Now, we set the password for the root account:
<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
Password for root account? (will not echo) <b><i>pAssWOrd</i></b>
Password for root account? (again) <b><i>pAssWOrd</i></b>
</pre></td></tr></table>
<p>
Use a secure password for the root account.  You will create other
user accounts after the system is booted.  From 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=passwd&amp;sektion=1">passwd(1)</a>:
 <pre>
    The new password should be at least six characters long and not purely
    alphabetic.  Its total length must be less than _PASSWORD_LEN (currently
    128 characters).  A mixture of both lower and uppercase letters, numbers,
    and meta-characters is encouraged.
</pre>

<a name="InstMedia"></a>
<h3>4.5.5 - Choosing installation media</h3>

<p>
After your network is set up, the install script will give you a chance
to make manual adjustments to the configuration. 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.

<p>
Next, you will get a chance to choose your installation media. The
options are listed below.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  You will now specify the location and names of the install sets you want to
  load. You will be able to repeat this step until all of your sets have been
  successfully loaded. If you are not sure what sets to install, refer to the
  installation notes for details on the contents of each.
 
  Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape
  device; or a (f)tp, (n)fs or (h)ttp server.
  Where are the install sets? <b>c</b>
  Available CD-ROMs are: cd0.
</pre></td></tr></table>

<p>
In this example we are installing from 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 need to, make sure you pick the device
which you will use to install OpenBSD from. 

<p>
<b>NOTE: </b>All possible sources for install sets are listed, but not
all may be available on your system. e.g. (n)fs is shown but not all
architectures allow NFS installations. If you choose a source that is
not available, you will get an error message and be given the chance
to choose another source for your installation sets.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Available CD-ROMs are: cd0.
  Which one contains the install media? (or 'done') [cd0] <b><i>Enter</i></b>

  Pathname to the sets?  (or 'done') [3.4/i386] <b><i>Enter</i></b>
</pre></td></tr></table>

<p>
Here, you are prompted for which directory the installation files are, 
which is <tt>3.4/i386/</tt> on the official CD-ROM.  

<a name="Filesets"></a>
<h3>4.5.6 - Choosing filesets.</h3>

<p>
Now it's time to choose which packages you will be installing. You can
get a description of these files in <a href="#FilesNeeded">the next
section</a>. The files that the install program finds will be shown to
you on the screen. Your job is just to specify which files you want. By
default all the non-X packages are selected; however, some people may
wish to limit this to the bare minimum required to run OpenBSD, which
would be <tt>base34.tgz</tt>, <tt>etc34.tgz</tt> and <tt>bsd</tt>.
Others will wish to install all packages. The example below is that of a
full install.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  The following sets are available. Enter a filename, 'all' to select
  all the sets, or 'done'. You may de-select a set by prepending a '-'
  to its name.

          [X] bsd
          [ ] bsd.rd
          [X] base34.tgz
          [X] etc34.tgz
          [X] misc34.tgz
          [X] comp34.tgz
          [X] man34.tgz
          [X] game34.tgz
          [ ] xbase34.tgz
          [ ] xshare34.tgz
          [ ] xfont34.tgz
          [ ] xserv34.tgz

  File Name? (or 'done') [bsd.rd] <b>all</b>

  The following sets are available. Enter a filename, 'all' to select
  all the sets, or 'done'. You may de-select a set by prepending a '-'
  to its name.

          [X] bsd
          [X] bsd.rd
          [X] base34.tgz
          [X] etc34.tgz
          [X] misc34.tgz
          [X] comp34.tgz
          [X] man34.tgz
          [X] game34.tgz
          [X] xbase34.tgz
          [X] xshare34.tgz
          [X] xfont34.tgz
          [X] xserv34.tgz
</pre></td></tr></table>

<p>
You can do all kinds of nifty things here -- <tt>-x*</tt> would remove
all X components, if you changed your mind.  In this case, we are going
to load all the sets.  While the system will run with fewer sets, either
the starting default or installing all sets is recommended.
More details on selecting sets <a href="#FilesNeeded">here</a>.

<p>
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, the
packages installed, and the speed of the source media.  This part may
from a few minutes to several hours.

<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  File Name? (or 'done') [done] <b><i>Enter</i></b>
  Ready to install sets? [y] <b><i>Enter</i></b>
  Getting bsd ...
  100% |**************************************************|  4735 KB    00:03
  Getting bsd.rd ...
  100% |**************************************************|  4275 KB    00:02
  Getting base34.tgz ...
  100% |**************************************************| 30267 KB    00:21
  Getting etc34.tgz ...
  100% |**************************************************|  1545 KB    00:01
  Getting misc34.tgz ...
  100% |**************************************************|  1909 KB    00:01
  Getting comp34.tgz ...
  100% |**************************************************| 17074 KB    00:13
  Getting man34.tgz ...
  100% |**************************************************|  6139 KB    00:04
  Getting game34.tgz ...
  100% |**************************************************|  2534 KB    00:01
  Getting xbase34.tgz ...
  100% |**************************************************| 10940 KB    00:06
  Getting xshare34.tgz ...
  100% |**************************************************|  1656 KB    00:02
  Getting xfont34.tgz ...
  100% |**************************************************| 31160 KB    00:21
  Getting xserv34.tgz ...
  100% |**************************************************| 15228 KB    00:11

  Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape
  device; or a (f)tp, (n)fs or (h)ttp server.
  Where are the install sets? (or 'done')
</pre></td></tr></table>

At this point, you can pull additional files from other sources if
desired, or hit '<tt>done</tt>' if you have installed all the file sets
you need.

<a name="Finish"></a>
<h3>4.5.7 - Finishing up</h3>

You will now be asked if you plan to run X on this system.  If you
answer 'Y', <tt>/etc/sysctl.conf</tt> will be modified to include the
line <tt>machdep.allowaperture=1</tt> or <tt>machdep.allowaperture=2</tt>,
depending on your platform.

<p>
Your last task is to enter the time zone.  Depending on where your
machine lives, there are may be several equally valid answers for the
question.  In the example that follows, we used <tt>US/Eastern</tt>, but
could also have used <tt>EST5EDT</tt> or <tt>US/Michigan</tt> and had
the same result.  Hitting <tt>?</tt> at the prompts will guide you
through your choices.

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Do you expect to run the X Window System? [y] <b>y</b>
  Saving configuration files......done.
  Generating initial host.random file ......done.
  What timezone are you in? ('?' for list) [US/Pacific] <b>?</b>
  Africa/      Chile/       GB-Eire      Israel       NZ-CHAT      Turkey
  America/     Cuba         GMT          Jamaica      Navajo       UCT
  Antarctica/  EET          GMT+0        Japan        PRC          US/
  Arctic/      EST          GMT-0        Kwajalein    PST8PDT      UTC
  Asia/        EST5EDT      GMT0         Libya        Pacific/     Universal
  Atlantic/    Egypt        Greenwich    MET          Poland       W-SU
  Australia/   Eire         HST          MST          Portugal     WET
  Brazil/      Etc/         Hongkong     MST7MDT      ROC          Zulu
  CET          Europe/      Iceland      Mexico/      ROK          posix/
  CST6CDT      Factory      Indian/      Mideast/     Singapore    posixrules
  Canada/      GB           Iran         NZ           SystemV/     right/
  What timezone are you in? ('?' for list) [US/Pacific] <b>US</b>
  What sub-timezone of 'US' are you in? ('?' for list) <b>?</b>
  Alaska          Central         Hawaii          Mountain        Samoa
  Aleutian        East-Indiana    Indiana-Starke  Pacific
  Arizona         Eastern         Michigan        Pacific-New
  Select a sub-timezone of 'US' ('?' for list): <b>Eastern</b>
  Setting local timezone to 'US/Eastern'...done.
</pre></td></tr></table>

If you are concerned about very precise time, you may wish to read
<a href="faq8.html#NTPerror">this</a>.

<p>
The last steps are for the system to create the <tt>/dev</tt> directory 
(which may take a while on some systems, especially if you have a small
amount of RAM), and install the 
boot blocks. 

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Making all device nodes...done.
  Installing boot block...
  boot: /mnt/boot
  proto: /usr/mdec/biosboot
  device: /dev/rwd0c
  /usr/mdec/biosboot: entry point 0
  proto bootblock size 512
  room for 12 filesystem blocks at 0x16f
  Will load 7 blocks of size 8192 each.
  Using disk geometry of 63 sectors and 240 heads.
   0:  9 @(203 150 55) (3078864-3078872)
   1: 63 @(203 151 1) (3078873-3078935)
   2: 24 @(203 152 1) (3078936-3078959)
   3: 16 @(203 8 47) (3069910-3069925)
  /mnt/boot: 4 entries total
  using MBR partition 1: type 166 (0xa6) offset 3069360 (0x2ed5b0)
  ...done.

  CONGRATULATIONS! Your OpenBSD install has been successfully completed!
  To boot the new system, enter halt at the command prompt. Once the
  system has halted, reset the machine and boot from the disk.
  # <b>halt</b>
  syncing disks... done

  The operating system has halted.
  Please press any key to reboot.
</pre></td></tr></table>

<p>
OpenBSD is now installed on your system and ready for its first
boot, but before you do...

<p>

<h4>Before you reboot</h4>
At this point, your system is installed and ready to be rebooted and
configured for service.  Before doing this, however, it would be wise to
check out the <a href="../errata.html">Errata page</a> to see if there
are any bugs that would immediately impact you.

<h4>After you reboot</h4>

<p>
One of your first things to read after you install your system is
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=afterboot&amp;sektion=8">afterboot(8)</a>.


<p>
You may also find the following links useful:
<ul>
<li><a href="faq10.html#AddDelUser">Adding users in OpenBSD</a> 
<li><a href="faq6.html#Setup">Initial Network Setup</a>
<li><a href="faq2.html#ManPages">Man Pages of popular/useful commands</a>
<li><a href="http://www.openbsd.org/cgi-bin/man.cgi">OpenBSD man pages on 
  the Web</a>
<li><a href="../ports.html">The OpenBSD Ports and Packages system for 
  installing software</a>, as well as 
<a href="faq8.html#Ports">here</a> and <a href="faq8.html#Packages">here</a>
</ul>

<h4>One last thing...</h4>
The OpenBSD developers ask you to
<a href="#SendDmesg">Send in a copy of your dmesg</a>.  This is 
really appreciated by the developers, and ultimately, all 
users.

<a name="OtherInf"></a>
<h3>4.5.8 - Other information resources</h3>

Additional documents already exist for those of you who might have 
special needs or interests. You can retrieve these from any of
the <a href="../ftp.html">mirror ftp sites</a>.
<ul>
<li><a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.i386">INSTALL.i386</a> \
                
  - Comprehensive installation document. Similar documents exist for all 
platforms.
<li><a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.linux">INSTALL.linux</a> \
                
  - Installing OpenBSD along with Linux.
<li><a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.mbr">INSTALL.mbr</a> 
  - Explaining the Master Boot Record.
<li><a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.pt">INSTALL.pt</a> 
  - Explaining Partition Tables.
<li><a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.dbr">INSTALL.dbr</a> 
  - DOS Floppy Disk Boot Sector.
<li><a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.chs">INSTALL.chs</a> 
  - Explaining CHS Translation.
<li><a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.ata">INSTALL.ata</a> 
  - ATA/ATA-1/ATA-2/IDE/EIDE/etc FAQ
<li><a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.os2br">INSTALL.os2br</a>
                
 - The os2 Boot Sector.
</ul>

<p>
<a name= "FilesNeeded"></a>
<h2>4.6 - What files are needed for installation?</h2>
<!-- XXXrelease -->

<p>
The complete OpenBSD installation is broken up into a number of 
separate <i>file sets</i>.  Not every application requires every
file set.  Here is an overview of each:
<p>
<ul>
  <li><b><i>bsd</i></b>          - This is the Kernel. <b>Required</b>
  <li><b><i>bsd.rd</i></b> - <a href="#bsd.rd">RAM disk kernel</a>
  <li><b><i>base34.tgz</i></b>   - Contains the base OpenBSD system 
    <b>Required</b>
  <li><b><i>etc34.tgz</i></b>    - Contains all the files in /etc 
    <b>Required</b>
  <li><b><i>comp34.tgz</i></b>    - Contains the compiler and its 
    tools, libs. <b>Recommended</b>
  <li><b><i>man34.tgz</i></b>    - Contains man pages <b>Recommended</b>
  <li><b><i>misc34.tgz</i></b>   - Contains misc info, setup documentation
  <li><b><i>game34.tgz</i></b>   - Contains the games for OpenBSD
  <li><b><i>xbase34.tgz</i></b>  - Contains the base install for X11
  <li><b><i>xfont34.tgz</i></b>  - Contains X11's font server and fonts
  <li><b><i>xserv34.tgz</i></b>  - Contains X11's X servers
  <li><b><i>xshare34.tgz</i></b> - Contains manpages, locale settings,
    includes, etc  for X
</ul>

<p>
<a name= "SpaceNeeded"></a>
<h2> 4.7 - How much space do I need for an OpenBSD installation?</h2>
<!-- XXXrelease -->

<p>
The following are minimum suggested filesystem 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.

<ul>
<li>These are minimum values.  
<li>If you plan to install a significant amount of third party software,
make your <tt>/usr</tt> partition large!  <b>At least</b> triple these
values!
<li>For a system that handles lots of email or web pages (stored,
respectively, in <tt>/var/mail</tt> and <tt>/var/www</tt>) you will want
to make your <tt>/var</tt> partition significantly larger, or put them
on separate partitions.
<li>For a multiuser system which may generate lots of logs, you will
still want to make your <tt>/var</tt> partition significantly larger
(<tt>/var/log</tt>).
<li>If you plan to rebuild the kernel or system from source, you will
want to make the <tt>/usr</tt> partition significantly larger, <b>at
least</b> 800M-1G larger than indicated below.
</ul>

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

<blockquote>
<pre>
<b>
SYSTEM          /       /usr    /var    /usr/X11R6
alpha           80M     250M    25M     140M
hp300           80M     250M    25M     140M
hppa           100M     200M    25M     120M
i386            60M     250M    25M     140M
mac68k          80M     250M    25M     100M
macppc          80M     250M    25M     140M
mvme68k         80M     250M    25M     100M
sparc           80M     250M    25M     120M
sparc64         80M     250M    25M     100M
vax            100M     200M    25M     120M
</b>
</pre>
</blockquote>

In addition, it is recommended that a <tt>/tmp</tt> partition be used.
The <tt>/tmp</tt> partition is used in the compiling of ports, among
other things, so how big you make it depends on what you do with it.
50M may be plenty for most people, but some large applications may
require 100M or more of <tt>/tmp</tt> space.

<p>
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
(<tt>/</tt>, <tt>/usr</tt>, and <tt>/var</tt>) plus some space for
<tt>/tmp</tt>.  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.

<p>
Swap space is used to store system core dumps on in the event of a
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=crash&amp;sektion=8">crash(8)</a>.
 If this is a consideration for you, your swap space should be slightly
larger than the amount of main memory you are likely to ever have in the
system.  Note that upon reboot, 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=savecore&amp;sektion=8">savecore(8)</a>
 will attempt to save the contents of the swap partition to a file in
<tt>/var/crash</tt> so again, if this is a priority for you, your
<tt>/var</tt> partition must have enough <i>free space</i> to hold these
dump files.

<p>
There are five main reasons for using separate filesystems, instead of
shoving everything into one or two filesystems:

<ul>
<li><b>Security</b>: You can mark some filesystems as 'nosuid', 'nodev', 
  'noexec', 'readonly', etc.  This is now done by the install process,
  in fact, if you use the above described partitions.
<li><b>Stability</b>: A user, or a misbehaved program, can fill a 
  filesystem with garbage if they have write permissions for it.  Your 
  critical programs, which of course run on a different filesystem, do 
  not get interrupted.
<li><b>Speed</b>: A filesystem which gets written to frequently may get
  somewhat fragmented.  (Luckily, the ffs filesystem, what OpenBSD uses,
  is not prone to heavy fragmentation.)
<li><b>Integrity</b>: If one filesystem is corrupted for some reason
  then your other filesystems are still OK.
<li><b>Size</b>: Many platforms have limits on the area of a disk where
  the boot ROM can load the kernel from.  In some cases, this limit may
  be very small (504M for an older 486), in other cases, a much larger
  limit (8G on new i386 systems).  As the kernel can end up anywhere in
  the root partition, the entire root partition should be within this
  area. For more details, see <a href="faq14.html#LargeDrive">this
  section</a>.  A good guideline might be to keep your / partition
  completely below 2G, unless you know your platform (and particular
  machine!) can handle more (or less!) than that.
</ul>

<p>
Some additional thoughts on partitioning:
<ul>
 <li>For your first attempt at an experimentation system, one big
   <tt>/</tt> partition and swap may be easiest until you know how much
   space you need. By doing this you will be sacrificing some of the
   default security features of OpenBSD that require separate
   filesystems for <tt>/, /tmp, /var, /usr</tt> and <tt>/home</tt>.
 <li>A system exposed to the Internet or other hostile forces should
   have a separate <tt>/var</tt> (and maybe even a separate
   <tt>/var/log</tt>) for logging.
 <li>A <tt>/home</tt> partition can be nice.  New version of the OS?
   Wipe and reload everything else, leave your <tt>/home</tt> partition
   untouched.  Remember to save a copy of your configuration files,
   though!
 <li>A separate partition for anything which may accumulate a large
   quantity of files that may need to be deleted can be faster to
   reformat and recreate than to delete.  See the <a
   href="upgrade-minifaq.html#1.5">upgrade-minifaq</a> for an example
   (<tt>/usr/obj</tt>).
 <li>If you wish to rebuild your system from source for any reason,
   the source will be in <tt>/usr/src</tt>.  If you don't make a
   separate partition for <tt>/usr/src</tt>, make sure <tt>/usr</tt> has
   sufficient space.
 <li>A commonly forgotten fact: you do <b>not</b> have to allocate
   all space on a drive when you set the system up! Since  you will now
   find it a challenge to buy a new drive smaller than 20G, it can make
   sense to leave a chunk of your drive unallocated.  If you outgrow a
   partition, you can allocate a new partition from your unused space,
   <a href="faq10.html#DupFS">duplicate</a> your existing partition to
   the new partition, change
   <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=fstab&amp;sektion=5">/etc/fstab</a>
  to point to the new partition, remount, you now have more space.
 <li>If you make your partitions too close to the minimum size required,
   you will probably regret it later, when it is time to upgrade your
   system.
 <li>If you permit users to write to <tt>/var/www</tt> (i.e., personal
   web pages), you might wish to put it on a separate partition, so you
   can use <a href="faq10.html#Quotas">quotas</a> to restrict the space
   they use, and if they fill the partition, no other parts of your
   system will be impacted.
</ul>


<p>
<a name= "Multibooting"></a>
<h2>4.8 - Multibooting OpenBSD/i386</h2>

Multibooting is having several operating systems on one computer, and
some means of selecting the which OS is to boot.  It is <i>not</i> a
trivial task!  If you don't understand what you are doing, you may
end up deleting large amounts of data from your computer.  New OpenBSD
users are <i>highly</i> encouraged to start with a blank hard drive on a
dedicated machine, and then practice your desired configuration on a
non-production system before attempting a multiboot configuration on a
production machine.  <a href="faq14.html">FAQ 14</a> has more
information about the OpenBSD boot process.

<p>
When multibooting, the requirements of all operating systems must be met
by your configuration.  People often ask if there is a way around the
<a href="faq14.html#LargeDrive">8G boot limit</a> of OpenBSD.  While
there are some programs that claim to get around various limits of
various operating systems, none of them are known to do this with
current versions of OpenBSD.

<p>
Here are several options to multibooting:

<h3>Setting active partitions</h3>
This is probably the most overlooked, and yet, sometimes the best
solution for multibooting.  Simply set the active partition in whatever
OS you are currently using to be the one you want to boot by default
when you next boot.  Virtually every OS offers a program to do
this; OpenBSD's is <a href="faq14.html#fdisk">fdisk(8)</a>, similar
named programs are in Windows 9x and DOS, and many other operating
systems.  This can be highly desirable for OSs or systems which take a
long time to shut down and reboot -- you can set it and start the reboot
process, then walk away, grab a cup of coffee, and come back to the system
booted the way you want it -- no waiting for the Magic Moment to select
the next OS.

<h3>Boot floppy</h3>
If you have a system that is used to boot OpenBSD infrequently (or don't
wish other users of the computer to note anything has changed), consider
using a boot floppy.  Simply use one of the <a href="#MkFlop">standard
OpenBSD install floppies</a>, and create a <tt>/etc/boot.conf</tt> file
(yes, you will also have to create an <tt>/etc</tt> directory on the
floppy) with the contents:

<pre>
     boot hd0a:/bsd
</pre>

to cause the system to boot from hard drive 0, OpenBSD partition 'a',
kernel file <tt>/bsd</tt>.  Note you can also boot from other drives
with a line like: "<tt>boot hd2a:/bsd</tt>" to boot off the third
hard drive on your system.  To boot from OpenBSD, slip your floppy in,
reboot.  To boot from the other OS, eject the floppy, reboot.  

<p>
In this case, the 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=boot&amp;sektion=8&amp;arch=i386">boot(8)</a>
 program is loaded from the floppy, looks for and reads
<tt>/etc/boot.conf</tt>.  The "<tt>boot hd0a:/bsd</tt>" line instructs
boot(8) where to load the kernel from -- in this case, the first HD the
BIOS sees.  Keep in mind, only a small file (<tt>/boot</tt>) is loaded
from the floppy -- the system loads the entire kernel off the hard disk,
so this only adds about five seconds to the boot process.

<h3>Windows NT/2000/XP NTLDR</h3>

To multiboot OpenBSD and Windows NT/2000/XP, you can use NTLDR, the
boot loader that NT uses. To multi-boot with NT,  you need a copy of your
OpenBSD Partition Boot Record (PBR). After running installboot, you can
copy it to a file using 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=dd&amp;sektion=1">dd(1)</a>:

<pre>
	# <strong>dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1</strong>
</pre>

<p>
Now boot NT and put <tt>openbsd.pbr</tt> in C:. Add a line like this to
the end of <tt>C:\BOOT.INI</tt>:

<pre>
	c:\openbsd.pbr="OpenBSD"
</pre>

<p>
When you reboot, you should be able to select OpenBSD from the NT loader
menu. There is much more information available about NTLDR at the 
<a href="http://www.tburke.net/info/ntldr/ntldr_hacking_guide.htm">NTLDR
Hacking Guide.</a>

<p>
On Windows XP you can also edit the boot information using the GUI; see the
<a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q289022">XP 
Boot.ini HOWTO</a>.

<p>
Note: The Windows NT boot loader is only capable of booting OSs from the
primary hard drive.  You can not use it to load OpenBSD from the second drive
on a system.

<p>
<h3>Other boot loaders</h3>

<p>
Some other bootloaders OpenBSD users have used successfully include 
<a href="http://gag.sourceforge.net/">GAG</a>,
<a href="http://www.prz.tu-berlin.de/~wolf/os-bs.html">OSBS</a>,
<a href="http://www.ranish.com/part/">The Ranish Partition Manager</a>
and <a href="http://www.gnu.org/software/grub/">GRUB</a>. 

<p>
<h3>OpenBSD and Linux (i386)</h3>
<!-- XXXversion -->

<p>
Please refer to 
<a href="ftp://ftp.openbsd.org/pub/OpenBSD/3.4/i386/INSTALL.linux">INSTALL.linux</a>,
which gives in depth instructions on getting OpenBSD working with Linux.

<a name= "SendDmesg"></a>
<h2>4.9 - Sending your dmesg to dmesg@openbsd.org after the install</h2>

<p>
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.

<p>
A quote from /usr/src/etc/root/root.mail
<pre>
If you wish to ensure that OpenBSD runs better on your machines, please do us
a favor (after you have your mail system configured!) and type something like:
 # dmesg | mail -s "Sony VAIO 505R laptop, apm works OK" dmesg@openbsd.org
so that we can see what kinds of configurations people are running.  As shown,
including a bit of information about your machine in the subject or the body
can help us even further.  We will use this information to improve device driver
support in future releases.  (Please do this using the supplied GENERIC kernel,
not for a custom compiled kernel, unless you're unable to boot the GENERIC
kernel).  The device driver information we get from this helps us fix existing
drivers. Thank you!
</pre>

<p>
Make sure you send email from an account that is able to also receive
email so developers can contact you 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

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

<p>
<strong>NOTE</strong> - Please send only GENERIC kernel dmesgs. Custom
kernels that have device drivers removed are not helpful.

<a name="AddFileSet"></a>
<h2>4.10 - Adding a file set after install</h2>
<!-- XXXversion -->
"Oh no!  I forgot to add a file set when I did the install!"
<p>
Sometimes, you realize you really DID need <tt>comp34.tgz</tt> (or any
other system component) after all, but you didn't realize this at the
time you installed your system.  Good news: There are two easy ways to
add file sets after the initial install:

<h3>Using the upgrade process</h3>
Simply boot your install media (CD-ROM or Floppy), and choose Upgrade
(rather than Install).  When you get to the lists of file sets to
install, choose the sets you neglected to install first time around,
select your source, and let it install them for you.

<h3>Using tar(1)</h3>
The install file sets are simply compressed tar files, and you can
expand them manually from the root of the filesystem:

<p>
<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  # cd /
  # tar xzvpf comp34.tgz
</pre></td></tr></table>

<p>
Do NOT forget the <tt>'p'</tt> option in the above command in
order to restore the file permissions properly!
<p>
One common mistake is to think you can use
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=pkg_add&amp;sektion=1">pkg_add(1)</a>
 to add a missing file sets.  This does not work.  pkg_add(1) is
for package files, not generic tar files like the install sets.


<a name="bsd.rd"></a>
<h2>4.11 - What is 'bsd.rd'?</h2>

<b><tt>bsd.rd</tt></b> is a "RAM Disk" kernel.  This file can be very 
useful; many developers are careful to keep it on the root of their
system at all times.

<p>
Calling it a "RAM Disk kernel" describes the root filesystem of the
kernel -- rather than being a physical drive, the utilities available
after the boot of <tt>bsd.rd</tt> are stored in the kernel, and are run
from a RAM-based filesystem.  <tt>bsd.rd</tt> also includes a healthy set
of utilities to allow you to do system maintenance and installation.

<p>
On some platforms, <tt>bsd.rd</tt> is actually the preferred 
installation technique -- you place this kernel on an existing 
filesystem, boot it, and run the install from it.  On most 
platforms, if you have a running older version of OpenBSD, you 
can FTP  a new version of <tt>bsd.rd</tt>, reboot from it, and 
install a new version of OpenBSD without using any removable 
media at all.

<p>
Here is an example of booting <tt>bsd.rd</tt> on an i386 system:

<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>
  Using Drive: 0 Partition: 3
  reading boot.....
  probing: pc0 com0 com1 apm mem[639k 255M a20=on]
  disk: fd0 hd0+
  &gt;&gt; OpenBSD/i386 BOOT 2.02
  boot&gt; <b>boot hd0a:/bsd.rd</b>
<i>. . . normal boot to install . . .</i>
</pre></td></tr></table>

As indicated, you will be brought to the install program, but you
can also drop to the shell to do maintenance on your system.
<p>
The general rule on booting <tt>bsd.rd</tt> is to change your boot
kernel from <tt>/bsd</tt> to <tt>bsd.rd</tt> through whatever 
means used on your platform.  
<p>
<br>

<a name="InstProb"></a>
<h2>4.12 - Common installation problems</h2>

<a name="cpq16m"></a>
<h3>4.12.1 - My Compaq only recognizes 16M RAM</h3>
<i>Some</i> Compaq systems have an issue where the full system RAM is
not detected by the
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=boot&amp;sektion=8&amp;arch=i386">OpenBSD
 second stage boot loader</a> properly, and only 16M may be detected
and used by OpenBSD. This can be corrected either by creating/editing
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=boot.conf&amp;sektion=8&amp;arch=i386"><tt>/etc/boot.conf</tt></a>
 file, or by entering commands at the "<tt>boot></tt>" prompt before
OpenBSD loads.  If you had a machine with 64M RAM, but OpenBSD was only
detecting the first 16M, the command you would use would be:

<pre>
     machine mem +0x3000000@0x1000000
</pre>
to add 48M (<tt>0x3000000</tt>) after the first 16M
(<tt>0x1000000</tt>).  Typically, if you had a machine with this
problem, you would enter the above command first at the install
floppy/CD-ROM's <tt>boot></tt> prompt, load the system, reboot, and
create a <tt>/etc/boot.conf</tt> file with the above line in it so all
future bootings will recognize all available RAM.

<p>
It has also been reported that a ROM update will fix this on <i>some</i>
systems.

<a name="noboot"></a>
<h3>4.12.2 - My i386 won't boot after install</h3>
Your install seemed to go fine, but on first boot, you see no sign of
OpenBSD attempting to boot.  There are a few common reasons for this
problem:

<ul>
<li><b>No partition was flagged active in fdisk(8).</b>  To fix this,
reboot the machine using the boot floppy or media, and "flag" a 
partition as "active" (bootable).  See 
<a href="faq14.html#fdisk">here</a> and
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=fdisk&amp;sektion=8&amp;arch=i386">here</a>


<li><b>No valid boot loader was ever put on the disk.</b>
If you answer "Y" to the "Use entire disk for OpenBSD?" question during
the install, or use the "<tt>reinit</tt>" option of fdisk(8), the
OpenBSD boot record is installed on the Master Boot Record of the disk;
otherwise, the existing master boot code is untouched.  This will be a
problem if no other boot record existed.  The solution is to boot the
install media again, drop to the shell and invoke
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=fdisk&amp;sektion=8&amp;arch=i386">fdisk(8)</a>
 and use the "<tt>update</tt>" option.  

<li><b>In some rare occasions, something may go wrong with the second
stage boot loader install.</b>  Reinstalling the second stage boot
loader is discussed <a href="faq14.html#InstBoot">here</a>.

<li><b>You mixed <i>a.out</i> and <i>ELF</i> boot disk and install
files.</b>  OpenBSD/i386 has transitioned from the older <i>a.out</i>
format to the <i>ELF</i> format for binaries shortly after 3.3-release.
The OpenBSD 3.4
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=boot&amp;sektion=8&amp;arch=i386">boot
 loader</a> can not boot an OpenBSD 3.3-release's kernel, nor can the
3.3-release boot loader boot an OpenBSD 3.4 kernel.  You must use a
boot disk that matches the version of OpenBSD you intend to install.
Failure to follow this will show itself with a message such as
"<tt>failure(79)</tt>" and/or "<tt>Inappropriate file type or
format</tt>".

<li><b>You ignored all the <a href="#Disks">warnings</a> and
<a href="#SpaceNeeded">explanations</a> about the
<a href="faq14.html#LargeDrive">8G boot limit</a>.</b>  This
results in a hang at the very start of the boot process, sometimes with
the message, "<tt>Bad magic</tt>".

</ul>

<a name="sshhang"></a>
<h3>4.12.3 - My (older, slower) machine booted, but hung at the ssh-keygen
steps</h3>
It is very likely your machine is running fine, just taking a while
to do the ssh key generation process.  A SparcStation2 or a Macintosh
Quadra may take 45 minutes or more to complete the three
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&amp;sektion=1">ssh-keygen(1)</a>
 steps, some machines will take even longer.  Just let it finish; it is
only done once per install.

<a name="noftplist"></a>
<h3>4.12.4 - I got the message "Failed to change directory" when doing an
install</h3>

When doing an FTP install of a 
<a href="upgrade-minifaq.html#1.1">snapshot</a> during the <i>-beta</i>
stage of the <a href="faq5.html#Flavors">OpenBSD development cycle</a>,
you may see this:

<table border=0 width="650"><tr><td nowrap bgcolor="#EEEEEE"><pre>

  Do you want to see a list of potential FTP servers?  [y] <i>ENTER</i>
  Getting the list from 192.128.5.191 (ftp.openbsd.org)... FAILED
  Failed to change directory.
  Server IP address or hostname? 
</pre></td></tr></table>

This is normal and expected behavior during this pre-release part of the
cycle.  The install program looks for the FTP list on the primary FTP
server in a directory that won't be available until the
<a href="faq1.html#Next">release date</a>, so you get the above message.

<p>
Simply use the <a href="../ftp.html">FTP mirror list</a> to find your
favorite FTP mirror, and manually enter its name when prompted.

<p>
<b>Note: You should not see this if you are installing <i>-release</i>
or from CD-ROM.</b>

<a name="krb4"></a>
<h3>4.12.5 - When I login, I get "login_krb4-or-pwd: Exec format error"</h3>
Kerberos IV has been removed from OpenBSD 3.4, but if you did an
upgrade, the old Kerberos IV binaries still will be on your system.
This is a problem on the i386 platform, as the old Kerberos files are in
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=a.out&amp;sektion=5">a.out</a>,
format and thus unable to run on the standard ELF kernel (which has
a.out emulations disabled, as mentioned
<a href="faq1.html#WhatsNew">here</a>).
If you have encountered this problem, you need to override the krb4
authentication method when you log in:
<pre>
    OpenBSD/i386 (puffy.openbsd.org) (ttyC0)

    login: joeuser:passwd
    password:
</pre>
You can use the same "<tt><i>username</i>:passwd</tt>" syntax with an
ssh connection and with
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=su&amp;sektion=1">su(1)</a>
to access your system.
Now edit <tt>/etc/login.conf</tt>, and remove the krb4 references.

<a name="site"></a>
<h2>4.13 - Customizing the install process</h2>
<!-- XXXversion -->

<h3><tt>siteXX.tgz</tt> file</h3>
The OpenBSD install/upgrade scripts allow the selection of a
user-created set called "<tt>siteXX.tgz</tt>", where XX is the release
version (e.g. 34).  The <tt>siteXX.tgz</tt> file set is, like the other
<a href="#FilesNeeded">file sets</a>, a
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=gzip&amp;sektion=1">gzip(1)</a>
compressed
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=tar&amp;sektion=1">tar(1)</a>
archive rooted in '/' and is un-tarred like the other sets with the
options <tt>xzpf</tt>.  This set will be installed last, after
all other file sets.

<p>
This file set allows the user to add to and/or override the files
installed in the 'normal' sets and thus customize the installation or
upgrade.

<p>
Some example uses of a <tt>siteXX.tgz</tt> file:
<ul>
<li>Create a siteXX.tgz file that contains all the file changes you made
since first installing OpenBSD. Then, if you have to re-create the
system you simply select siteXX.tgz during the re-install and all of
your changes are replicated on the new system.

<li>Create a series of machine specific directories that each contain a
siteXX.tgz file that contains files specific to those machine types.
Installation of machines (e.g. boxes with different graphics cards) of a
particular category can be completed by selecting the appropriate
siteXX.tgz file.

<li>Put the files you routinely customize in a same or similar way
in a siteXX.tgz file --
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=adduser&amp;sektion=8"
> <tt>/etc/skel</tt></a> files,
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf&amp;sektion=5"
> <tt>/etc/pf.conf</tt></a>, 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=httpd&amp;sektion=8"
> <tt>/var/www/conf/httpd.conf</tt></a>,
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=rc.conf&amp;sektion=5"
> <tt>/etc/rc.conf</tt></a>,
etc. 
</ul>

<h3><tt>install.site</tt>/<tt>upgrade.site</tt> scripts</h3>
As the last step in the install/upgrade process, the scripts look in the
root directory of the newly installed/upgraded system for
<tt>install.site</tt> or <tt>upgrade.site</tt>, as appropriate to the
current process, and runs this script in an environment
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=chroot&amp;sektion=8">chroot</a>ed
 to the installed/upgraded system's root.  Remember, the upgrade is done
from a booted file system, so your target file system is actually
mounted on <tt>/mnt</tt>.  However, your script can be written as if it
it is running in the "normal" root of your file system.  Since this
script is run after all the files are installed, you have almost full
functionality of your system (though, in single user mode) when your
script runs.

<p>
Note that the <tt>install.site</tt> script would have to be in a
<tt>siteXX.tgz file</tt>, while the <tt>upgrade.site</tt> script could
be put in the root directory before the upgrade, or could be put in a
<tt>siteXX.tgz</tt> file.

<p>
The scripts can be used to do anything possible in a script.
<ul>
<li>Remove files that are installed/upgraded that you don't want present
on the system.
<li> Remove/upgrade/install the
<a href="faq8.html#Packages">packages</a> you want on the installed
system.
<li> Do an <a href="faq14.html#Backup">immediate backup/archive</a> of
the new system before you expose it to the rest of the world.
</ul>

The combination of <tt>siteXX.tgz</tt> and
<tt>install.site/upgrade.site</tt> files is intended to give the user
broad customization capabilities without having to build their own
custom install sets.

<a name="Multiple"></a>
<h2>4.14 - How can I install a number of similar systems?</h2>
Here are some tools you can use when you have to deploy a number 
of similar OpenBSD systems.

<h3><tt>siteXX.tgz</tt> and <tt>install/upgrade.site</tt> files</h3>
See the <a href="#site">above</a> article.

<h3>Restore from dump(8)</h3>
On most platforms, the boot media includes the 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=restore&amp;sektion=8">restore(8)</a>
 program, which can be used to restore a backup made by 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=dump&amp;sektion=8">dump(8)</a>.
 Thus, you could boot from a 
<a href="#MkFlop">floppy</a>, 
<a href="../orders.html">CD</a>, or
<a href="#bsd.rd">bsd.rd</a> file, then
<a href="faq14.html#fdisk">fdisk</a>,
<a href="faq14.html#disklabel">disklabel</a>, and
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=restore&amp;sektion=8">restore</a>
 the desired configuration from tape or other media, and install the
<a href="faq14.html#InstBoot">boot blocks</a>. More details 
<a href="faq14.html#Backup">here</a>.

<h3>Disk imaging</h3>
Unfortunately, there are no known disk imaging packages which are
FFS-aware and can make an image containing only the active file space.
Most of the major disk imaging solutions will treat an OpenBSD partition
as a "generic" partition, and can make an image of the whole disk. This
often accomplishes your goal, but usually with huge amounts of wasted
space --  an empty, 10G <tt>/home</tt> partition will require 10G of
space in the image, even if there isn't a single file in it.  While you
can typically install a drive image to a larger drive, you would not be
able to directly use the extra space, and you would not be able to
install an image to a smaller drive.

<p>
If this is an acceptable situation, you may find the 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=dd&amp;sektion=1">dd</a>
command will do what you need, allowing you to copy one disk to another,
sector-for-sector.  This would provide the same functionality as
commercial programs without the cost.

<a name="getdmesg"></a>
<h2>4.15 - How can I get a dmesg(8) to report an install problem?</h2>
When <a href="../report.html">reporting a problem</a>, it is critical to
include the complete system
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=dmesg&amp;sektion=8">dmesg(8)</a>.
 However, often when you need to do this, it is because the system is
working improperly or won't install so you may not have disk, network,
or other resources you need to get the dmesg to the appropriate
<a href="../mail.html">mail list</a>.  There are other ways, however:

<ul>
<li><b>Floppy disk:</b>  The boot disks and CD-ROM has enough tools
to let you record your dmesg to an MSDOS floppy disk for reading on
another machine.  Place an MSDOS formatted floppy in your disk drive and
execute the following commands:

<pre>
     mount -t msdos /dev/fd0a /mnt
     dmesg >/mnt/dmesg.txt
     umount /mnt
</pre>
If you have another OpenBSD system, you can also write it to an OpenBSD
compatible floppy -- often, the boot floppy has enough room on it to
hold the dmesg.  In that case, leave off the "<tt>-t msdos</tt>" above.

<p>
<li><b>Serial Console:</b> See <a href="faq7.html#SerCon">this article</a>
on setting up the serial console, then capture the output to a file.

<p>
<li><b>FTP:</b>  Under some circumstances, you may be able to use the
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ftp&amp;sektion=1">ftp(1)</a>
client on the boot disk or CD-ROM to send the dmesg to a local FTP
server, where you can retrieve it later.
</ul>

<p>

<a name="bsdrdaout"></a>
<h2>4.16 - Upgrading/reinstalling OpenBSD/i386 using
<tt>bsd.rd-a.out</tt></h2>

It is normally possible to perform upgrades and installs using
the <a href="faq4.html#bsd.rd">bsd.rd</a> kernel.
However, with OpenBSD 3.4, the i386 platform switched executable format from
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=a.out&amp;sektion=5"
> a.out</a> to
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=elf&amp;sektion=5"
> ELF</a>,
so older
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=boot&amp;sektion=8&amp;arch=i386"

> boot
loaders</a> (OpenBSD 3.3 and before) are unable to run the new-format
<tt>bsd.rd</tt> kernel.

<p>
To circumvent this problem, and allow upgrades to be performed using
<tt>bsd.rd</tt>,
an a.out version of <tt>bsd.rd</tt> has been made available on the
<a href="../ftp.html">FTP distribution</a>.
This file, <tt>bsd.rd-a.out</tt>,
can be booted by OpenBSD 3.3 and below,
but is a genuine OpenBSD 3.4 kernel, including the new ELF boot loader,
so can be used to bootstrap OpenBSD/i386 3.4 from an older system.

<p>
Simply download <tt>bsd.rd-a.out</tt> and place it in your machine's 
root directory.
Boot it instead of the normal <tt>bsd</tt> or <tt>bsd.rd</tt> kernels as
shown <a href="faq4.html#bsd.rd">here</a> (specifying
<tt>bsd.rd-a.out</tt> as your boot kernel, of course).

<p>
If you wish to install <i>-current</i>, it is recommended you first
install a minimal 3.4-release system (<tt>base34.tgz, etc34.tgz,
bsd</tt>), then reinstall using the <i>-snapshot</i> <tt>bsd.rd</tt>
file.

<p>

<font color= "#0000e0">
<a href= "index.html">[FAQ Index]</a>
<a href= "faq3.html">[To Section 3 - Obtaining OpenBSD]</a>
<a href= "faq5.html">[To Section 5 - Building the System from Source]</a>
</font>

<p>
<hr>
<a href= "index.html"><img height= "24" width= "24" src= "../images/back.gif" border= \
"0" alt= "[back]"></a>  <a href= "mailto:www@openbsd.org">www@openbsd.org</a>
<br>
<small>$OpenBSD: faq4.html,v 1.160 2003/11/28 18:39:00 nick Exp $</small>
</body>
</html>

<!-- ZoneLabs Popup Blocking Insertion -->
<script language='javascript'>postamble();</script>



_______________________________________________
Openbsd-newbies mailing list
Openbsd-newbies@sfobug.org
http://mailman.theapt.org/listinfo/openbsd-newbies


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic