Boot CD HowTo

OS/2 Boot CD HowTo V1.1
With kindly permission by Chris Wohlgemuth the developer of cdrecord/2 and Audio CD Creator

The newest version of this FAQ and also Cdrecord and audio-datacdcreator can be found at: http://www.geocities.com/SiliconValley/Sector/5785/index.html

Creating an OS/2(*) boot CD isn't that easy due to the nature of OS/2. The following How-to shows you a way with minimal effort. It was tested with OS/2 V4 FP10 IDE only. For a more technical description of the boot process from CD get the cdboot.zip package which contains drivers, sample config.sys files and an informational file.

Disclaimer:
THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE INFORMATION GIVEN MAY BE INSUFFICIENT OR WRONG. YOU MAY USE IT ON YOUR OWN RISK. THE AUTHOR ISN'T RESPONSIBLE FOR ANY DATA LOSS OR DAMAGE AS A RESULT OF USING THIS INFORMATION EVEN IF BEING INFORMED ABOUT THE POSSIBILITY OF SUCH DATA LOSS OR DAMAGE. REPRODUCTION OF THIS PAGE IN ANY FORM WRITTEN OR VERBATIM (INCLUDING CDROM) IS NOT ALLOWED WITHOUT PRIOR PERMISSION BY THE AUTHOR. YOU MAY LINK TO THIS PAGE IF YOU DO NOT CHARGE FOR IT OR CLAIM COPYRIGHT FOR IT.

In short: Don't blame the author if anything goes wrong and your data is shredded. Don't try to make a couple of Dollars with my page without giving me a Ferrari and a villa in Bel Air.

