The OpenBSD group offers iso's you can download and use to install your system. The problem is they may have install sets you will never use or you want to add another set with custom software. With a custom made cd you can choose the sets you want to be on the default install. If you never use X windows then take out all of the X server files. If you do not play games then take out the game tgz file. Lets say you have custom programs you want installed by default, add your tgz file to the cd and have it available in the default install.
IMPORTANT NOTE: In OpenBSD v4.6 you can now just download the bootable iso "install46.iso" if you DO NOT want to customize your cd image. The "install45.iso" image has all of the files you need to install OpenBSD.
Below you will find a detailed description of building a bootable OpenBSD CD using OpenBSD or Linux. At the bottom of the page is a script to better automate the process once you understand the basics.Making a custom bootable OpenBSD CD
Step 1: We need to make the directory structure to build the OpenBSD ISO image in. Decide where you have around 450 meg of free space. You need the space for the install files we are going to download _and_ for the ISO image we are going to create.NOTE: you need to decide what architecture you are going to use. For this example we are going to be making a CD for the amd64 architecture, but you can easily make an i386 CD with the same method by replacing amd64 with i386.Start by building the directory tree under /tmp as most users have the ability to write there. The ISO will be for OpenBSD v4.6 on the amd64 architecture. You can always replace amd64 with i386 if you have that architecture. Execute the following two lines to make the /tmp/OpenBSD/4.6/amd64 directory structure and change into it.
/tmp ] mkdir -p /tmp/OpenBSD/4.6/amd64 /tmp ] cd /tmp/OpenBSD/4.6/amd64
For more information about OpenBSD's Pf firewall and HFSC quality of service options check out our PF Config (pf.conf) and PF quality of service HFSC "how to's".
Getting the latest release
Step 2: Now we need to download the install sets for the release we want to build.We are going to be getting our packages from the tertiary USA mirror OpenBSD ftp server, but it is suggested that you look at the list of mirror servers and pick the one located closest to your geographic location. To get the files lets use "wget" while in the amd64 directory. Notice we are _not_ retrieving any *.iso files because we are making our own. There is no need to put extra load on the ftp server downloading files we do not need.
/tmp/OpenBSD/4.6/amd64 ] wget --passive-ftp --reject "*iso" ftp://ftp.openbsd.org/pub/OpenBSD/4.6/amd64/*
Optional: Trimming the unwanted files
Step 3: If you want to, you can customize the bootable cd by removing the tgz files you know you will never need. For example, we usually remove the "games45.tgz" as we do not play games on the BSD box. By taking out unused files they will not show up in the install options and you do not need to disable them from being installed. This is an example list of the files we use:/tmp/OpenBSD/4.6/amd64 ] ls base45.tgz bsd.mp cdboot comp45.tgz INSTALL.amd64 MD5 xbase45.tgz xfont45.tgz xshare45.tgz bsd bsd.rd cdbr etc45.tgz man45.tgz misc45.tgz xetc45.tgz xserv45.tgz
IMPORTANT NOTE: Starting in OpenBSD v4.6 the file cdrom45.fs is no longer available. Because of this, we will be building the bootable ISO using mkisofs with the argument -no-emul-boot.
Make the ISO image
Step 4: To make the ISO image we will be using "mkisofs". You should verify that all of the files in the ftp directory downloaded without error and match the md5 check sums before continuing. To make the ISO image we need to execute the following line from the "/tmp/OpenBSD" directory. The file OpenBSD.iso will be created in /tmp/OpenBSD when finished./tmp/OpenBSD/4.6/amd64 ] cd /tmp/OpenBSD /tmp/OpenBSD ] mkisofs -r -no-emul-boot -b 4.6/amd64/cdbr -c boot.catalog -o OpenBSD.iso /tmp/OpenBSD/
Burn the ISO to CD
Step 5: You now have a bootable working ISO image for the latest release of OpenBSD. Lets take a look at the last step which is burning the ISO image to a cd. We will be using "cdrecord" to burn the ISO at 32x to the cd writer device "/dev/rcd0c:0,0,0" with a nice level of 18 (prioritizing CPU time to the burn process). The cd will automatically eject after the burn. If you have another cd burning program you are more comfortable with like k3b or nero you are welcome to use those./tmp/OpenBSD ] nice -18 cdrecord -eject -v speed=32 dev=/dev/rcd0c:0,0,0 -data -pad /tmp/OpenBSD/OpenBSD.iso
How about a script?
No problem. Here is a shell script to tie the above commands together. Change the variables "version" and "arch" to suit your distribution. This script is named calomel_make_boot_cd.sh which you can cut/paste from this scrollable window.#!/usr/local/bin/bash # ## Calomel.org -- Making a bootable OpenBSD CD ## calomel_make_boot_cd.sh # arch="amd64" # Architecture version="4.6" # OS version # echo "building the environment" mkdir -p /tmp/OpenBSD/$version/$arch cd /tmp/OpenBSD/$version/$arch # echo "getting the release files" wget --passive-ftp --reject "*iso" ftp://ftp.openbsd.org/pub/OpenBSD/$version/$arch/* # echo "building the ISO" cd /tmp/OpenBSD mkisofs -r -no-emul-boot -b $version/$arch/cdbr -c boot.catalog -o OpenBSD.iso /tmp/OpenBSD/ # echo "burning the bootable cd" nice -18 cdrecord -eject -v speed=32 dev=/dev/rcd0c:0,0,0 -data -pad /tmp/OpenBSD/OpenBSD.iso # echo "DONE." #
Want more speed? Make sure to also check out the Network Speed and Performance Guide. With a little time and understanding you could easily double your firewall's throughput.
1 comment:
I want to install OpenBSD. thanks are guided on how to install.
Post a Comment