Thursday, March 24, 2011

OpenBSD CD: When the Net Install Fails

You can call me biased (or an evangelist), but my favorite free open source operating system is definitely OpenBSD because it's secure by default (turning off open ports off any Unix-like system should indicate incompetence rather than system admin machismo), easy to install and to manage. If you're like me coming from the so-called third-world country and cash-strapped, you can't afford the original CD (along with the heck of cash customs will make you bleed with) or worse, your internet access isn't fast enough to use the network install ISO provided by the project. So what are we to do to appreciate this very elegant, secure, free and functional Unix-like system? We can create our own installer ISO (provided that you don't have broadband access to use the network install ISO that will download the installation files).

What will you miss out when you go through the process we'll discuss in this article? You're missing out on the freebies that comes with the original CD: the nice artwork and a song (some swear by the stickers). But most importantly, when you buy the original CD, you support funding the OpenBSD project, so that they keep churning out new versions with new features and functionality while not compromising system security, safe in the knowledge that you have a system that's a labor of love.

Below is the shell script you can run on any Unix-like system, thanks to for the original script:

## Thanks to for inspiration
arch="i386"       # Architecture
version="snapshots"       # OS version
builddir="/home/francis/Desktop"       # File and ISO build location
obsdhost="" # URL of OpenBSD file host
echo "building the environment"
mkdir -p $builddir/OpenBSD/$version/$arch
cd $builddir/OpenBSD/$version/$arch
echo "getting the release files"
wget --passive-ftp --reject "*iso" $obsdhost/$version/$arch/* 
echo "building the ISO"
cd $builddir/OpenBSD
mkisofs -r -no-emul-boot -b $version/$arch/cdbr -c boot.catalog -o OpenBSD_$arch_$version.iso \ $builddir/OpenBSD/
echo "DONE."

You can modify the architecture or arch (i.e. amd64, ppc), the version (i.e. snapshots for the bleeding edge version, as of this writing the current is 4.8, OpenBSD 4.9 is about to be released soon), build directory or builddir (mine is /home/francis/Desktop, just make sure you have write access to the path you indicate here), and the OpenBSD installer file source or obsdhost (i.e.

Provided we name the script, to execute and build your OpenBSD CD ISO, from the command line, just type the following and press the carriage return (may be labeled Enter on the keyboard) :


Once you have burned your ISO into a CD, give it a spin and install it on your PC following this guide and hope you'd appreciate the system enough to spread the word on it's virtue and support the project via donations.

No comments:

Post a Comment