OpenBSD has a very robust and adaptable text-based install procedure. In addition to its robustness, the install procedure can be done using 1 floppy disk. Most architectures have a similar installation procedure, however there are some differences in details. In all cases, you are urged to read the platform-specific INSTALL document in the platform directory on the CDROM or FTP sites (for example, INSTALL.i386, INSTALL.mac68k or INSTALL.sparc)
On most architectures, you have several installation options, including FTP, CDROM, and local disk files. One option not supported is downloading an ISO image to make your own official CDROM. CDROMs are available for purchase, however.
OpenBSD 3.2 supports a number of architectures listed below in alphabetical order. Please refer to each architecture's page for specific information on what each architecture supports.
OpenBSD can be installed from multiple media types. The most common and architecture independent options are laid out below. These options can be used after booting from an OpenBSD CD-ROM, floppy disk or ramdisk kernel.
| CD-ROM | To do a CD-ROM install, you must have either purchased
an Official OpenBSD
CD-ROM or created your own OpenBSD CD. This is usually the easiest way
to install an OpenBSD system. NOTE: Official OpenBSD CDs are bootable if your BIOS supports it. |
| FTP | This installation option allows you to install OpenBSD by downloading the installation packages in realtime over the network. |
| Local Filesystem | This option allows you to install from files on a pre-existing filesystem. Support for DOS, EXT2FS and FFS are included on the i386 install disk. |
To create an installation floppy image you must either download the correct
boot floppy image from one of the OpenBSD distribution sites or copy the image
from an Official OpenBSD CD-ROM. You can find a list of FTP servers at the OpenBSD FTP Distribution page.
Most architectures have one or more boot floppy images to choose from, different
images are for different hardware variations. The differences between the i386
platform installation floppies will be outlined below. For the other
architectures with multiple boot floppies, see the INSTALL document in the
respective FTP directory. For those with only one, just download the respective
floppy32.fs image.
NOTE: The cdrom32.fs image can be
used to make a bootable OpenBSD installation CD-ROM.
The i386 platform has four separate installation disk images to choose fromr:
Most i386 users will just use the floppy32.fs installation floppy. 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.
Once you have the correct floppy image, you need to get a clean floppy disk. If there are ANY bad sectors on the floppy disk, the installation will most likely fail.
# fdformat /dev/fd0a Format 1440K floppy `/dev/fd0a'? (y/n): y processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done. |
If your output is like the above example, then your disk is OK. However, if you do not see ALL "V"'s then your disk is most likely bad, and you should try a new one.
Once you have a clean, formatted floppy it is time to write the installation image to floppy. For this, you can use the dd(1) utility. An example usage of dd(1) is below:
# dd if=floppy32.fs of=/dev/rfd0c bs=32k |
Once the image is written, check to make sure that the copied image is the same as the original with the cmp(1) command. If the diskette is identical to the image, you will just see another prompt.
# cmp /dev/rfd0c floppy32.fs |
To prepare a floppy in MS-DOS or Windows, simply use the native formatting tools.
To write the installation image to the prepared floppy you can use rawrite, fdimage, or ntrw. rawrite will not work on Windows NT, 2000 or XP.
Note that FDIMAGE.EXE and RAWRITE.EXE are both MS-DOS applications, and thus, are limited to DOS's "8.3" file naming convention. As floppy32B.fs and floppy32C.fs have longer file name, you will have to find out how your system stored the file in "8.3 format" before using FDIMAGE.EXE or RAWRITE.EXE to make your boot floppies.
Example usage of rawrite:
C:\> rawrite RaWrite 1.2 - Write disk file to raw floppy diskette Enter source file name: floppy32.fs Enter destination drive: a Please insert a formatted diskette into drive A: and press -ENTER- : Enter |
Example Usage of fdimage:
C:\> fdimage -q floppy32.fs a: |
Example Usage of ntrw:
C:\> ntrw floppy32.fs a: 3.5", 1.44MB, 512 bytes/sector bufsize is 9216 1474560 bytes written |
This section is initially broken down into architecture dependent sections for popular architectures that OpenBSD supports. This is so we can properly instruct each user on what to do on their respective platform.
Booting an install image on the i386 architecture is nothing new to most people. If you are using the floppy disk, simply stick the floppy into your floppy drive and boot your system. Your install image will automatically load (assuming floppy boot is enabled in your BIOS). If you are planning on booting from CD, you must go into your systems BIOS and set the boot options to allow booting from CD. Some older BIOSs 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.
NOTE: On the sparc64, only the sbus machines (Ultra 1, Ultra 2) are bootable from floppy.
To boot from floppy, place your floppy disk with the OpenBSD installation image on it into your floppy drive. Then use the following command to boot from your floppy:
ok boot floppy |
To boot from CD-ROM, place your OpenBSD CD-ROM disk into your drive. If your Sun only has one CD-ROM drive, then just go to the boot prompt, where you can 'boot cdrom':
ok boot cdrom |
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 probe-scsi from the new command mode.
ok probe-scsi
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 ROMs
|
Figure out which disk is the CD ROM you want to boot from. Note the target number.
ok boot /sbus/esp/sd@X,0 |
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 dmesg, the kernel telling you what devices have been found, and where. Don't worry about remembering this text, as a copy is saved as /var/run/dmesg.boot. On most architectures, SHIFT+PGUP will let you examine text that has scrolled off the screen.
Then, you will see the following:
rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02 erase ^?, werase ^W, kill ^U, intr ^C, status ^T (I)nstall, (U)pgrade or (S)hell? i |
And with that, we reach our first question. Most of the time, you have the three options shown:
In this example, we will do an install, but the upgrade process is similar.
Welcome to the OpenBSD/i386 3.2 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] y |
In most cases, the default terminal type is appropriate, however if you are using a serial console for install, don't just take the default, respond appropriately.
If you do not select a keyboard encoding table, a US keyboard layout will be assumed.
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] y |
If you take the default here, the install process will terminate and drop you to a shell prompt.
Setting up disks in OpenBSD varies a bit between platforms. For i386 and macppc, 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).
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.
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] Enter |
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 wd0, wd1, etc., SCSI disks and RAID devices will show up as sd0, sd1, 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.
Do you want to use *all* of wd0 for OpenBSD? [no] Enter |
If you say "yes" to this question, the entire disk will be allocated to OpenBSD. This will result in a simple 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 option for most production uses of OpenBSD, however, there are some systems this should not be done on. Many Compaq systems, some Dell and other systems use a "maintenance" 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.
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 fdisk(8) program. You can also get more information on fdisk(8) here.
Important Note: 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 this section before going any further.
Your 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> help
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>
|
A few commands are worthy of elaboration:
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).
You can edit the drive layout in either by 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.
fdisk: 1> e 1
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) a6
Do you wish to edit in CHS mode? [n] y
BIOS Starting cylinder [0 - 2585]: [0] 203
BIOS Starting head [0 - 239]: [0] Enter
BIOS Starting sector [1 - 63]: [0] 1
BIOS Ending cylinder [0 - 2585]: [0] 2585
BIOS Ending head [0 - 239]: [0] 239
BIOS Ending sector [1 - 63]: [0] 63
fdisk:*1> p
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> p m
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>
|
Note that prompt changed to include an asterisk ('*') to indicate you have unsaved changes. As we can see from the output of p m 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.
What we haven't done is flagged the partition as active so the machine will boot OpenBSD on the next reboot:
fdisk:*1> f 1
Partition 1 marked active.
fdisk:*1> p
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>
|
And now, we are ready to save our changes:
fdisk:*1> w Writing MBR at offset 0. wd0: no disk label fdisk: 1> q |
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)
> ?
Available commands:
p [unit] - print label.
M - show entire OpenBSD man page for disklabel.
e - edit dr
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.
>
|
Again, a few of these commands could use a little elaboration:
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 this discussion.
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.
On the root disk, the two partitions 'a' and 'b' must 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.
After a little thought, we decide to create just enough partitions to allow the creation of the recommended separate filesystems (/, /tmp, /var, /usr, /home) along with a swap partition:
> p m
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
> d a
> a a
offset: [3069360] Enter
size: [36030960] 150M
Rounding to nearest cylinder: 307440
FS type: [4.2BSD] Enter
mount point: [none] /
> a b
offset: [3376800] Enter
size: [35723520] 300M
Rounding to nearest cylinder: 614880
FS type: [swap] Enter
> a d
offset: [3991680] Enter
size: [35108640] 120m
Rounding to nearest cylinder: 245952
FS type: [4.2BSD] Enter
mount point: [none] /tmp
> a e
offset: [4237632] Enter
size: [34862688] 80m
Rounding to nearest cylinder: 164304
FS type: [4.2BSD] Enter
mount point: [none] /var
> a g
offset: [4401936] Enter
size: [34698384] 2g
Rounding to nearest cylinder: 4194288
FS type: [4.2BSD] Enter
mount point: [none] /usr
> a h
offset: [8596224] Enter
size: [30504096] 4g
Rounding to nearest cylinder: 8388576
FS type: [4.2BSD] Enter
mount point: [none] /home
> p m
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
> q
Write new label?: [y] Enter
|
You will note there is a c 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 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 a (root), b (swap) and c (entire disk), the rest of the partitions (through letter p) are available for use as you desire.
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.
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] Enter
Mount point for wd0e (size=82152k), none or done? [/var] Enter
Mount point for wd0g (size=2097144k), none or done? [/usr] Enter
Mount point for wd0h (size=4194288k), none or done? [/home] Enter
Mount point for wd0d (size=122976k), none or done? [/tmp] done
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)
|
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.
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.
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.
Now you must set the system hostname. This value will be saved in the file /etc/myname, which is used during normal boots to set the hostname of the system. As of OpenBSD 3.2 the name stored in /etc/myname includes the fully qualified domain name of the system (FQDN). If you do not set the FQDN of the system, the default value of 'my.domain' will be used.
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.
Enter system hostname (short form, e.g. 'foo'): puffy |
Now it is time to configur 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.
Configure the network? [y] Enter
If any interface will be configured by DHCP, you should not enter
information that will be supplied via DHCP, e.g. the DNS domain name.
Enter DNS domain name (e.g. 'bar.com'): [my.domain] example.com
Available interfaces are: fxp0.
Which one do you wish to initialize? (or done) [fxp0] Enter
IP address for fxp0 (or 'dhcp')? 199.185.137.55
Symbolic (host) name? [puffy] Enter
Netmask? [255.255.255.0] Enter
The default media for fxp0 is
media: Ethernet autoselect (100baseTX full-duplex)
Do you want to change the default media? [n] Enter
Done - no available interfaces found.
Enter IP address of default route: [none] 199.185.137.128
Enter IP address of primary nameserver: [none] 199.185.137.1
Would you like to use the nameserver now? [y] Enter
Do you want to do more, manual, network configuration? [n] Enter
|
In the above example, we use a static IP address. You can choose to use dhcp as well if you wish. In the case of DHCP, most of this information will be grabbed from a remote dhcp server, though you will be given a chance to confirm it.
NOTE: Only one 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.
After your network is setup, 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.
Next, you will get a chance to choose your installation media. The options are listed below.
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 you want to use? (m, c, f, etc.) c Available CD-ROMs are: cd0. |
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 you need to make sure you pick the device which you will use to install OpenBSD from.
NOTE: 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.
Available CD-ROMs are: cd0. Which one contains the install media? (or done) [cd0] Enter Enter the pathname where the sets are stored (or '?') [3.2/i386] Enter |
Here, you are prompted for which directory the installation files are, which is 3.2/i386/ on the official CDROM.
Now it's time to choose which packages you will be installing. You can get a description of these files in the next section. 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 base32.tar.gz, etc32.tar.gz and bsd. Others will wish to install all packages. The example below is that of a full install.
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] base32.tgz
[X] etc32.tgz
[X] misc32.tgz
[X] comp32.tgz
[X] man32.tgz
[X] game32.tgz
[ ] xbase32.tgz
[ ] xshare32.tgz
[ ] xfont32.tgz
[ ] xserv32.tgz
[X] bsd
File Name? (or 'done') [xbase32.tgz] all
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] base32.tgz
[X] etc32.tgz
[X] misc32.tgz
[X] comp32.tgz
[X] man32.tgz
[X] game32.tgz
[X] xbase32.tgz
[X] xshare32.tgz
[X] xfont32.tgz
[X] xserv32.tgz
[X] bsd
|
You can do all kinds of nifty things here -- -x* 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, the starting default is recommended.
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.
File Name? (or 'done') [done] Enter Ready to install sets? [y] Enter Getting base32.tgz ... 100% |**************************************************| 23870 KB 00:15 Getting etc32.tgz ... 100% |**************************************************| 1447 KB 00:01 Getting misc32.tgz ... 100% |**************************************************| 1666 KB 00:00 Getting comp32.tgz ... 100% |**************************************************| 16801 KB 00:12 Getting man32.tgz ... 100% |**************************************************| 5428 KB 00:04 Getting game32.tgz ... 100% |**************************************************| 2702 KB 00:01 Getting bsd ... 100% |**************************************************| 4409 KB 00:01 Getting xbase32.tgz ... 100% |**************************************************| 8837 KB 00:04 Getting xshare32.tgz ... 100% |**************************************************| 1531 KB 00:02 Getting xfont32.tgz ... 100% |**************************************************| 30664 KB 00:14 Getting xserv32.tgz ... 100% |**************************************************| 14798 KB 00:05 Extract more sets? [n] |
If your system has a small amount of RAM (less than 20M on i386), do not hit return at that prompt quite yet!
During the install process, there is normally no swap, the real RAM is all you have. The 'MAKEDEV' step that follows will require more than the rest of the install required. As a system with small amounts of RAM can still be very usable for many applications, working around this limitation is a quite useful trick.
The solution is to activate swap now. The swap partition has been created, the files are installed to the hard disk, the only trick here is to manually invoke it. So, do not just hit 'ENTER' at the above prompt, but rather, hit '!', which will bring up a shell, and launch swapon(8) from the mounted hard drive:
Extract more sets? [n] ! Type 'exit' to return to install. # /mnt/sbin/swapon /dev/wd0b total: 307440k bytes allocated = 0k used, 307440k available # exit Extract more sets? [n] Enter |
You can now resume the normal installation.
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 US/Eastern, but could also have used EST5EDT or US/Michigan and had the same result. Hitting ? at the prompts will guide you through your choices.
Extract more sets? [n] Enter
Do you expect to run the X Window System? [y] y
Saving configuration files......done.
Generating initial host.random file ......done.
What timezone are you in? ('?' for list) [US/Pacific] ?
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] US
Select a sub-timezone of 'US' ('?' for list): ?
Alaska Central Hawaii Mountain Samoa
Aleutian East-Indiana Indiana-Starke Pacific
Arizona Eastern Michigan Pacific-New
Select a sub-timezone of 'US' ('?' for list): Eastern
You have selected timezone 'US/Eastern'.
|
The last steps are for the system to create the /dev directory (which may take a while on some systems, especially if you had to use the Small RAM trick above), and install the boot blocks.
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. # halt syncing disks... done The operating system has halted. Please press any key to reboot. |
OpenBSD is now installed on your system and ready for its first boot, but before you do...
One of your first things to read after you install your system is afterboot(8).
You may also find the following links useful:
The complete OpenBSD installation is broken up into a number of separate file sets. Not every application requires every file set. Here is an overview of each:
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.
In addition, it is recommended that a /tmp partition be used. The /tmp 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 /tmp space.SYSTEM / /usr /var /usr/X11R6 alpha 50M 250M 25M 100M amiga 40M 200M 25M 180M hp300 40M 200M 25M 80M i386 40M 200M 25M 140M mac68k 40M 200M 25M 80M macppc 50M 200M 25M 100M mvme68k 40M 200M 25M 80M sparc 40M 259M 25M 49M sparc64 50M 200M 25M 100M vax 75M 125M 25M 180M
When you are in the disklabel editor, you may choose to make your entire system have just an 'a' (main filesystem) and 'b' (swap) . The 'a' filesystem which you set up in disklabel will become your root partition, which should be the sum of all the 3 main values above (/, /usr, and /var) plus some space for /tmp. The 'b' partition you set up automatically becomes your system swap partition -- we recommend a minimum of 32MB but if you have disk to spare make it at least 64MB. If you have lots of disk space to spare, make this 256MB, or even 512MB.
There are five main reasons for using separate filesystems, instead of shoving everything into one or two filesystems:
Some additional thoughts on partitioning:
When multibooting, the requirements of all operating systems must be met by your configuration. People often ask if there is a way around the 8G boot limit 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.
Here are several options to multibooting:
boot hd0a:/bsdto cause the system to boot from hard drive 0, OpenBSD partition 'a', kernel file /bsd. Note you can also boot from other drives with a line like: "boot hd2a:/bsd" 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.
In this case, the boot(8) program is loaded from the floppy, looks for and reads /etc/boot.conf. The "boot hd0a:/bsd" 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 (/boot) 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.
# dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1
Now boot NT and put openbsd.pbr in C:. Add a line like this to the end of C:\BOOT.INI:
c:\openbsd.pbr="OpenBSD"
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 NTLDR Hacking Guide.
On Windows XP you can also edit the boot information using the GUI, see the XP Boot.ini HOWTO.
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.
Some other bootloaders OpenBSD users have used successfully include GAG, OSBS, The Ranish Partition Manager and GRUB.
Please refer to INSTALL.linux, which gives in depth instructions on getting OpenBSD working with Linux.
Just to remind people, it's important for the OpenBSD developers to keep track of what hardware works, and what hardware doesn't work perfectly.
A quote from /usr/src/etc/root/root.mail
If you wish to ensure that OpenBSD runs better on your machines, please do us
a favor (after you have your mail system setup!) and type
dmesg | mail dmesg@openbsd.org
so that we can see what kinds of configurations people are running. We will
use this information to improve device driver support in future releases.
(We would be much happier if this information was for the supplied GENERIC
kernel; not for a custom compiled kernel). The device driver information
we get from this helps us fix existing drivers.
Make sure you send email from an account that is able to also receive email so developers can contact you back if they have something they want you to test or change in order to get your setup working. It's not important at all to send the email from the same machine that is running OpenBSD, so if that machine is unable to receive email, just
$ dmesg | mail your-account@yourmail.domand then forward that message to
dmesg@openbsd.orgwhere your-account@yourmail.dom is your regular email account. (or transfer the dmesg output using ftp/scp/floppydisk/carrier-pigeon/...)
NOTE - Please send only GENERIC kernel dmesgs. Custom kernels that have device drivers removed are not helpful.
Sometimes, you realize you really DID need comp32.tgz (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:
# cd / # tar xzvpf comp32.tgz |
Do NOT forget the 'p' option in the above command in order to restore the file permissions properly!
One common mistake is to think you can use pkg_add(1) to add a missing file sets. This does not work. pgk_add(1) is for package files, not generic tar files like the install sets.
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 bsd.rd are stored in the kernel, and are run from a RAM-based filesystem. bsd.rd also includes a healthy set of utilities to allow you to do system maintenance and installation.
On some platforms, bsd.rd 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 bsd.rd, reboot from it, and install a new version of OpenBSD without using any removable media at all.
Here is an example of booting bsd.rd on an i386 system:
Using Drive: 0 Partition: 3 reading boot..... probing pc0 com0 com1 apm mem[639k 255M a20=on] disk fd0 hd0 >> OpenBSD/i386 BOOT 1.29 boot> boot hd0a:/bsd.rd . . . normal boot to install . . . |
The general rule on booting bsd.rd is to change your boot kernel from /bsd to bsd.rd through whatever means used on your platform.
machine mem +0x3000000@0x1000000to add 48M (0x3000000) after the first 16M (0x1000000). Typically, if you had a machine with this problem, you would enter the above command first at the install floppy/CDROM's boot> prompt, load the system, reboot, and create a /etc/boot.conf file with the above line in it so all future bootings will recognize all available RAM.
It has also been reported that a ROM update will fix this on some systems.
[Back to Main Index] [To Section 3.0 - Obtaining OpenBSD] [To Section 5.0 - Kernel configuration and Disk Setup]