Cocoa Village Publishing


Making a Bootable OpenBSD cdrom

Example of making a bootable OpenBSD installation CDROM using snapshot

 This information is distributed in the hope that it will be useful, with the understanding that the information presented is from various sources and application experiences, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  The information for installing that is on the OpenBSD website is sufficient for someone familiar with administering BSD Unix.  For the purpose of documenting what you do and doing what you document we clarify some of the information here for this specific solution.

A situation may arise where you need a bootable install cdrom for OpenBSD immediately or you want to test/use a recent snapshot release to install by cdrom.  Otherwise you should purchase the install cdrom to support OpenBSD: 


AS OF OPENBSD 4.2, the cdrom ISO image is included for download.  It already includes the boot, and necessary files to install.  Prior to this version, one had to be created.  To save bandwidth, you only need to copy the install**.iso file, because it would be redundant to copy the others since they are in the ISO file...

   example for i386 platforms:



Example of making a bootable OpenBSD installation CDROM for i386 using snapshot for 4.1.   NOTE, as of OpenBSD 4.2 and newer, a cdrom ISO image is included for download, so you no longer need to download the individual files and create one.  This information is left here for historical purposes:

Most computers based on the i386 architecture can boot from a CDROM. These instructions outline how to create a bootable CDROM for installing OpenBSD on this architecture..

Get your files organized. The OpenBSD installer expects to see a CDROM with a directory structure of /version_number/architecture/, where version_number is the current version, and architecture is i386. For a minimal boot image, all that's needed are the tarred gzipped install files, the bsd kernel, and the cdromxx.fs floppy image.

These files need to be arranged in a directory, example for an OpenBSD snapshot for i386 build targeted for 4.1 version.

mkdir -p OpenBSD/4.1/i386

If you know what you are doing and have a machine with current, you could make your own install software rather than using the FTP site,  read man release if you are up to the challenge ;).  Else, use ftp to copy the necessary files into the OpenBSD/4.1/i386 directory.  Also try to pick a nearer mirror of to spread out the load on the supporting infrastructure.

$ cd OpenBSD/4.1/i386  
$ ftp -n* 
$ cd ../../..   # one folder above OpenBSD

Now all you need is to use mkisofs or mkhybrid to create an iso image:

mkhybrid -r -b 4.1/i386/cdrom41.fs -c "boot.catalog" -o OpenBSD_snapshot.iso OpenBSD

The above command creates a ISO9660 CD with Rock Ridge extensions, which will boot from the floppy image in cdrom41.fs. The image is output to OpenBSD.iso. You can then burn this onto a CDROM with anything that knows how to burn ISO images. I've used cdrecord on OpenBSD, or copied the file onto a Windows box and used the recording software there.

Notes for burning with OpenBSD:
The base operating system supports mkhybrid, but not an application to use the cdrom writer. Included in the ports is the package 'cdrtools.' To install this package either download it or make it from the ports tree.
# example of installing cdrtools and a command you might use with 12 speed burner
cd /usr/ports/sysutils/cdrtools
make install
/usr/local/bin/cdrecord -v speed=12 dev=/dev/rcd0c:0,0,0 \
             -data driveropts=burnproof OpenBSD_snapshot.iso

Or if you are using a Microsoft platform to make the cdrom, Make sure the files are brought over to your MS machine in "binary" not ascii and use a cdrom burning software like "Nero" and setup to be ISO9660 with no extensions like Joliet and set the boot file as afore mentioned.

It is best to purchase the original installation cdroms, but if you must use current builds, the above can work. And you should go to the OpenBSD website and donate money, labor and/or hardware!  The sales of OpenBSD official cdroms are a large part of the funding that makes OpenBSD possible. Yes you should feel guilt if you benefit but don't purchase the authentic OpenBSD installation cdroms,  participate in development, help other users, nor fund OpenBSD: