IOPATCH v1.4, (c)1999 by Gary Tong, g.t@mailcity.com

This program will patch IO.SYS on either a Windows 95 OSR2 or a Windows 98
(i.e. MS-DOS 7.1 FAT32) bootable floppy for use as a boot image on bootable
CD-ROMs.


* So what's the point?

When booting from a CD-ROM, your boot image must load a CD-ROM driver in order
to be able to read any files on the portion of the CD beyond the boot image.
This is typically done by loading a DOS CD-ROM driver in your boot image's
CONFIG.SYS file like this:

   DEVICE=CDROM.SYS /D:MSCD000

The problem is that loading the CD-ROM driver resets the drive, and some
CD-ROM drives take several seconds to reset, during which time your booting 
CD is unreadable.  Therefore, when CONFIG.SYS tries to load any additional
device drivers and your command-line interpreter shell, such as COMMAND.COM,
it can't find them and you get an error message like:

   The following file is missing or corrupted:...

Needless to say, your CD doesn't completely boot.


* How does this patch work?

==> IOPATCH modifies your MS-DOS 7.1 bootable floppy's IO.SYS so that the boot
process will wait until the disk is readable before loading each device driver
and before loading the command-line interpreter shell. <==

Please make sure your floppy boots correctly before applying this patch.

IOPATCH also modifies the first line of text displayed when the disk boots to
remind you that you are using a customized version of IO.SYS.  For example, if
the first line of text you see when booting your floppy before applying the
patch is this:

   Starting Windows 98...

This is what you will see after applying the patch:

   FAT32 CD-ROM Boot...


* How do I install and run IOPATCH?

To install, simply unzip the archive file into any convenient directory.

IOPATCH will run in a Windows DOS box, or can be run in DOS directly.  It
requires the DOS command ATTRIB.EXE to alter IO.SYS's file attributes during
the patching process.  If IOPATCH gives you a "Bad command or file name" error
message, you don't have ATTRIB.EXE in your PATH.

IOPATCH will only modify the IO.SYS file on either your A: or B: drive.


* Why will it patch only an MS-DOS 7.1 boot floppy?

I wanted to be able to boot a CD capable of accessing FAT32 hard drives.
Needless to say, I was a bit peeved after spending countless hours trying to 
make bootable CDs that weren't.  So I decided to learn a little assembly code
and trace the boot process to determine the real cause of the problem.  I've
tested this patch on boot floppies made by U.S. as well as some non-U.S.
versions of Windows 95 OSR2, Windows 98, and Windows 98 SE, and so far it has
worked well.


* Okay, I've patched a boot disk.  The size of the IO.SYS file hasn't changed,
  so how can I tell the difference between a patched and a standard IO.SYS?

Just run IOPATCH again.  If it tells you that "IO.SYS appears to be an MS-DOS
7.1 original," then your IO.SYS has not been patched, and you will be asked
whether or not you wish to apply the patch.  If your IO.SYS has already been
patched, IOPATCH will simply tell you so, then exit.

IOPATCH also updates IO.SYS's date/time stamp.  To check this, either use the
Windows Explorer or in DOS type the command:

   DIR /A A:\IO.SYS

Another way to tell is to boot your floppy.  If one of the first messages you
see is "FAT32 CD-ROM Boot...," then it's been patched.

A more subtle way to tell the difference is to press the F8 key while booting
your floppy.  This launches a DOS bootup menu whose title is normally
underlined.  If the title is not underlined, then that disk has been patched.


* I've accidentally formatted my hard drive after booting a patched floppy.
  Is this going to cause any problems?

