bootAble

Hayo Baan
version 3.1a 10/03/2004

Contents

1. Introduction
2. Highlights
3. Installation
3.1 BootAble files
3.2 Other files and applications
4. Syntax
5. Creating a bootable CD
5.1 Using cdrecord+mkisofs instead of RSJ
6. Creating a maintenance partition
7. Debugging
7.1 Test runs
7.2 Errors generated by the script
7.3 Check config.sys file
8. Contact information
9. Thanks
Version History

1. Introduction

BootAble is an OS/2/eCS script to create a maintenance partition or a bootable CD. This partition/CD supports enough facilities to fully manage and recover your system.
Personally I use it on the CD-RWs I burn my system backups to. Recovering/reinstalling my system just takes booting-off this CD, optionally managing and formatting volumes and unzipping the backup-zip files that are also on the CD.

2. Highlights

A few highlights of the script:

Default settings for file system and driver support are mostly retrieved from the current system (in case of SCSI, you will need to tell bootAble the drivers to use). Adapting these defaults is done by creating a configuration file with the necessary settings.
When creating a bootable CD, the script assumes you use RSJ for burning CDs and that you have already attached the CD-R(W). Instructions for using this script with cdrecord and mkisosofs are included.

3. Installation

The simplest way to install bootAble is is to copy all files from the bootAble archive to directory on the PATH or a specific directory (if you use a specific directory, just make sure you run bootAble from that location).
To locate files, bootAble first looks at the specified location (or current directory if no path is given), if the specified file is not found, bootAble searches the paths as specified in the SEARCHPATH setting. By default the SEARCHPATH is made up of \os2\boot on the boot drive, followed by the LIBPATH, PATH, DPATH, HELP, BOOKSHELF, and \psfonts on the boot drive. Note: When specifying files with wildcards, the SEARCHPATH is not searched.

3.1. bootAble Files

Main Files
bootAble.cmd The script to create a bootAble CD or maintenance partition PATH
bootAble.ico Icon file
-
bootAble.cfg Defaults for configuration options/variables SEARCHPATH
bootAble.html These instructions -
bootAble.lvmgui.ico
Icon file for the "lvmgui" command
SEARCHPATH
bootAble.lvmrefresh.ico
Icon file for the "Refresh removable media" command SEARCHPATH
bootAble.Src System ini template (WPS) SEARCHPATH
bootAble.Urc User ini template (WPS) SEARCHPATH
Configuration Files
bootAble.4os2 Configuration file for adding the 4OS/2 command shell environment SEARCHPATH
bootAble.acrobat Configuration file for adding Acrobat Reader v3
SEARCHPATH
bootAble.dfsee
Configuration file for adding dfsee
SEARCHPATH
bootAble.dfseeRC
User ini settings for dfsee
SEARCHPATH
bootAble.emxrt Configuration file for adding the EMX runtime (contributed by Christoph Brendes) SEARCHPATH
bootAble.extra
Configuration file for adding some extra OS/2 utilities SEARCHPATH
bootAble.norman Configuration file for adding Norman Anti Virus support (contributed by Doug Bissett) SEARCHPATH
bootAble.normanRC
User ini settings for Norman Anti Virus support
SEARCHPATH
bootAble.pmdll Configuration file for adding PMdll, a tool to report DLL dependencies of executables SEARCHPATH
bootAble.pmview Configuration file for adding PMView SEARCHPATH
bootAble.pmviewRC User ini settings for PMView
SEARCHPATH
bootAble.ttf Configuration file for adding TrueType and UniFont support (preliminary support)
SEARCHPATH
bootAble.usbres
Configuration file for adding the USB resource tool
SEARCHPATH
bootAble.xwp
Configuration file for adding XWorkplace support
SEARCHPATH
bootAble.wxpRC User ini settings for XWorkplace support SEARCHPATH
bootAble.xwp_<LANG>
Configuration files for XWorkplace NLS versions, currently German (DE) and Spanish (ES, partially) are provided
SEARCHPATH
Sample Configuration files Files
bootAble.maintenance Sample configuration file for creating a maintenance partition SEARCHPATH
bootAble.myCfg Sample configuration file can be used as starting point for creating your own specific settings SEARCHPATH
bootAble.testCD Sample configuration file for testing the burning of a CD SEARCHPATH
bootAble.wps Sample configuration file for creating a WPS bootAble CD/maintenance partition SEARCHPATH

3.4. Other files and applications

