Warp 3 Bootable CD Image (Command-line only)
============================================


by rico Mendona
(that's Erico Mendonca for you non-850 guys)


Last revision: June 13th, 2000





This file will tell you how to build a bootable command-line Warp 3 CD. Well,
actually you'll learn how to assemble the files included and make it work :)


1. Required tools
=================

mkisofs.exe  - to create the ISO image
cdrecord.exe - to burn the ISO image
mkbtcd2.exe - to add the boot record to an ISO file


The first two may be found at the CDRecord/2 homepage:

http://www.geocities.com/SiliconValley/Sector/5785/cdrecord/cdrecordmain.htm

        It's also the home for Audio/Data CD Creator and CDRTOOLS/2, which are
graphical frontends for CDRecord/mkisofs. These are highly recommended.

        A copy of mkbtcd2.exe has been included for your convenience.


If you wish to alter the boot image (optional):

- any virtual disk utilities like SVDISK or RAMFS
(may be found on hobbes)

- loaddskf.exe - to extract boot images
(comes with OS/2)

- image.exe, savedskf.exe or similar - to recreate boot images
(may be found on hobbes. IMAGE.EXE is lost somewhere in the OS/2 CD :))




2. Assembling the files
========================


Included in this archive are:

bootcat.bin - the boot catalog file. Must be present on the root directory of
              the CD.
warp3.img - the boot image itself. Contains all the required boot files, and
            must be present on the root directory of the CD.


OS2\FDISK.COM      ]
OS2\FORMAT.COM     ] These should be located on the corresponding directories
OS2\HPFS.IFS       ] on the CD.
OS2\DLL\UHPFS.DLL  ]


        You might have noticed that there are some differences from your usual
"OS/2 boot CD how-to". Why is HPFS.IFS is outside the CD you might ask? Well,
let me tell you why...

        I had already made some bootable CDs for a customer, but never got them
to work on my Toshiba notebook. I noticed that some CDs did boot correctly (like
RedHat Linux and god forbid, Win98). After reading the El Torito specification
(the official specification by Phoenix and IBM that defines how a bootable CD
should be), and analyzing those CDs, I discovered the reason: Toshiba's BIOS
only understood 1.44MB boot images. So I started to make the boot image as
small as possible to fit on 1.44MB, but without losing functionality. I
accomplished this by loading everything possible from the CD instead of the boot
image.

        Let's take a look at CONFIG.SYS:

=====================[snip]========================
PROTSHELL=\OS2\BOS2SHL.EXE
SET OS2_SHELL=\OS2\CMD.EXE

SET COMSPEC=\OS2\CMD.EXE

MEMMAN=NOSWAP,PROTECT
CODEPAGE=850
DEVINFO=KBD,US,\OS2\KEYBOARD.DCP
DEVINFO=SCR,EGA,\OS2\VTBL850.DCP
LIBPATH=.;A:\OS2\DLL;A:\OS2\MDOS;X:\OS2\DLL;
SET PATH=A:\OS2;A:\OS2\MDOS;X:\OS2;X:\UTILS;
SET DPATH=A:\OS2;A:\OS2\MDOS;X:\OS2;X:\UTILS;

SET PROMPT=[Maintenance Disc - $p]
BUFFERS=30
IOPL=YES

SET KEYS=ON
DISKCACHE=D,LW
BASEDEV=CHKDSK.SYS

BASEDEV=IBMKBD.SYS

BASEDEV=IBM1FLPY.ADD /FORCE:1 /U:0 /F:1440

BASEDEV=DANIS506.ADD

BASEDEV=OS2DASD.DMD

BASEDEV=DANIATPI.FLT

RESERVEDRIVELETTER=W:

BASEDEV=CD_BOOT.FLT /D:1

DEVICE=\OS2\TESTCFG.SYS