Prerequisites
You need some utilities but all of them are free: drive). You may also use the Super virtual floppy (Shareware).
 * BootOS2 for creating the boot image
 * LXLite 1.2.1, for packing the system files
 * CD_BOOT.FLT, a filter driver contained in cdboot.zip.
 * VFDISK, a virtual floppy driver (if you don't have a 2.88M floppy
 * SAVEDSKF.EXE or IMAGE.EXE (included with OS/2 V4 in the DISKIMGS directory) for grabbing the floppy image

Unpack bootos2.zip and install a 2.88M virtual floppy drive if necessary. Be sure to put the files LXLITE.EXE and LXLITE.CFG from the LXLite package into the bootos2 directory as described in BOOTOS2.DOC.

A text only boot system
This is done really fast. Just start bootos2.exe to create a minimal boot system with the floppy as the target. Replace the drive letter with the one of your 2.88M floppy. Use the LX parameter to compress the files. bootos2.exe FORMAT:NONE LX TARGET=i: The CONFIG.SYS created by bootos2.exe on the floppy is shown below. PROTSHELL=\OS2\BOS2SHL.EXE SET OS2_SHELL=\OS2\CMD.EXE SET COMSPEC=\OS2\CMD.EXE MEMMAN=NOSWAP,PROTECT CODEPAGE=850 DEVINFO=KBD,GR,\OS2\KEYBOARD.DCP DEVINFO=SCR,EGA,\OS2\VIOTBL.DCP LIBPATH=.;I:\OS2\DLL;I:\OS2\MDOS; SET PATH=I:\OS2;I:\OS2\MDOS SET DPATH=I:\OS2;I:\OS2\MDOS SET PROMPT=[$p] BUFFERS=30 IOPL=YES SET KEYS=ON DISKCACHE=D,LW BASEDEV=IBMKBD.SYS BASEDEV=IBM1FLPY.ADD BASEDEV=IBM1S506.ADD BASEDEV=OS2DASD.DMD BASEDEV=OS2SCSI.DMD <-- Only for SCSI devices BASEDEV=QL510.ADD <-- My SCSI card driver BASEDEV=IBMIDECD.FLT BASEDEV=OS2ASPI.DMD /ALL <-- Generaly not necessary DEVICE=\OS2\TESTCFG.SYS IFS=\OS2\HPFS.IFS /CACHE:64 /AUTOCHECK:DI DEVICE=\OS2\OS2CDROM.DMD /Q IFS=\OS2\CDFS.IFS /Q DEVICE=\OS2\POINTDD.SYS DEVICE=\OS2\MOUSE.SYS

You have to modify this config.sys. First remove the drive letters marked in red. You may also remove any device statements you don't need. In the above example the SCSI stuff may be removed if the CD will be used on a non SCSI system. Add any (BASE)DEVICE statements necessary for the target PC. Make sure a driver for the CD-ROM drive of the target PC is included.

The next change is the important one:

Insert the line BASEDEV=CD_BOOT.FLT /D:2 right after [...] BASEDEV=IBMIDECD.FLT into the config.sys. Don't forget to copy the CD_BOOT.FLT (in the cdboot.zip package) into the \OS2 directory of the floppy!

The config.sys should look something like this afterwards: PROTSHELL=\OS2\BOS2SHL.EXE SET OS2_SHELL=\OS2\CMD.EXE SET COMSPEC=\OS2\CMD.EXE MEMMAN=NOSWAP,PROTECT CODEPAGE=850 DEVINFO=KBD,GR,\OS2\KEYBOARD.DCP DEVINFO=SCR,EGA,\OS2\VIOTBL.DCP LIBPATH=.;\OS2\DLL;\OS2\MDOS; SET PATH=\OS2;\OS2\MDOS SET DPATH=\OS2;\OS2\MDOS SET PROMPT=[$p] BUFFERS=30 IOPL=YES SET KEYS=ON DISKCACHE=D,LW BASEDEV=IBMKBD.SYS BASEDEV=IBM1FLPY.ADD BASEDEV=IBM1S506.ADD BASEDEV=OS2DASD.DMD BASEDEV=IBMIDECD.FLT BASEDEV=CD_BOOT.FLT /D:2 DEVICE=\OS2\TESTCFG.SYS IFS=\OS2\HPFS.IFS /CACHE:64 /AUTOCHECK:DI DEVICE=\OS2\OS2CDROM.DMD /Q IFS=\OS2\CDFS.IFS /Q DEVICE=\OS2\POINTDD.SYS DEVICE=\OS2\MOUSE.SYS

Ok, one last step has to be done. Grab the image from the floppy with your favourite image utility. Warp 4 users may find the program image.exe on the Installation CD in the directory DISKIMGS: image i: OSBOOT.IMG

Copy the image file into the folder containing all the data you want to burn on the CD like disk utilities, fdisk, format, chkdsk etc. Build the CD image using the following command: mkisofs -l -L -J -ocdimage.raw -bOSBOOT.IMG -cboot.cat x:/data The name after the -b option must exactly match the name of the image file. This option is case sensitive!

You may burn this image on CD now. OS/2 boots to a full-screen command window using this CD. Read the documentation coming with bootos2 about the features available with such a system. Since the IBM1S506.ADD is included you have full access to the hard disks of the PC for maintenance.

A basic WPS boot system
You need a 2.88M floppy drive and a hard disk partition without an OS/2 installation for temporary installing a basic OS/2 system.

1. First start bootos2.exe to create a minimal boot system with the floppy as the target. Replace the drive letter with the one of your 2.88M floppy. Use the LX parameter to compress the files. bootos2.exe FORMAT:NONE LX TARGET=i: 2. Install a minimal WPS system using bootos2.exe. You need about 15MB free space on the partition. Use the drive letter of the target partition. bootos2.exe FORMAT:NONE VGA LX TYPE=WPS TARGET=f: The display is set to VGA to make sure the CD works on virtual any system.

3. Copy CD_BOOT.FLT from the cdboot.zip package to the OS2 directory of the floppy.

4. Copy PMDD.SYS to the OS2 directory of the floppy. You find this file in the OS2 directory of the basic WPS system.

5. Copy the config.sys of the basic WPS system to the floppy.

6. Copy VDISK.SYS to the OS2 directory of the basic WPS system. The file is located in the OS2\BOOT directory of any standard OS/2 installation.

7. Now you have to modify the config.sys file of the boot floppy. The file looks like this: PROTSHELL=\OS2\PMSHELL.EXE SET USER_INI=\OS2\BOS2USER.INI SET SYSTEM_INI=\OS2\BOS2SYS.INI SET OS2_SHELL=\OS2\CMD.EXE SET COMSPEC=\OS2\CMD.EXE SET AUTOSTART=PROGRAMS,TASKLIST,FOLDERS,WARPCENTER SET RUNWORKPLACE=\OS2\PMSHELL.EXE DEVICE=\OS2\PMDD.SYS MEMMAN=SWAP,PROTECT SWAPPATH=F:\ 512 LIBPATH=.;F:\OS2\DLL;F:\OS2\MDOS; SET PATH=F:\OS2;F:\OS2\MDOS SET DPATH=F:\OS2;F:\OS2\MDOS SET PROMPT=[$p] BUFFERS=30 IOPL=YES SET KEYS=ON DISKCACHE=D,LW SET HELP=F:\OS2\HELP BASEDEV=IBMKBD.SYS BASEDEV=IBM1FLPY.ADD BASEDEV=IBM1S506.ADD BASEDEV=OS2DASD.DMD BASEDEV=IBMIDECD.FLT DEVICE=\OS2\TESTCFG.SYS IFS=\OS2\HPFS.IFS /CACHE:64 /AUTOCHECK:DF COUNTRY=049,\COUNTRY.SYS DEVICE=\OS2\OS2CDROM.DMD /Q IFS=\OS2\CDFS.IFS /Q /W DEVICE=\OS2\POINTDD.SYS DEVICE=\OS2\MOUSE.SYS CODEPAGE=850,437 DEVINFO=KBD,GR,\OS2\KEYBOARD.DCP DEVINFO=SCR,VGA,\OS2\VIOTBL.DCP SET VIDEO_DEVICES=VIO_VGA SET VIO_VGA=DEVICE(BVHVGA) DEVINFO=SCR,VGA,\OS2\VIOTBL.DCP

Because the WPS system contains way to much data to fit on the boot floppy we move as much files as possible on the CD as described in the section DEVICE drivers on CD. The following line in the config.sys insures the CD drive gets drive letter x: RESERVEDRIVELETTER=W: Modify the config.sys by replacing the drive letters (in this example f:) with the drive letter of the CD drive. Add and modify the statements as shown below. PROTSHELL=x:\OS2\PMSHELL.EXE SET USER_INI=y:\OS2\OS2_y.INI SET SYSTEM_INI=y:\OS2\OS2SYS_y.INI SET OS2_SHELL=x:\OS2\CMD.EXE SET COMSPEC=x:\OS2\CMD.EXE SET AUTOSTART=PROGRAMS,TASKLIST,FOLDERS,WARPCENTER SET RUNWORKPLACE=x:\OS2\pmshell.EXE DEVICE=\OS2\PMDD.SYS <-- Do not add a drive letter here! MEMMAN=SWAP,PROTECT SWAPPATH=y:\ 512 LIBPATH=.;x:\OS2\DLL;x:\OS2\MDOS;\os2;\os2\dll; SET PATH=x:\OS2;x:\OS2\MDOS;\os2;\os2\dll; SET DPATH=x:\OS2;x:\OS2\MDOS;\os2;\os2\dll; RESERVEDRIVELETTER=W: <-- This forces the CD-drive on drive letter x: SET PROMPT=[$p] BUFFERS=30 IOPL=YES SET KEYS=ON DISKCACHE=D,LW SET HELP=x:\OS2\HELP BASEDEV=IBMKBD.SYS BASEDEV=IBM1FLPY.ADD BASEDEV=IBM1S506.ADD BASEDEV=OS2DASD.DMD BASEDEV=IBMIDECD.FLT BASEDEV=CD_BOOT.FLT /D:2 <-- Do not forget this driver DEVICE=\OS2\OS2CDROM.DMD /Q IFS=\OS2\CDFS.IFS /Q DEVICE=\OS2\TESTCFG.SYS IFS=x:\OS2\HPFS.IFS /CACHE:64 /AUTOCHECK:DF COUNTRY=049,\COUNTRY.SYS DEVICE=x:\OS2\POINTDD.SYS DEVICE=x:\OS2\MOUSE.SYS CODEPAGE=850,437 DEVINFO=KBD,GR,\OS2\KEYBOARD.DCP DEVINFO=SCR,VGA,\OS2\VIOTBL.DCP SET VIDEO_DEVICES=VIO_VGA SET VIO_VGA=DEVICE(BVHVGA) DEVINFO=SCR,VGA,\OS2\VIOTBL.DCP DEVICE=X:\OS2\VDISK.SYS 3584,512,512 (This is the driver for a RAM disk which holds the desktop and the *.ini files. The RAM-disk will have the first free drive letter) CALL=X:\OS2\CMD.EXE /C MD Y:\OS2 & COPY X:\OS2\CMD.EXE Y:\OS2 >NUL CALL=X:\OS2\CMD.EXE /C COPY X:\OS2\DLL\BVSCALLS.DLL Y:\OS2\DLL >NUL REM Copy the *.ini files to the RAM-disk CALL=X:\OS2\CMD.EXE /C COPY X:\OS2_y.INI Y:\OS2 >NUL CALL=X:\OS2\CMD.EXE /C COPY X:\OS2SYS_y.INI Y:\OS2 >NUL

Make sure the HPFS.IFS will be loaded after the CDFS.IFS because you need CDFS.IFS to access the CD.

8. The WPS uses *.ini files to store important information. Using the makeini utility coming with OS/2 and ini.rc and inisys.rc located in the OS2 directory of any standard OS/2 installation we build custom ini-files for the CD. To do so replace any occurrence of a drive letter in the *.rc files with the drive letter of the RAM-disk created during CD boot (Y:). This is a quick and dirty hack because most of the program objects located on the WPS will have wrong settings afterwards. To make it the right way step through the files and adapt any setting as necessary. This is beyond the scope of this HowTo. Save the modified files as ini_y.rc and inisys_y.rc. Use the following commands to create the custom ini files: makeini.exe os2_y.ini ini_y.rc

makeini.exe os2sys_y.ini inisys_y.rc The *.ini files are hidden. Use attrib to make them visible. Copy the created files to the directory containing the CD data. The files must be in the root of the CD.

9. Grab the image from the floppy with your favourite image utility. Warp 4 users may find the program image.exe on the Installation CD in the directory DISKIMGS: image i: OSBOOT.IMG Put the image file in the directory containing the CD data.

10. Create the CD image using the following command where x:/data contains the files for the CD and F:\OS2 is the directory created by bootos2.exe when building the basic WPS system. All the data in the F:\OS2 directory will be put in the OS2 directory of the CD preserving the directory structure. mkisofs -l -L -J -ocdimage.raw -bOSBOOT.IMG -cboot.cat x:/dataOS2/=F:/OS2 The name after the -b option must exactly match the name of the image file. This option is case sensitive!

11. You may burn this image on CD now.

Remarks
During boot the standard program objects are created. Because the desktop is on the RAM-disk but the program files are located on the CD most of the settings are wrong. You have to adapt the *.rc files according to your needs.

At the moment it's not possible to create a copy of an installation on CD.

If you choose not to set the display to VGA your CD is probably not usable on other PCs than the one it is created on because of different graphics adapters. The display doctor may be a solution but I haven't tried that.

Swapping is enabled to keep every program happy. But have in mind that you swap on a RAM-disk with limited space. You may extend the disks size but running your favourite office suite while compiling Mozilla will presumably fail...

Remarks on BASEDEV= and DEVICE
Any driver loaded in the config.sys via the BASEDEV= statement must be in the floppy image. Because the filesystem isn't fully setup yet the files must be located in the OS2 directory or the root of the floppy(image).

In contrast drivers specified with DEVICE= are loaded when the filesystem functions are available. So you can put them somewhere on the CD and provide the fully qualified path in the config.sys. This means they are not part of the floppy image but are loadable from the CD after the CD filesystem is loaded by the kernel from the floppy image. This is useful if you have little space on your floppy and must include another BASEDEV driver.

Making room on the floppy
There isn't much space on the boot floppy. This may be a problem if you have to include a lot of BASEDEV drivers. There're some ways to make room for the additional drivers. e.g. SCREEN01.SYS.
 * Remove the file OS2LOGO in the root dir to get about 60kBytes
 * Of course delete unnecessary BASEDEV drivers. For example SCSI stuff if you need no access to SCSI devices. But be careful OS/2 needs some drivers found in OS2 even if they are not listed in the config.sys
 * Move drivers loaded with DEVICE= from the floppy to a directory on the CD. Read below how to do that.

DEVICE drivers on CD
DEVICE drivers may be loaded from any place in the filesystem. To move them on the CD you have to make sure the CD drive letter does not change because of different numbers of hard disk partitions in different PCs. This is important because you provide the full path with drive letter. Insert the following line into the config.sys to make sure your CD drive gets drive letter x: RESERVEDRIVELETTER=W: After doing so you may load any DEVICE driver using a statement like: DEVICE=X:\The_path\MYDRIVER.SYS

(C) Chris Wohlgemuth 2000