Required files
OS/2 Warp or eCS
The base OS and files.
Installed IBM/eComStation
Required files when creating bootAble CDs
CD Recorder Software Either cdrecord+mkisofs or RSJ can be used. Installed Hobbes/RSJ
Required file when creating bootAble CDs using the 'no floppy emulation' method
Veit Kannegiesers no floppy emulation boot When creating a no floppy emulation boot method, you'll need to have the base memdisk files.
Note: This version of bootAble has been tested with the 14/2/2004 release of the memdisk tool, currently to be found in the test directory on Veit Kannegieser's homepage (arj archives) or on my website (zip files).
SEARCHPATH
Veit Kannegieser/
zip-files
tar, loaddll, and untar
In case you enable unicode or hpfs386 support, or decide to add files to the boot image instead of the CD, you'll furthermore need the tar command and Veit Kannegieser's loaddll and untar. SEARCHPATH
Veit Kannegieser/
zip-files
Hobbes
Required file when creating bootAble CDs using the 'floppy emulation' method
Virtual floppy Either vfdisk or super virtual disk can be used. A virtual floppy disk of 2.88MB should be inserted. Installed Hobbes/BMT-Micro
daniboot.flt Required file for enabling CD-Boot. SEARCHPATH Hobbes
savedskf.exe Command to create a floppy-disk image file. SEARCHPATH Hobbes
Optional Files (device drivers)
daniatap.flt or daniatapi.flt
Enhanced ATAPI driver developed by Daniela Engert. SEARCHPATH Hobbes
danin512.flt or n512dasd.flt
Non-512 bytes/sector removable media support driver. Either Daniela Engert's or Alexander Terekhov's driver can be used. When both drivers are present, Daniela's is used. SEARCHPATH Hobbes
danis506.add
Enhanced IDE driver developed by Daniela Engert. SEARCHPATH Hobbes
ibmrscsi.flt
Removable SCSI devices geometry filter driver. SEARCHPATH eComStation
jjscdrom.dmd
Enhanced CDROM driver developed by Takayuki 'January June' Suwa. SEARCHPATH Hobbes
Optional Files (file systems)
FAT32
Fat32 files system driver developed by Henk Kelder. SEARCHPATH Hobbes
HPFS386
HPFS386 file system driver (Warp server). SEARCHPATH IBM
NTFS NTFS file system driver (eCS 1.1)
SEARCHPATH eComStation
Ramdisk Ramdisk support files ramdisk.exe and ramdisk.ifs
(Required for a WPS enabled CD when not using the MEMDISK option).
SEARCHPATH Hobbes
Optional Files (programs and other files)
LXLITE Compresses files (.exe, .dll, .fon, etc.) before writing, thus saving extra space. SEARCHPATH Hobbes
Roman Stangl's CDBoot menu Adds a boot menu to a bootable CD.
Note: When using RSJ, make sure to specify explicitly where the cdboot command can be found with the CDBOOTMENUFILE option!
SEARCHPATH Hobbes
Optional Files (other files)
bos2rexx.exe Required file when adding REXX support to a command-line boot. This file can be found in the bootOS2 package. SEARCHPATH Hobbes
keyboard.dcp/viotbl.dcp Smaller keyboard.dcp and viotbl.dcp files to save extra space on the boot image, can be found on disk 2 of the WARP 4 installation disks.If you want to use these, simply copy them to a directory on the SEARCHPATH before the original (you'll need to renam vtbl850.dcp to viotbl.dcp as well). SEARCHPATH IBM
SIO2K Patch
Patch file for the problem where on reboot you get a trap in the UART or SIO driver when using the SIO2K driver. This patch simply prevents the trapping function to be called at reboot. This patch is provided with eCS 1.1. The author, Veit Kannegieser (thank you), has however made it available for everyone interested. A zip-file can be downloaded from my website (you only need the unbhsio.sys file from the archive).
SEARCHPATH eComStation/zip-file

4. Syntax

The command syntax is as follows:

bootAble [/v <verbose>] [<configuration file>|/@<configuration-list-file>...]

The optional arguments are the verbosity level and one or more configuration files. These configuration files are used to override the defaults as specified in the file bootAble.cfg. The special form /@configuration-list-file causes the content of the configuration list fileto be used to list additional configuration files. E.g. if the file myCfg.lst contains the lines

bootAble.emxrt
bootAble.4os2
bootAble.extra

The command

bootAble /v 3 bootAble.myCfg myCfg.lst bootAble.wps

would have exactly the same result as

bootAble /v 3 bootAble.myCfg bootAble.emxrt bootAble.4os2 bootAble.extra bootAble.wps

Note: Configuration files as well as configuration list files are searched for on the SEARCHPATH (by default os2\boot on the boot drive followed by LIBPATH, PATH, DPATH, HELP, and BOOKSHELF).
Note: You only need to specify configuration options/variables which override the defaults!

5. Creating a bootable CD

Here are a few easy steps for creating a bootable CD (please also see Debugging for some debugging info and tips):

  1. Download and install all required files;
  2. Read through the configuration file bootAble.cfg. All default settings for the script are done via this file. The options are all commented. Work through them top to bottom, most likely you will only need/want to change a few of the 'basic' ones. You'll probably not going to neet to bother with the 'advanced' ones (unless you know what you are doing...);
    Please note: When configuring bootAble you can/should leave the generic defaults file bootAble.cfg alone and create your own configuration file(s). A configuration file only needs to contain lines for configuration options/variables overriding the defaults! See for example the supplied configurations files bootAble.wps, bootAble.maintenance, etc.
  3. Create a bootAble.myCfg where you change the default options to match your needs (an example .myCfg as well as other example configuration files are included):
    1. You probably need to change directories/drives to match your setup;
    2. You probably want to specify BOOTMESSAGES='YES', and PAUSEBEFOREBOOTIMAGE='YES' (already done in the sample bootAble.myCfg);
    3. You probably also want to specify ADDITIONALCFG='' as the default will cause the screen to go to 80x50 mode, causing you to loose all boot progress messages (already done in the sample bootAble.myCfg)
    4. If you have SCSI, set the SCSI option and specify the device driver for your card(s). You may need to set the TWODISKBOOT option, make use of the MEMDISK boot method or turn-off some other options if the driver(s) is/are a realy big;
  4. This should cover most cases, time to create the first boot image (instructions are for using RSJ, see below for necessary adoptations for using cdrecord/mkisofs):
    1. Insert an empty CD-R(W) in your burner. I would really suggest to use CD-RW media; you are probably going to run this script a lot of times to get things the way you want. I know CD-Rs are dirt cheap, but please give the environment a break and what would you do with tons of coasters? (Yeah, you can microwave them for great effects but that becomes boring after a while...);
    2. Attach the CD-R(W) (cdattach w:). If it's a CD-RW you can erase it as well (cdwfmt w: /erase);
    3. Run the script with your configuration file, specifying an adequate verbose level (e.g., bootAble /v 67 bootAble.myCfg);
    4. Put additional files on the CD if you like;
    5. Burn the CD (cdattach w: -s);
  5. Test it.

That's all! Now you probably want to play a bit with the numerous other options :-)

5.1 Using cdrecord+mkisofs instead of RSJ

When using cdrecord and mkisofs, change the configuration variable WRITERDRIVE to the path you are going to build the CD in and set the option CDRECORD to 'YES'. The script is now ready to be used for cdrecord/mkisofs. Just one more thing needs to be done after running the script; instead of creating a normal ISO image for burning by cdrecord, you need to specify the correct image file to be used for booting (-b option to mkisofs). For normal floppy emulation booting, this is the OSBOOT.IMG in the root of the CD, for MEMDISK bootAble CDs, this is the CDLOADER.BIN in the BOOTIMGS directory (don't forget the -no-emul-boot option!). Remember that mkisofs is case sensitive so use the correct case when specifying filenames.
You can also let bootAble create a command file which contains the necessary mkisofs and cdrecord commands, simply specify CDRECORDBURNCMD='YES' and tweak the command options and file locations (CDRECORDMKISOFSEXE, CDRECORDMKISOFSOPTIONS, CDRECORDEXE, and CDRECORDEXEOPTIONS). The burnCD command is created in the current directory, burnCD creates the iso image in the TEMP directory, so make sure there is enough room.

6. Creating a maintenance partition

When creating a maintenance partition, follow the instructions found in the section describing the creation of a bootable CD (skip the specific steps involving CD creation; 4a, 4b, and 4c). When adapting the configuration file, additionally specify CREATEBOOTCD='NO' and point WRITERDRIVE to the maintenance partition (see bootAble.maintenance for an example); and run the script with these additional settings (e.g., bootAble bootAble.myCfg bootAble.maintenance).
Though it is advisable to format the maintenance partition (creating files like the config.sys may not work correctly otherwise), this is not the default behaviour of bootAble.This is done to prevent accidental data loss of the maintenance partition.With FORMATMAINTENANCE='NO', the user is asked a question to format the maintenance partition. Ifyou do not want to get this question, specify FORMATMAINTENANCE='YES' in your bootAble.myCfg.

7. Debugging

7.1 Test runs

As creating a bootAble CD (or maintenance partition) usually involves some trial and error, it is best you try things out before ruining your next CD-R with a useless installation. Of course, using a CD-RW already stops this waste, but I suggest to even go further and first make a few test runs on your harddisk. To do this, simply include (a modified version of) bootAble.testCD on the command-line. E.g., bootAble /v 67 bootAble.wps bootAble.myCfg bootAble.testCD.

7.2 Errors generated by the script

Allthough I have tried to make the script run perfectly in all situations, it is likely your first try of the script will fail with some error. To help find the cause, the script knows various debug levels (VERBOSE setting or /v command-line option). The following debug levels are currently supported:
Bit Value Generated Output
1 Progress messages
2 Files copied & Files parsed
4 Config file parsing
8
INI rc file parsing
64 Error output of external commands
128 All external command output
The debug level is specified as a bitmask, this means you have to add the various bitvalues to get the script to output a combination of debug information. A few examples:
For your first runs I suggest to set your debug level to 67 as this usually gives a good indication of the cause in case of error.

The bootAble script uses the REXX interpreter to process thevarious lines in the configuration files. This means that whenever there is a (syntax) error in a configuration file, bootAble will fail with a REXX error. Locating the source of this error, however, is not always a straigth forward matter as relevant information is usually missing. To help debug these errors, specify debug level 4; this shows you all processed configuration file lines and this should give you the exact location of the error. As this generates lots of output, I suggest you do not specify this by default.
Note: the VERBOSE setting in a configuration file only becomes active after the corresponding configuration file has been read. Especially if you are having configuration file problems, it may be advisable to specify the verbosity level with the /v command-line option (e.g., bootAble /V 71 bootAble.wps bootAble.myCfg bootAble.testCD).

7.3 Check config.sys file

If all goes well and the script finished without any error messages, check the created config.sys file. The config,sys can be found on the boot image, which is created on yor virtual drive. If, however, you are using the TWODISKBOOT option, the virtual drive will contain a the second boot image and does not contain your config.sys anymore. To still check the created file you can do two things: either use the COPYCONFIGSYS to place a copy of config.sys in the root of the CD (or in the directory where the CD is created), or use PAUSEBEFOREBOOTIMAGE to interrupt the creation process and make a manual copy of the file.
If you are not happy with the resulting config.sys, add/remove options in your bootAble.myCfg.
Once you have verified the correctness of the config.sys you are ready to create a real bootAble CDs (or maintenance partition) and test its working.

8. Contact information

Hayo Baan: mailto:hrbaan@xs4all.nl, http://www.xs4all.nl/~hrbaan
IBM: http://www.ibm.com
eComStation: http://www.ecomstation.com
RSJ: http://www.rsj.de
Hobbes: http://hobbes.nmsu.edu
BMT-Micro: http://www.bmtmicro.com

9. Thanks

Thanks go to Allan Dermody for providing CD_BOOT.FLT and the first insight into creating bootable CDs;
Thanks also go to Alfredo Fernández Díaz for providing lots of feedback and for writing an excelent article on how to create a bootable CD in OS2Voice, July 2000;
Thanks go to Veit Kannegieser for all his work, especially the no floppy boot support;
More thanks go to Daniela Engert for writing the DANI suite of device drivers and filters;
Many thanks go to Simon Wright who helped me get my DHCP and DDNS server up and running.

Finaly big thanks also go to all you people testing and commenting the script; because of you I kept working on it  ;-)


Version History

v3.1a (10/03/2004)

v3.1 (09/03/2004)

v3.0a (23/02/2004)

v3.0 (22/02/2004)

v2.19 (25/01/2004)

v2.18 (23/12/2003)

v2.17a (21/12/2003)

v2.17 (19/12/2003)

v2.16 (09/07/2003)

v2.15 (16/03/2003)

v2.14 (12/01/2003)

v2.13 (15/11/2002)

v2.12 (20/10/2002)

v2.11 (30/09/2002)

v2.10 (29/09/2002)

v2.9 (24/09/2002)

v2.8 (23/09/2002)

v2.7 (22/09/2002)

v2.6 (17/09/2002)

v2.5 (13/09/2002)

v2.4 (04/09/2002)

v2.3 (02/09/2002)

v2.2 (01/09/2002)

v2.1 (01/09/2002)

v2.0 (01/09/2002)

v1.4 (23/08/2002)

v1.3 (22/08/2002)

v1.2 (20/08/2002)

v1.1 (21/02/2002)

v1.0 (16/02/2002)