DEVICE=\OS2\OS2CDROM.DMD /Q
IFS=\OS2\CDFS.IFS /Q
IFS=X:\OS2\HPFS.IFS /CACHE:2048 /CRECL:4 /FORCE
=====================[snip]========================


        What I did was to put just the bare minimum necessary to boot the system
correctly inside the boot image itself, and everything else that could be read
off the CD was indeed placed in the CD.

        I wanted to use all-new files, instead of using some old files from
fixpak #0.5 just because they were smaller. So, all OS/2 files are from Fixpak 42,
CD_BOOT.FLT is from Aurora (not the older copy found elsewhere), DANIS506.ADD is
version 1.2, DANIATPI.FLT is version 0.2.1, all current as of this date.

        You may have noticed that I'm using good old BOOTOS2 to make this. It
shouldn't be very painful to create another image from scratch if you know how.

        With this we're left with 89kb free on the boot image, enough for an
extra basedev or two. If you still need more space for drivers, decompress the
image file to a 2.88MB virtual disk, put the files in, compress it back and you're
set. Another advantage of using a 1.44MB image is that you won't actually need
to mess with Virtual Disk utilities. You can extract it all to a normal 1.44MB
diskette, make the changes and compress it back. Remember: if it's a BASEDEV or
a required boot time DEVICE (there shouldn't be any more needed), place the files
inside the boot image. If it's any other type of device, EXE or CMD, place it on
the CD itself. You may add to the PATH, LIBPATH, HELP, etc statements as you wish.
The CD will always be mounted as X:.


        Ok, back to the CONFIG.SYS:

        The RESERVEDRIVELETTER=W: guarantees that the CDROM will always be mounted
with letter X: (another reason to use updated files...);

        The IBM1FLPY.ADD statement uses the /F:1440 parameter to specify a "permanent"
1.44MB floppy to the system at all times;

        The CD_BOOT.FLT statement uses the /D:1 parameter to tell the system to
emulate a 1.44MB boot image, then mount the rest as a normal drive (in our case
it will be X:).

        The HPFS.IFS statement uses the /FORCE parameter. This will make the system
boot flawlessly, without complaining about HPFS partitions that weren't stopped
correctly (e.g. with the dirty flag).



3. Creating & burning the ISO
==============================

        Well, let's move on. After placing all the files mentioned earlier on
their proper locations, and anything else you wanted (archivers, file utilities,
etc) we're off to create an ISO image. Let's start MKISOFS:

[d:\bootcd] mkisofs -a -J -l -L -T -V <vol> -o bootos2.iso -v <path>

This will tell MKISOFS to do the following:

1) -a: get all files (system, hidden, read-only, etc)
2) -J: add Joliet file system information (longnames)
3) -l: allow full ISO9660 filenames (longnames)
4) -L: allow files to begin with dots (like .BitchX)
5) -T: create translation table (TRANS.TBL). Useful for longname-challenged OSs.
6) -V <vol>: the volume label of the disc.
7) -o <iso>: the name of the ISO file.
8) -v <path>: path from where the files will be read from. Don't forget to put
              a slash (/) at the end.


Please note that there are other ways to do this, like using one of the many GUIs
available for CDRecord/mkisofs.

        Then run mkbtcd2.exe on the generated iso:

[d:\bootcd] mkbtcd2 <iso> <boot catalog> <boot image> -S<id>

1) <iso>: the name of the ISO file you created with mkisofs.
2) <boot catalog>: in our case, bootcat.bin
3) <boot image>: in our case, warp3.img
4) <id>: a text string to identify the boot image. I use "OS/2Warp" (without quotes)


        Now all you have to do is burn the image to a CD using CDRecord directly:

[d:\bootcd] cdrecord dev=x,y,z speed=x <iso file>

or by using your favorite graphical front-end. I recommend using CDRW media for your
first tries, unless you don't have enough coasters :)



        Well, that concludes the creation of the boot image.


Have fun!

-- Erico Mendonca <slaughter@malaconet.org>
