OpenBSD can be installed via a serial console. Some hardware platforms support this by default, but the i386 (and amd64) platform has historically proven somewhat annoying in this respect, due to various reasons. Lack of a standard for this platform is one of the most important reasons.

Make sure your system has a serial port and that it's configured correctly in the BIOS. Although there are some systems that support configuring the BIOS over the serial port, or sometimes even across the network with certain management interfaces, this usually requires a keyboard + videocard + locally attached monitor. For more information on these issues and how they relate to OpenBSD read the appropriate FAQ entry. This solution is also very useful when installing OpenBSD on 'virtual hardware' such as Xen or Qemu. This makes for the perfect virtual server, requiring no locally attached monitor or keyboard whatsoever.

Given a properly configured system, you want to install OpenBSD via serial console. Unfortunately the default install media do not support this by default. You could use the boot prompt to set tty com0, but that would require the use of keyboard and monitor again. Therefore I supply install media for OpenBSD/i386-RELEASE and OpenBSD/amd64-RELEASE versions starting from 3.5 and instructions on how to build these yourself. (eg for snapshots)

How can you set console output to your serial port by default? Actually, it's quite easy. The OpenBSD bootloader supports some useful commands to configure this. You can either type them in at the boot(8) prompt, or you could create a file called boot.conf(8) with the intended statements in it (read that manpage for details on which commands are available):

	set tty com0
The default baudrate of the serial console is set to 9600bps. If you want to run your console device at a different speed, you must configure it before switching console devices. For example, on the popular Soekris hardware which runs its serial at a baudrate of 19200bps, use:
	stty com0 19200
	set tty com0

When the second stage bootloader starts, it checks for the existence of this file and, if present, executes the commands in them as if you typed them on the boot prompt. So what you must do is create a new file, in a new directory on the install media.

Please note that for pxeboot(8) configuration, you can create an /etc/boot.conf on the tftp server. This requires no changes to the bootloader or the kernel.

The above example does not describe how to build a non-emulating ISO image from bsd.rd + cdbr + cdboot as used in releases since 3.6. To find out how to make these, please consult /usr/src/distrib/${ARCH}/cdfs/Makefile. There you will find a solution to easily add the 'set tty com0' option to /etc/boot.conf on the installation medium.

Since recently (4.2), the project has stopped providing cdrom??.fs and the iso-image using floppy simulation. If you must use these for some reason, please search the src-tree which documents how this used to work so you can recreate them yourself.

For your convenience, I provide these modified images for currently supported -RELEASE versions of OpenBSD. (I used to provide images starting with 3.5, since these are only downloaded by (stupid) webcrawlers, I've stopped supplying these. If you really have a need for them, feel free to contact me directly) If you do not have an OpenBSD system yet to build them yourself, you can download the images below and use those to bootstrap your system. Depending on the software you currently have available you can use dd (UNIX) or rawrite (Windows/DOS) to write these images to floppy or use your CD-burning software (such as Nero) to burn the ISO images to CD.

After using these images to bootstrap your machine do not forget to configure the resulting system to use serial console (again, with /etc/boot.conf) and to allow logins there (/etc/ttys, see ttys(5)). Recent versions of the OpenBSD installer will ask you during the installation procedure if you would like to configure your system for serial console, making this process easier than ever.

IMPORTANT NOTE - If you use any of the above install media without checking their contents, you are trusting me with your system. This may not be what you want, chances are that you don't know me - why would you trust me ? You can check the validity of these images by downloading them, extracting the files from them and comparing those to the files found on the official install media as distributed by the OpenBSD project.

I should also note that, for some time now, I no longer own a machine with a floppy drive. So, yes, I still provide the images, they should still have the correct configuration, but I am not able to test this at all. Please let me know if you do use them and there is an issue with them.

Use the above with care; read it, understand it, grasp the tools used to make it work and do it yourself. Note that the examples assume 3.5. This release is now more than two years old so it probably isn't what you want. You are required to think for yourself to make this work for newer releases. The images are merely provided as an easy way out. Certain steps in the procedure described above may require changes on your system. Apply with care. Objects in the rearview mirror may appear closer than they are, etc. etc.

Back to OpenBSD stuff

Powered by OpenBSD