SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

September 2003


 Dear Mr. Know-It-All 

Mr. Know-It-All has the answers to even the really tough questions.


Question:

Hayo Baan says I can use cdrecord with his BootAble package. Can you give me a hand here?

Answer:

Mr. Know-It-All has been waiting for someone to ask this question since he has already figured out how to do this.

cdrecord has a rather complex set of command line options because it handles a large number of CD formats, many that an OS/2 user may never see. To use cdrecord successfully one has to know what to ignore. Mr. Know-It-All's approach is to start with no switches and add switches as needed. In addition, Mr. Know-It-All puts the settings in configuration files when possible.

He also uses a set of 4OS2 aliases so that most CD building and burning operations become single word commands like bldimg or burn. If someone asks, Mr. Know-It-All might be convinced to discuss his 4OS2 aliases at some future date.

Setting Up Bootable

Follow Hayo's instructions. They are well written and completely explain how to use BootAble although he does not discuss using cdrecord in depth. He is an RSJ user.

Mr. Know-It-All chose to use VFDisk for virtual diskette support. Super Virtual Disk is also a good choice. Mr. Know-It-All has limited needs for a virtual diskette drive and chose the simpler tool.

Mr. Know-It-All would have liked to use RAMFS, but this is not possible. RAMFS does not emulate a diskette drive so it can't hold a bootable diskette image.

Mr. Know-It-All finds Chris Wohlgemuth's ISOFS handy for previewing the ISO before burning. If you are using CD-RW media, you can probably get by without ISOFS. The burn time for bootable CDs is usually pretty quick.

Of the many BootAble parameters, the following are probably the most important when using BootAble with cdrecord. The values shown are those that Mr. Know-It-All uses and should make the examples that follow easier to understand. Your values will probably be different.

CDRECORD='YES' This setting should be obvious.
VIRTUALDRIVE='U:' This setting defines the drive letter of your virtual diskette drive.
WRITERDRIVE='J:\TMP\0' This setting defines where BootAble will place its output. This will be some or all of the content of the final CD.
CDRECORDCLEANDIR='YES' Mr. Know-It-All recommends starting with a clean work directory.
BOOTIMAGENAME.1='OSBOOT.IMG' This is the name of the primary boot image file.
BOOTIMAGENAME.2='OSBOOT_2.IMG' This is the name of the boot image extension file. It will be created if the boot image exceeds 2.88MB. If this is the case, you must use daniboot.flt rather than cdboot.flt.

Setting up cdrecord

Mr. Know-It-All finds that cdrecord is easier to use if one avoids the command line and uses environment variables and parameter files to define settings. This avoids having to pass them on the command line. The cdrecord command line is usually long enough to be annoying with just the required parameters.

Environment Variables

Mr. Know-It-All defines the following cdrecord environment variables:

  set CDR_DEVICE=1,4,0
  set CDR_SPEED=12
  set CDR_FIFOSIZE=16M

Mr. Know-It-All defines two additional variables:

  set ISOFILE=j:/tmp/tmp.iso
  set ISOFILED=j:\tmp\tmp.iso
These define the location of the ISO image in UNIX and OS/2 format. The examples that follow show how these variables are used.

.mkisofsrc - cdrecord Configuration File

This optional file can be used to define a variety of cdrecord parameters that are relatively constant.

Mr. Know-It-All defines a .mkisofsrc which contains:

  VOLI=CDBOOT
  APPI=A Bootable CD
  PREP=Mr. Know-It-All
  PUBL=Mr. Know-It-All's Workshop

pathlist.in - Included Paths File

Mr. Know-It-All defines all included paths in the file pathlist.in. This file is referenced on the mkisofs command line.

For a simple bootable CD-ROM this file contains just:

  /=J:/TMP/0/
This puts BootAble's output at the root of the ISO image. A typical pathlist.in file will contain much more than this. BootAble is optimized for RSJ and has a large number of parameters to specify which files it copies to the filesystem mounted by RSJ. With cdrecord, Mr. Know-It-All finds it more efficient to bypass these copy operations and to let mkisofs to do the copy as it constructs the ISO image. The source and destination paths are listed in pathlist.in.

pathlist.out - Excluded Paths File

Mr. Know-It-All defines all excluded files and paths in pathlist.out. For a simple bootable CD-ROM, the file is empty. However, it must exist if it is referenced on the cdrecord command line.

Mounting the Virtual Diskette

If like Mr. Know-It-All you leave the virtual diskette ejected when not in use, issue the command

  VFCtrl U: 2.88
to mount a 2.88MB virtual diskette.

Running BootAble

Mr. Know-It-All runs BootAble with the following command line:

  Bootable Default.cfg MakeCD.cfg
Default.cfg contains standard settings that apply to all BootAble operations on Mr. Know-It-All's system.

MakeCD.cfg contains settings specific to building bootable CD-ROMs.

As Hayo recommends, Mr. Know-It-All does not alter the baseline files that come with BootAble. All overrides and settings are done with private configuration files. With the example parameters, the BootAble output will be placed in J:\TMP\0.

Building the ISO image

Mr. Know-It-All uses, the following command line to build the ISO image (the following is one line):

  mkisofs -v -o %ISOFILE% -r -J -graft-points -b OSBOOT.IMG -c 
  boot.cat -path-list=pathlist.in -exclude-list=pathlist.out
All the cdrecord switches and many of the file names are case sensitive. Be sure you know what you are doing before changing these values.

The results of the mkisofs run will be an ISO image. You can mount this with ISOFS and verify the content or you can just burn a CD and see what happens.

Burning the CD

Mr. Know-It-All burns a single-session CD-ROM with the command:

  cdrecord -vv %ISOFILE%
All that's left to do it to test the CD and see if it boots.

Final Thoughts

It seems that no matter how much planning one does, the first CD image is never quite right, even if it boots successfully. You can make the tuning process easier by placing the repeated commands in CMD files. If you use 4OS2, you can define aliases or load the commands into the history file with a single CMD file.


Curious or in doubt, you can ask Mr. Know-It-All
OS/2 is his specialty and sharing solutions is his passion
Mr. Know-It-All lives in Southern California.


The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2003 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.