Step 1 - Obtaining OpenBSD
There are 3 popular methods for obtaining OpenBSD:
- » Purchase a hard copy: Show your support for the open source community and keep the OBSD project going.
- » Using OpenBSD's ftp installer: This tutorial explains the ftp installation and requires an online connection.
- » Using the OpenBSD 4.6 ISO image: The ISO image will contain the entire OS (including sets).
Purchasing a hard copy of OpenBSD will get you the entire OS, along with the source code, installation instructions and other miscellaneous things on 3 CDs. But if you are a first time user just download the installer and take OpenBSD out for a test drive before you decide to buy.
Step 2 - Installation Program
In order to remote install OpenBSD an installation program from openbsd.org will be used. This installation program will be loaded onto a computer using either a floppy disk or CD-R, the CD-R being created by an ISO image.
There are different ISO images and floppy files for laptops, servers and desktop PCs. Go here to determine which file is right for you.
If you are using a desktop PC you will more than likely use one of these:
- Floppy file for desktop PCs (remote install): ftp://ftp.openbsd.org/pub/OpenBSD/4.6/i386/floppy46.fs
- CD-R image for desktop PCs (remote install): ftp://ftp.openbsd.org/pub/OpenBSD/4.6/i386/cd46.iso
- CD-R install image for desktop PCs (local install): ftp://ftp.openbsd.org/pub/OpenBSD/4.6/i386/install46.iso
The two OpenBSD CD ISO files
- install46.iso - The entire OpenBSD 4.6 installation (including sets) will be packaged in this 218 meg ISO file and will allow the user to install OpenBSD without an online connection.
- cd46.iso - This 5 meg ISO file contains the remote installation program and is used if the user wants to install OpenBSD remotely.
If you have a fast connection I recommend downloading the install46.iso file (218 megs in size). Using this file for an install will contain all installation sets and will not require an internet connection when installing OpenBSD.
I will not go into detail on the proper way to copy these files to a floppy or CD-R so they are bootable.
But briefly
- To create a bootable floppy disk using Windows XP (NTFS) you will need the program, ntrw.exe.
- Create the floppy with the following command format: ntrw <image file> <floppy drive>
- So at a command prompt (DOS prompt) type: ntrw floppy46.fs a:
- To create a bootable floppy disk using Linux use the following command: cp floppy46.fs /dev/fd0
- To create a bootable CD-R from an ISO image with Windows XP a tutorial can be found here.
- To create a bootable CD-R from an ISO image with Linux a tutorial can be found here.
Note: If you are a Linux user and have downloaded an entire Linux distro on a set of ISOs (such as Fedora and Slackware) then you will notice the bootable ISO for OpenBSD (cd46.iso) is different. The OpenBSD ISO is 5 megs in size and acts as an installation program that will go on-line to download the entire operating system after the initial system setup.Step 3 - Starting The Remote Simple Installation
Okay now we have either a bootable floppy disk or a bootable CD-R which contains the installation program.
You should also remember to have your computer connected on-line unless the OpenBSD sets are located locally. This connection will be configured during the installation process in order to do a remote install.
Boot your computer up using the install floppy or CD-R.
The screen below starts after the boot process and shows the start of the installation program, red text is user input:
root on rd0a swap on rd0b dump on rd0b erase ^?, werase ^W, kill ^U, intr ^C, status ^T Welcome to the OpenBSD/i386 4.6 installation program. (I)nstall, (U)pgrade or (S)hell? i At any prompt except password prompts you can escape to a shell by typing '!'. Default answers are shown in []'s and are selected by pressing RETURN. You can exit this program at any time by pressing Control-C, but this can leave your system in an inconsistent state. Terminal type: [vt220] <enter> System hostname? (short form, e.g. 'foo') home Available network interfaces are: fxp0 vlan0. Which one do you wish to configure? (or 'done') [fxp0] <enter> IPv4 address for fxp0? (or 'dhcp' or 'none') [dhcp] <enter> Issuing hostname-associated DHCP request for fxp0. DHCPDISCOVER on fxp0 to 255.255.255.255 port 67 interval 1 DHCPOFFER from 192.168.1.250 (08:00:20:94:0b:c8) DHCPREQUEST on fxp0 to 255.255.255.255 port 67 DHCPACK from 192.168.1.250 (08:00:20:94:0b:c8) bound to 192.168.1.199 -- renewal in 43200 seconds. IPv6 address for fxp0? (or 'rtsol' or 'none') [none] <enter> Available network interfaces are: fxp0 vlan0. Which one do you wish to configure? (or 'done') [done] <enter> Using DNS domainname in.nickh.org Using DNS nameservers at 192.168.1.252 Do you want to do any manual network configuration? [no] <enter> Password for root account? (will not echo) PaSsWoRd Password for root account? (again) PaSsWoRd Start sshd(8) by default? [yes] <enter> Start ntpd(8) by default? [no] y NTP server? (hostname or 'default') [default] <enter> Do you expect to run the X Window System? [yes] <enter> Do you want the X Window System to be started by xdm(1)? [no] y Change the default console to com0? [no] <enter> Setup a user? (enter a lower-case loginname, or 'no') [no] <enter> What timezone are you in? ('?' for list) [Canada/Mountain] EST5EDT Available disks are: wd0. Which one is the root disk? (or 'done') [wd0] Disk: wd0 geometry: 4998/255/63 [80293248 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 06 0 1 1 - 521 254 63 [ 63: 8385867 ] 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 Use (W)hole disk or (E)dit the MBR? [whole] <enter> Setting OpenBSD MBR partition to whole wd0...done. Setting OpenBSD MBR partition to whole wd0...done. The auto-allocated layout for wd0 is: # size offset fstype [fsize bsize cpg] a: 1024.0M 63 4.2BSD 2048 16384 1 # / b: 127.2M 2097215 swap c: 39205.7M 0 unused d: 2729.1M 2357679 4.2BSD 2048 16384 1 # /tmp e: 4223.2M 7946823 4.2BSD 2048 16384 1 # /var f: 1252.3M 16595895 4.2BSD 2048 16384 1 # /usr g: 1024.0M 19160541 4.2BSD 2048 16384 1 # /usr/X11R6 h: 3678.7M 21257693 4.2BSD 2048 16384 1 # /usr/local i: 2002.4M 28791612 4.2BSD 2048 16384 1 # /usr/src j: 2002.4M 32892533 4.2BSD 2048 16384 1 # /usr/obj k: 21142.3M 36993454 4.2BSD 2048 16384 1 # /home Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] <enter> /dev/rwd0a: 1024.0MB in 2097152 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0k: 21142.3MB in 43299416 sectors of 512 bytes 105 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0d: 2729.1MB in 5589144 sectors of 512 bytes 14 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0f: 1252.3MB in 2564644 sectors of 512 bytes 7 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0g: 1024.0MB in 2097152 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0h: 3678.7MB in 7533916 sectors of 512 bytes 19 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0j: 2002.4MB in 4100920 sectors of 512 bytes 10 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0i: 2002.4MB in 4100920 sectors of 512 bytes 10 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0e: 4223.2MB in 8649072 sectors of 512 bytes 21 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/wd0a on /mnt type ffs (rw, asynchronous, local) /dev/wd0k on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0f on /mnt/usr type ffs (rw, asynchronous, local, nodev) /dev/wd0g on /mnt/usr/X11R6 type ffs (rw, asynchronous, local, nodev) /dev/wd0h on /mnt/usr/local type ffs (rw, asynchronous, local, nodev) /dev/wd0j on /mnt/usr/obj type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0i on /mnt/usr/src type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid Location of sets? (cd disk ftp http or 'done') [ftp] <enter> HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] <enter> Server? (hostname, list#, 'done' or '?') [mirror.example.org] obsd.cec.mtu.edu Server directory? [pub/OpenBSD/4.6/i386] <enter> Login? [anonymous] <enter> Select sets by entering a set name, a file name pattern or 'all'. De-select sets by prepending a '-' to the set name, file name pattern or 'all'. Selected sets are labelled '[X]'. [X] bsd [X] etc46.tgz [X] game46.tgz [X] xfont46.tgz [X] bsd.rd [X] misc46.tgz [X] xbase46.tgz [X] xserv46.tgz [ ] bsd.mp [X] comp46.tgz [X] xetc46.tgz [X] base46.tgz [X] man46.tgz [X] xshare46.tgz Set name(s)? (or 'abort' or 'done') [done] <enter> bsd 100% |*************************************| 7063 KB 00:04 bsd.rd 100% |*************************************| 5913 KB 00:03 base46.tgz 100% |*************************************| 47315 KB 01:46 etc46.tgz 100% |*************************************| 503 KB 00:01 misc46.tgz 100% |*************************************| 2867 KB 00:06 comp46.tgz 100% |*************************************| 88555 KB 03:08 man46.tgz 100% |*************************************| 8047 KB 00:21 game46.tgz 100% |*************************************| 2558 KB 00:04 xbase46.tgz 100% |*************************************| 10160 KB 00:21 xetc46.tgz 100% |*************************************| 69166 00:00 xshare46.tgz 100% |*************************************| 2861 KB 00:12 xfont46.tgz 100% |*************************************| 34745 KB 00:57 xserv46.tgz 100% |*************************************| 19789 KB 00:39 Location of sets? (cd disk ftp http or 'done') [done] <enter> Saving configuration files...done. Generating initial host.random file...done. Making all device nodes...done. CONGRATULATIONS! Your OpenBSD install has been successfully completed! To boot the new system, enter 'reboot' at the command prompt. When you login to your new system the first time, please read your mail using the 'mail' command. # halt syncing disks... done The operating system has halted. Please press any key to reboot.
Remove the bootable floppy disk or bootable CD-R, then reboot. Have fun and enjoy.
Post Install - After the first boot
After rebooting a user will want to next read the afterboot man page. This document attempts to list items for the system administrator to check and set up after the installation and first complete boot of the system.
Reading the afterboot man page:
If you notice any errors, please let me know.
Other OpenBSD Tutorials
- Tips & Tricks - suggestions and configurations
- Patching - patching and kernel building