HPFSRem -- HPFS removability software Documentation

HPFSRem -- HPFS removability software Version 1.11 Documentation update (96/10/13) Copyright (c) 1996 by Jeff Jackowski

This software is free

Introduction
HPFSRem allows you to use HPFS on some removable drives without losing the ability to remove and replace disks. Although HPFS without any special software can sometimes be used on a removable drive without any problems, I found that often system crashes will be the result and data can be lost. HPFSRem is my attempt to eliminate data loss and system crashes from using HPFS formatted removable media. I can't guarantee HPFSRem will let you use HPFS with any drive, but it works for me and several other people with varying drives. You should test your drive with HPFSRem to see if it works before using HPFS on removable disks on a large scale. Please email me at jackowskij@email.uah.edu to tell me what works and what doesn't. Also, visit the web site at http://www.cs.uah.edu/cs/students/jjackows/hpfsrem. If its not there, search for it on Yahoo. And PLEASE be sure to send the output of HPFSRem with the "S" parameter and any error codes if you're having a problem.

PLEASE READ THIS DOCUMENT CAREFULLY! HPFS was not made to support removable drives. HPFSRem attempts to circumvent this limitation and will work if my directions are followed and your removable drive cooperates. Any deviation from my instructions may cause various problems ranging from an inability to use HPFS on removable media to system crashes when a disk formatted with HPFS is removed or inserted. Also, any emails I get with questions that have answers in this text may not receive a response.

NOTE TO EXPERTS: You may skip the "Disk setup" section, but should read the rest, paying close attention to the "FYI" and "Known problems and limitations" sections.