In general, no.  A patched IO.SYS works by trapping out any of those "The
following file is missing or corrupted" error messages that may be generated
during the boot process.  If either your CONFIG.SYS or AUTOEXEC.BAT is indeed
trying to load a missing or corrupted file, a patched IO.SYS will cause your
boot process to hang (because it will repeatedly try to read the file - which
is what it's supposed to do) instead of giving you the error message.  Either
way, your computer is not booting completely anyway.

The easiest way to restore a standard IO.SYS to a hard or floppy disk, is to
boot a non-patched disk and use the DOS SYS command or reformat the disk.


* IOPATCH refuses to patch my boot floppy.  What can I do?

Make sure that you have the DOS function ATTRIB.EXE somewhere in your system's
PATH.  It is needed to manipulate IO.SYS's file attributes during patching.
You may need to edit the PATH statement in your AUTOEXEC.BAT file.

If IOPATCH gives you a message saying "FAT32 support not detected," then your
floppy is not MS-DOS 7.1-compatible and is not supported by IOPATCH.

Point your web browser to http://www.bootdisk.com and download one of their
Windows 95 OSR2 or Windows 98 boot disks.  They are all U.S. versions, and
IOPATCH should work fine on them.


* Okay, I've used IOPATCH to successfully modify a boot floppy, which I then
  used to make a bootable CD, but the CD still doesn't boot correctly.  What
  else could be wrong?

Double check that your boot floppy itself boots correctly before burning the
CD.  Remember, Garbage In = Garbage Out.

Use a binary file/directory comparison program like WINDIFF to verify that you
got a good CD burn.

Adaptec's Easy CD Creator contains a bug which causes it to truncate the boot
floppy image file, BOOTIMG.BIN, that it creates in the CD layout when you tell
it to make a bootable CD.  This can corrupt the last files copied from a
nearly-full boot floppy.  I don't know if other CD burning apps have this bug
or whether Adaptec has fixed it in EZCD v4, but there are some workarounds:

Minimize the space you use on the boot floppy.  I put only the DOS system
files and CD-ROM driver on the boot floppy - just enough to get the CD booted,
then I have AUTOEXEC.BAT jump to some startup program on the CD.

Use a separate program to create the boot floppy image file.  Most people use
WinImage.  Personally I prefer Oliver Fromme's DOS freeware app, HD-COPY.
Start HD-COPY with the "/I-" option so as not to compress saved image files.
Another trick I employ here is to use a hex editor to intentionally truncate
the UNUSED sectors from the end of the boot floppy image file.  This frees up
some extra space on your CD and doesn't cause any problems since your CD won't
be trying to read/write the unused boot floppy image space anyway.  Look for
the dots representing disk tracks in HD-COPY to give you an idea of where the
occupied space on your floppy ends.

If you really need more space in your boot image file, you can format a floppy
to hold more than the standard 1.44MB (again, HD-COPY is good at this), or you
can use a bootable hard drive partition.  WARNING:  If you format a floppy
to hold more than 18 sectors/track, you will need to intentionally fragment
IO.SYS so that it occupies only the first 18 sectors of the first tracks on
the floppy to make the disk bootable.


* Where can I find the latest version of IOPATCH?

IOPATCH has been uploaded to the /pub/simtelnet/msdos/cdrom directory of
SimtelNet and their mirror sites, available worldwide.

TC Tsai has been kind enough to post IOPATCH on his "How to Make a PC Bootable
CD" website at http://nikko.simplenet.com/goldentime/bootcd.htm
New versions may appear here before they make their way around SimtelNet.

If all else fails, try FTP Search at
http://ftpsearch.lycos.com/cgi-bin/search?l&query=iopat+.zip


* How much does IOPATCH cost, and what kind of support comes with it?

IOPATCH is freeware - that is, feel free to make copies of it and pass them
along to anyone who might benefit from its use.  I ask only that you keep the
original archive file intact so that it contains both the IOPATCH executable
and this README file.

Keep in mind that this is something I hacked together in my spare time to cure
a problem that was annoying for me, so there are no guarantees and don't
expect any 24/7 tech support for it :-).  If making a bootable CD was such a
PITA for me, then it probably is for other people too, so I'm releasing this
patch in the hopes that somebody else may find it useful as well.

If you really like IOPATCH, or if you find any bugs with it, I'd be curious to
get your feedback, so feel free to e-mail me your rants and raves.

Hope you find this helpful.

Cheers,
Gary Tong
g.t@mailcity.com


--- VERSION HISTORY ---

v1.1 = First public release, designed to patch the U.S. versions of IO.SYS
   from Windows 95 OSR2 and Windows 98 SE.

v1.2 = Rewrote the patching algorithm to make its operation more generic.
   That is, it should now be able to patch International versions of MS-DOS
   7.1 FAT32 IO.SYS in addition to the U.S. versions.

v1.3 = Further improved the support for patching International versions of
   IO.SYS.  Added the option of patching IO.SYS on the B: drive.  Added a
   reminder to label patched disks to avoid confusion with standard boot
   disks.  Changed the displayed bootup text to "FAT32 CD-ROM Boot..."

v1.4 = Added a dialog to tell the user whether or not IO.SYS has already been
   patched, then asks for confirmation before actually applying the patch.
