How to create and burn a complete FreeBSD distribution in DVD


- Corrected and updated to 6.2 FreeBSD Release

Putting the 2 RELEASE discs in one DVD is actually quite easy, and it's even easier with this script (BSDDVD_6_2_script.tar.gz), which does all of the following steps.

First you need to download both of the ISOs, disc-1 and disc-2.

Note: all commands must be run as root

Once you have both ISOs, you need to configure each as a "memory disc":
  Run the following command: mdconfig -a -t vnode -f TheIsoFileName.iso
That will attach the file as a vnode, which means the /dev/md# will have the contents of that file. If you haven't got any md devices attached, then # will take a 0 value. You can control that with the -u option.

Now, you must mount the md as if it were a CDROM:
  mount_cd9660 /dev/md# /cdrom/

Okay, now you must copy the entire contents of the CDROM off to somewhere in your filesystem:
 mkdir /home/BSDDVD
 cp -pRv /cdrom/ /home/BSDDVD
(This may take a long time..)

After copying is done, unmount the pseudo-CDROM, the memory disk, and repeat the same process with the second ISO.

To unmount the cdrom, use this command:  umount /cdrom/
To detach the memory disk, use the following command:
 mdconfig -d -u #, where # is the unit attached. Typically 0.

Copy the contents of the second ISO into the same directory where you copied the contents of the first one.

Now we must take care of the following files: cdrom.inf, located in the root of what will become our DVD, and INDEX, located inside the packages subdirectory.

  - Open cdrom.inf, and make sure CD_VOLUME inside cdrom.inf is set to "1".
  - Change the trailing "|2"s inside the INDEX file, to "|1". The following sed command should take care of it:
sed 's/\|2$/\|1/' INDEX > INDEX_1.inf ; mv INDEX_1.inf INDEX

Now we simply burn this whole thing using growisofs (ports/sysutils/dvd+rw-tools):
 growisofs -dvd-compat -Z /dev/cd0 -V FreeBSD_6_2_RELEASE -r -J -no-emul-boot -b boot/cdboot -c boot.catalog /home/BSDDVD

The most important option is -b, which sets the bootloader (relative to the root of the DVD).
Consult the mkisofs manual to read more about it


The script i've made will create a directory named "BSDDVD" inside the home directory (which I suppose, tends to be located where the most space is available), attaches, mounts and copies the contents of the ISOs, unmounts and leaves everything ready so you just run another script, which runs growisofs with the appropriate arguments.

Please read it thoroughly before running it.



What about the DOCS iso?

According to the 6.2 Release Announcement,
"The ''docs'' image has all of the documentation for all supported languages."

So it is most likely not needed. Anyway, it can be added to the DVD with the commands previously described, if you like.
If you want to include the DOCS ISO, please download this script: BSDDVD_6_2_script_with_docs.tar.gz.


Regresar a "FreeBSD"