How to make a FreeBSD DVD





FreeBSD distributions usually have 2 CDs. I wanted to have both CDs combined into one DVD. There are several good reasons to do this.


  1. Convenience:   It is easier for me to keep track of 1 DVD.
  2. Speed:   I get at the most 3-4MB/S from my 52X CDRom drive, but
    I get as high as 10MB/S from my DVD running at 16X.
  3. Knowledge:   I wanted to learn more about the details of the CD and
    DVD formats.
  4. Spreading the word:   By describing how to put FreeBSD on a DVD ,
    I promote the image that FreeBSD is a mainstream OS and provide a service
    back to the BSD community.



    I will call the 2 CDs, CD1.iso and CD2.iso. The entire process will be done through the command line using TAR, mkdir, mdconfig, mount, and growisofs. If you are not familiar with these commands, read up on them before attempting to make your own DVD.

    It will be necessary to perform some of these commands as super-user unless you have set up your current FreeBSD installation to allow regular users to use mdconfig and mount commands.

   I won't go into a lot of details on how the commands work. You will have to visit the man pages and study them yourself. At this time, I am only going to provide a basic step by step description of how I make a FreeBSD DVD from the 2 distribution CDs.    As a regular user, I created directory called Downloads, and a subdirectory called temp and put the 2 distribution CDs I renamed CD1.iso and CD2.iso into temp.    My directory structure looked like this /home/barry/Downloads/temp/.    After logging in to my account, here is what I did. (cd to the directory with CD1.iso and Cd2.iso in it)

> cd Downloads/temp
(change to super-user)
> su
Passwd:
(make certain the iso files are here)
Eshop1# ls *iso
CD1.iso CD2.iso
(create a memory disk for CD2.iso and mount it to /mnt)
Eshop1# mdconfig -a -f CD2.iso
md0
Eshop1# mount -t cd9660 /dev/md0 /mnt
(use tar to copy the files, this better than the cp command IMHO)
Eshop1# tar -C /mnt -cf - . |tar -xf -
(the previous command takes some time, but is faster than a CDRom drive.)

(ok, unmount CD2.iso and remove the memory disk)
Eshop1# umount /mnt
Eshop1# mdconfig -d -u 0

(create a memory disk for CD1.iso and mount it to /mnt)
Eshop1# mdconfig -a -f CD1.iso
md0
Eshop1# mount -t cd9660 /dev/md0 /mnt

(use tar to copy the files, this better than the cp command IMHO)
Eshop1# tar -C /mnt -cf - . |tar -xf -

(ok, unmount CD1.iso and remove the memory disk)
Eshop1# umount /mnt
Eshop1# mdconfig -d -u 0
(Now it is necessary to check a couple of things.)
(it is neccessary that the cdrom.inf file point to the first CD volume.)
Eshop1# cat cdrom.inf
CD_VERSION = 6.1-RC1
CD_VOLUME = 1
(change the package references in the packages/INDEX file to point to the first CD.)
Eshop1# cd packages
Eshop1# cat INDEX |sed "s/||2/||1/g" > ix
Eshop1# mv ix INDEX
Eshop1# cd ..
(the temp/rr_moved directory needs to be removed)
Eshop1# rm -r temp/rr_moved
Eshop1# cd ..
(now we should be at /home/barry/Downloads and the /home/barry/Downloads/temp directory should have CD1.iso, CD2.iso and all of the files we need for the DVD)

(use growisofs to build and burn the DVD iso.)

Eshop1# growisofs -Z /dev/cd0 -speed 16 -J -R -no-emul-boot -b boot/cdboot -iso-level 3 temp
(make certain you have a blank DVD in your DVD writer, my DVD burner and media can run at 16X so I set my speed to 16, change this to whatever speed your DVD burner and media can support)
Eshop1#
(log out from the super-user account)
Eshop1# exit
>


Why did I do it this way ?
I like to use the command line.
Why did I leave the original iso images in the new DVD ?
DVDs and Cds start writing at inside of the disk. This is the slowest area of the media. By putting the 2 CD images into the directory first, I moved the DVD installation data about 1.2G into the DVD. The read speeds improve significantly by doing this.

Thats all , if you can not get this to work, try checking a few things before you email me.


Do you have access to the super-user account ?
Is your DVD burner identified as /dev/acd0 ?
Did you create the proper directorys, remember to use your own paths, not mine !
Do you have the tools installed ? You may have to install dvd+rw-tools.
.

Good Luck !
tigner@msu.edu

Valid HTML 4.01 Transitional