custom .iso install disk

I'm using the 8.1 release disk1 .iso in order to teach basic unix command line operations. I'd like to incorporate some additional documentation on the CD so that the instructional procedures I've written can be deployed with the disk. I've spent days researching different cd burning programs and tried many operations with dd in order to snag the mbr portion of the .iso but I must be doing something wrong because I haven't been successful (hence, this post)

Any thoughts?

============================
Inside my Mac OSX 10.6.6 (native) I'm running
more OSs than I can count thanks to Parallels,
and an obscene amount of RAM.
============================
 
Thanks. After a brief glance at the release(7) info I think I ought to be able to put something together. I guess I was kind of hoping for a slightly easier way out. I don't need to re-invent the entire disk1, jsut adda few documents. If I can't figure it out in form the link you gave me in about 2 hours I'll just admit defeat and give the students a documentation disk in addition to the installation disk.

It does seem that someone out there ought to have a way to create an .iso (or some other image) from a disk then be able to add some files to it without losing the mbr info from the original disk. I admit though that it is not a popular enough problem to merit sufficient documentation. For that matter, nor is it a popular enough problem to be included as a function of any mass distribution software. I digress. Thanks, wish me luck.
 
A CD doesn't have the same type of booting system, AFAIK. So you'll always have to remaster the CD. However, the brute-force way to do that would be to use mdconfig(8) to mount the ISO, copy all the files to a writable directory with your additional files, then re-write the CD from that new directory. That might require adjusting things so it'll still boot into sysinstall, or boot at all.

When copying files, watch out for hard links. There are a lot in the /rescue directory. There's an example using rsync in my PXE document.
 
If I understand what you are asking. You said that you use dd.
Code:
#dd if=/dev/acd0 of=myiso.iso
Will make you an .iso image of the cd-dvd. Where /dev/acd0 is the dvd reader and myfile.iso is the .iso image file created in my example.

Mount the .iso
http://forums.freebsd.org/showthread.php?t=4932
Code:
mount -t cd9660 /dev/`mdconfig -f myiso.iso` /mnt

Edit or add what you will to the .iso, save it, and burn a new disk with it. The finished .iso can't be larger that the disk you want to write or you'll have problems of course.

Edit: Wblock beat me to it while I was thinking.
 
UPDATE:
I spent a few hours earlier today working inside a Windows7 environment playing with a freeware program that a co-worker recomended. The program ImgBurn seemed to have promise because it will extract and wirte MBRs very easily inside a the Windows GUI. I was closer to being succesful than anything I've tried so far. I know that MBR can be extracted and written with dd (something like #dd if=/dev/disk of=path_to_my_mbr_image bs=512 count=1) But I've been unsuccesful at getting a bootable disk with that. I think that my limitation lies in my understanding of the structure of .iso 9660

The ImgBurn program got a disk that was able to boot through the loader phase but couldn't find a kernel. I will explore your suggestions this evening, and post the results here. I've also gotten a tip from manolis@ and I will also post that here later. Thanks for your suggestions, wish me luck!
 
SOLUTION:
Provided by manolis@ :

Good news! Yes, it is entirely possible to add material to the 'official' CD/DVD without actually running make release or touching any of the other files. You just need to:

- Mount the official CD and copy all the files to a temporary area of your choice
- Add any files/directories you wish into it
- Recreate a bootable ISO image from the flat files. This is probably the part you are missing:

Assuming your custom cd is in ~/custom:

cd ~/custom
mkisofs -J -R -V customBSD -no-emul-boot -b boot/cdboot -iso-level 3 -o ~/mycustom.iso .

This will create a bootable CD ISO image (mycustom.iso in your home dir, labeled customBSD) that will behave exactly as the original FreeBSD media - sysinstall will of course ignore your extra files, but you will be able to use them when the CD is mounted again after the initial install.
Hope this helps!
As I don't follow the forums often, you are welcome to mail me directly with any questions at manolis@freebsd.org

Good luck!

I would point out one very common error when using the mkisofs (aka: genisoimage) command, IT IS IMPORTANT TO NOT FORGET THE '.' that must follow the command. There are about 20 or so google results easily found regarding this very same mistake. It causes the following error:

Code:
I -input-charset not specified, using utf-8 (detected in locale settings) 
genisoimage: Missing pathspec.
Usage: genisoimage [options] -o file directory ...

If I get a chance this weekend I will explore some of the other solutions posted above. Thank you all for your help.
 
cereal-killer said:
SOLUTION:
Provided by manolis@ :



I would point out one very common error when using the mkisofs (aka: genisoimage) command, IT IS IMPORTANT TO NOT FORGET THE '.' that must follow the command. There are about 20 or so google results easily found regarding this very same mistake. It causes the following error:

Code:
I -input-charset not specified, using utf-8 (detected in locale settings) 
genisoimage: Missing pathspec.
Usage: genisoimage [options] -o file directory ...

If I get a chance this weekend I will explore some of the other solutions posted above. Thank you all for your help.

very good and useful indeed but where is boot/cdboot ?
 
boot/cdboot would be in ~/custom in the example above.

The parameters to mkisofs(8) have to end with a list of files and directories to put in the ISO. The dot here means "current directory".
 
Back
Top