System Requirements
NOTE: Contrary to SyQuest documentation, partitioned removable disks can be used if OS/2 boots from a logical partition (so you can put OS/2 on drive D and DOS on drive C, for instance). The removable disks should be given a logical, not primary, partition to make this work.
 * OS/2 Warp (version 2.x may work, but I'm not sure)
 * HPFS must be installed
 * EMX 0.9a or later installed
 * A removable drive (see "Compatible Drives" and "Drive Requirements" sections below)

Web Site
http://www.cincyteamos2.org/hpfsrem/ - Listed on Yahoo

The site contains updated information on HPFSRem including: The web site is meant to be an addendum to this document, not a total replacement.
 * A list of compatible drives
 * Instructions on making the drives work
 * Links to device drivers
 * The latest version of HPFSRem

Compatible Drives
The following drives have been tested by myself and other users. Other drives may work as well. SCSI controller note: The Iomega drivers use a neat trick to allow the disks to be formatted with HPFS. Controllers other than the ones that Iomega sells may have to use different drivers, which means no HPFS.
 * Iomega Zip works with the OAD drivers and works. FLT drivers may also work. Follow the instructions included with the drivers to format the disks with HPFS, then use HPFSRem.
 * Iomega Jaz has not been made to work, possibly because of SCSI controller problems.
 * SyQuest's EZ135 and SQ3270 have been tested and work.
 * SyQuest's EZFlyer and SyJET probably work because they use the same drivers as the EZ135.
 * A PD drive manufactured by Matsushita Electronic for Panasonic and Toray (650MB PHASEWRITER DUAL). It may require SyQuest drivers to eject, along with its own drivers.

Drive Requirements
SHORT: The drive should be non-removable (from OS/2's point of view) or removable and lockable. Plus, you'll need to format the disk with HPFS.

LONG: To use HPFS with a given drive, you need to able able to format the disk with HPFS (consult documentation below and the documentation that came with the drive). This sometimes requires that you lock the disk in the drive. Use HPFSRem with the "I" parameter to lock the disk. Some drives will lock automatically. If the drive won't unlock, then the drive won't let you remove the disk.

Error messages (New info for v1.1)
HPFSRem v1 would sometimes give error messages that did not stop it from doing its task. I think it mostly has to do with support for locking and unlocking the disk, which was required in v1 to run without errors. I have made v1.1 to better handle the lack of support for locking and unlocking, and to support removable drives that OS/2 sees as non-removable drives.

In addition, HPFSRem v1.1 gives error code values that, while not always self-explanatory, should help me to figure out what's wrong.

Installation
First, install EMX if you haven't already. You can find the file you need at ftp://hobbes.nmsu.edu or ftp://cdrom.com.

The directory to look for is EMX???, where the ??? mark the version number, such as 09a and 09b. The file is EMXRT.ZIP. It contains installation instructions for itself.

Copy HPFSRem.exe to a directory in your path.

Instructions
The syntax of HPFSRem is: HPFSRem d [R | I | RI | S]
 * d:is the drive letter of the removable drive.
 * R:tells HPFSRem to prepare the disk for removal. If the disk is locked (drive won't allow the disk to be ejected), then HPFSRem will unlock it.
 * I:tells HPFSRem to allow the insertion of a disk. You will be prompted to insert a disk. The disk will be locked in the drive until the "R" parameter is given.
 * RI:a combination of the separate "R" and "I" parameters, tells HPFSRem to prepare a disk for removal and then allow another disk to be inserted.
 * S:will make HPFSRem give you information about the drive you specify. This information includes whether OS/2 sees the drive a removable or not, if the drive is locked, can be locked, or won't tell, and HPFSRem's assessment of the possibility of using HPFS removability on the drive.

PLEASE give me this information along with bug reports!

Type "hpfsrem" and enter to receive a help screen.

Disk setup
NOTE: The following procedure only works for removable drives that support partitions, like SyQuest drives. Although the below text says otherwise (I haven't revised it), HPFSRem can be used on drives that do not support partitions so long as its disks can be formatted with HPFS. Follow the instructions included with your drive to do this. Then you can use HPFSRem.

To make use of this utility, you must format some of your removable disks with HPFS. To do this, you must first partition your disk using FDISK. You can run FDISK from the command line, or select "Create partition" from the menu of the Drives object.

If you are preparing several disks, it is fastest to boot the system to the command line by pressing Alt-F1 before the OS/2 logo is displayed and then pressing "C" for the command line. This is because you will have to reboot every time you set up a partition. HPFSRem can be used to unlock the disk so that you can remove it without having to boot to the WPS. Once you're running FDISK, select the correct disk for your removable drive. FDISK starts with disk 1 (first physical disk) selected. Disk 1 is normally a hard drive -- you will probably need to select disk 2 or higher. If you can't find the removable drive on FDISK's drive list, then you can't use HPFSRem :(.

Next, delete any existing partitions on the removable disk. Of course, you should backup any data that may be on the disk if you want to keep it. After that, create a partition on your removable disk that is the full size of the disk. The default partition size FDISK will present is the total remaining space on the disk. Make the partition an extended/logical partition. Then quit FDISK. A reboot is required by the system at this point.

After rebooting, you will need to format the disk. Go to the menu of the removable drive in the Drives folder and select format. Tell the format program to use HPFS. Or, you can use the format command from the command line with the "/fs:hpfs" parameter.

FYI
HPFSRem only needs to be used when a disk being removed or inserted has been formatted with HPFS. When only disks formatted with FAT are involved, the methods supplied with your removable drive may be used.

Before you shutdown the system, you may need either an HPFS disk in your removable drive or have used a FAT disk in the drive last. The FAT disk needs to be used in some way (typing "dir" at the command line is good enough) and may be removed before shutdown. Failure to meet these conditions may prevent a proper shutdown of the system if you booted the system with a FAT disk in the removable drive. Booting with an HPFS disk seems to prevent this problem.

It is best to partition removable disks with a logical, not primary, partition weather or not HPFS will be used on the disk. If OS/2 is booted from a logical partition, then attempting to use a removable disk with a primary partition will cause the system to crash. Partitioning the disks with a logical partition avoids this problem and works fine with systems that boot OS/2 from a primary partition. If you use a SyQuest drive, the DOS/Windows drivers will have no trouble using logical partitions.

Before a disk can be removed, all programs must stop using files on the disk. If a program has a file open on the removable disk, HPFSRem will give an error and will not unlock the disk. Also, it is a good idea to close all views of the files and directories on the disk before removing it.

OS/2 uses a feature called lazywrite that buffers data to be written to a disk to improve performance. HPFSRem always makes certain that all data to be written to the removable disk is written before removal.

Known problems and limitations
If you copy files with long names to a removable HPFS disk using the WPS (drag & drop), the result may be interesting. Although folder views of the directory on the HPFS removable will have long names, the files on the removable disk may not have long names. If you type "dir" at a command prompt, and find that the long names of the files are not in the directory, then you have this problem.

One way around this problem seems to be to put an HPFS formatted disk in the removable drive before booting OS/2. Then, all files copied to the disk from the WPS will retain their long names.

Another work around is to use the command line. A copy command issued from the WPS will convert the long names of files to names suitable for FAT volume. However, if you copy files from the command line, the long names will be preserved. Note that from the command line you cannot copy a file with a long name to a FAT volume.

This program does not allow the use of HPFS on floppies. This is because HPFS can only be put on partitioned disks. Floppies cannot be partitioned. This is a limitation of OS/2, but so is not supporting HPFS on removable disks:-).

HPFSRem supports only a single partition on removable disks. Multiple partitions on a removable disk will cause problems.

Occasionally, the system may not complete a shutdown properly. This sometimes seems to be in connection with a drive not ready error from the removable drive. The cause of the error is trying to read from the drive when no disk is in it. Avoid this error. Also, limiting yourself to using the "RI" parameter for HPFSRem and using HPFSRem when any disk is being inserted or removed, not just HPFS disks, may help solve the problem.

If data loss occurs when removing FAT disks from the drive, use HPFSRem to remove FAT disks as well as HPFS disks. The data loss may come from using lazywrites on the disk. The lazywrite feature will cache writes to the disk, so some data to be written may be held in buffers when a disk is removed. HPFSRem will make OS/2 write the contents of the buffers to the disk, so no data loss will occur from caching writes to the disk.

Labels
To help me keep track of what I put on my removable disks, I made a simple disk label template for use with IBM Works. The label, included in this package, is made for EZ135 disks, but could be altered for use with other disks. To make use of the label, load it with IBM Works and save it with a different name. You can change the "Spine Description" by double clicking your mouse on it. You'll be presented with a dialog where you you can change the text and its orientation. Be sure that the bottom right icon on this dialog is pressed or the text won't be vertical anymore.

There are two tables on the left and right sides of the label. You can type text into these tables. If you press tab at the end of the table, you'll get another row and a horizontal line to go with it. This can't be undone without deleting and remaking the table. Its not my fault - IBM Works needs some work. You can also add a vertical line to the table to separate some of the rows into columns. The vertical line doesn't have to divide all the rows. Also, it seems that only one vertical line can be used. If you add a third, no text will be displayed to the right of the line. Before you print the label, you may have to go to the printer setup dialog and tell your printer to print landscape style. I don't know why this is necessary, as IBM Works has been told to use landscape style for the label. It might be because I'm using OMNI.DRV to run my printer. Next, tell IBM Works to print only the first page, or you'll get an empty page at the end. Finally, cut along the outer lines and put the printed label in place of the blue label shipped with disk.

Future possibilities
Documentation in HTML (anyone got space on a web server I could use for this?) An install program that adds a menu option to the object of the removable drive for HPFSRem (way in the future)

Registration
HPFSRem may be employed for personal use at no charge. For commercial use, HPFSRem may be used for a 30 day trial period. For continued use beyond the 30 day trial period, it must be registered.

To register, send a check for $20 (in US currency, or discuss other possibilities with me) made out to Jeffrey Jackowski and address the envelope to: 608J South Loop Road Huntsville, AL 35805 Send your email address so that I can send you your registered copy via email. Or, send a floppy with your check and I'll return it with the registered software. (But remember, I don't know how to send mail internationally.)

About the programmer
I, Jeff Jackowski, am a student at the University of Alabama in Huntsville. Not long after I bought my computer at the beginning of 1995, I have been running OS/2 Warp on it. I decided to run OS/2 after reading good things about it in some periodicals starting a year or two before I bought it. Too bad its harder to find such good words about OS/2 in the general press now.

I can be reached at jackowskij@@email.uah.edu, but since I am sometimes busy with classes, it may take me a while to respond.

Copyright
HPFSRem - Copyright 1996 by Jeffrey Jackowski

License
HPFSRem now uses the GNU General Public License. It should be included in the same archive as HPFSRem with the name "COPYING". It may not be changed.