home *** CD-ROM | disk | FTP | other *** search
-
-
- CoverUp.DOC
- Copyright (C) 1990 Jay Vanderbilt
-
-
- CoverUp.COM 10819 bytes
- Erases all data in free space on a disk
- Erases the data in a cluster beyond the file end
- Overwrites all data in erased directory entries
- Reports the number of bytes in bad sectors
- [Does not deal with data in clusters marked bad]
- Preserves time, date, and all attributes of files
- Sets errorlevel for use in batch files
- Reports on progress as it runs
- Exits on start-up if problems detected
- Exits after clean-up on all disk errors
- Should handle any standard hard or floppy disk
-
- Requirements DOS 2.00+ 192k free memory
-
- Speed 1.2meg floppy, 72 files, 720k, 3 directories 1 m 28 s
- 360k floppy, 24 files, 240k, 1 directory 35 s
- 32meg hard, 980 files, 23meg, 18 directories 4 m 6 s
- [Times for 12 mhz AT Clone MS-DOS 3.30 VERIFY = OFF
- Your times will vary.]
-
- Erases with 0f6h for data
- Meaningless name for directories
-
-
- TABLE OF CONTENTS
-
- Bug Reports.........................................................2
- What CoverUp Does And Why...........................................3
- WARNINGS............................................................4
- How To Use The Program..............................................5
- What Is Happening While The Program Runs?...........................6
- Program Speed.......................................................6
- Hard Disks..........................................................7
- Unusual Drives......................................................8
- Error Messages......................................................9
- Message In A Box...................................................10
- Revisions..........................................................11
-
- CoverUp Version 1.01 Copyright (c) 1990, Jay Vanderbilt
-
- CoverUp may be freely distributed provided that it is unaltered and
- that the complete, unaltered documentation is included. CoverUp
- may not be sold or included in any commercial package without
- written permission.
-
- CREDITS
-
- The program was originally named and specified on BIX by Roedy Green.
- Roedy Green, Robert Babcock, and David Holm among others on BIX
- helped at various stages with the design and testing. All mistakes,
- bugs, and design errors are entirely my own.
-
-
-
- -2-
-
-
- A Special Plea
- (From The Heart Of Anyone Who Has Written Freeware)
-
-
- Programmers who write and distribute freeware do not have the
- resources to test every possible combination of equipment and software;
- they must rely on cautious programming to avoid fatal errors and user
- feedback to find and fix special cases. Consider the record some
- of the biggest software houses have with compatibility problems.
- Consider the disdain with which they treat bug reports. Remember that
- the people who write the programs you get for free always want to hear
- from you.
- If you have a problem, let me know. If you like the program,
- let me know. If you hate it, let me know. If it isn't what you
- wanted, let me know. Whatever you have to say, I want to hear it.
-
-
-
- Report bugs and make suggestions for improvements to:
-
- Jay Vanderbilt
- 3 Calvin #1
- Somerville, Ma 02143
- 617-776-5792 (reasonable hours please)
- j_vanderbilt on BIX
-
-
-
- -3-
-
-
- What CoverUp Does and Why
-
- This program erases everything from a floppy disk except the
- structure of the disk (directories and file allocation table) and the
- actual data in the files. This is every bit as useless as it sounds
- 99% of the time. However, when you send a disk out to be duplicated
- or to a customer you might be surprised to find what can be lurking
- unnoticed beyond the ends of files or in the unused areas of the
- disk.
-
- What DOS Does When It Erases and Copies
-
- When DOS erases a file it does not touch any of the data; all
- it does is mark the directory entry and the disk space as available.
- Until that space is overwritten the original file is still there and
- can be read by anyone with a file uneraser or disk browser. When DOS
- writes to a file it only allocates space in discrete chunks (clusters).
- The unused space at the end of a cluster contains whatever was there
- before the file was written and that also can be read by anyone with
- a disk browser. When DOS writes or copies anything less than a
- full sector (512 bytes, the smallest unit the disk drive deals with)
- it does so through its own internal buffers. This includes the end of
- any file that is not an exact multiple of the size of a sector. The
- sector will be filled out with whatever happened to be in the buffer
- from the last time it was used. It is also possible, though unlikely,
- for data to be concealed in clusters marked bad. Because the program
- avoids using direct writes, CoverUp ignores this possibility.
- Most of the time this means nothing. Nonetheless it could be
- embarrassing to send out half your mailing list or the save files
- for Zork with a disk of data for your customers. People using disk-
- browsing utilities could be confused by random gibberish at the ends
- of programs. If you need to do something about it CoverUp is for
- you.
-
-
-
- -4-
-
-
- WARNINGS
-
- Please read this section before you use the program. It's
- important. The program checks for dangerous conditions as well as
- it can, but it can't do everything. With a little care you should
- never have a problem.
-
- NEVER use CoverUp on the only copy of a disk!
-
- This is so simple and obvious that it has to go first. It's too
- easy to forget how hard it is to recover the original of a file, and
- how easy it is just to make another copy if something goes wrong.
-
- NEVER use CoverUp on the original copy of copy-protected software!
-
- This is a corollary of the first warning. A copy-protection
- method may work by hiding data in unusual places or modifying the disk
- layout. CoverUp will not remove the protection, but it may destroy
- the hidden data and make the program useless. A legitimate copy of
- the software which has been installed on another disk will not be
- affected by CoverUp.
-
- NEVER use CoverUp with drive-aliasing active (JOIN ASSGN or SUBST)!
-
- ASSIGN, JOIN, and SUBST are utilities provided with DOS for use
- with old programs that insist on having files on particular drives
- or do not work with directories. They work by faking the drive or
- directory name to the operating system. These, and any similar
- utilities, will give CoverUp severe problems because it will not be
- working on the drive it thinks it is. A simple test is to read the
- directory of the disk you are going to use. If another drive lights
- up, or the directory doesn't match what should be on the disk, stop
- and disable the drive-aliasing.
-
- NEVER use CoverUp on a network drive!
-
- CoverUp reads and writes every file on a drive. It writes a
- file that fills all the empty space on the drive. The network
- administrator will be seriously annoyed if you use anything like
- CoverUp. The program will in any case stop as soon as it reaches a
- file it doesn't have access to. It will do nothing useful for a user
- on a network drive. So don't try.
-
- NEVER use CoverUp while a background process is active!
-
- There are a number of programs that run in the background
- doing things like formatting disks or downloading or printing files
- while the normal programs run. They should be disabled. CoverUp
- needs exclusive access to the drive while it is running. If it is
- run in the OS/2 compatibility box no other processes that use the
- disk should be running. The same applies to Desqview and any other
- program which allows multiple processes.
-
-
-
- -5-
-
-
- How To Use The Program
-
- Disable any drive aliasing. Read the directory of the drive
- you are using to make sure. Put the disk in the drive and close the
- door. Type:
-
- COVERUP [Drive]:/Y <ENTER>
-
- There is nothing magic about the 'Y'. It is there only to make sure
- that no one uses the program without reading a little about using it.
- It's short for "Yes, I have looked at the manual." Thank you.
- The program will run from one to five minutes depending on the size
- of the disk and the number of files. Do not open the door until you
- see the DOS prompt. If you need to stop the program before it ends
- hit the <CONTROL> and <BREAK> keys together. (On some keyboards
- <BREAK> is called <PAUSE>.) The program will exit as soon as it can.
- If CoverUp runs into any error reading or writing the disk it will
- attempt to clean up before quitting. If it cannot clean up (perhaps
- because the door was opened) it will report on what needs to be done.
- It is usually easier to recopy the disk and start again. If the
- error was not due to an open door, the disk may have been defective.
- Throw it away and try a new one.
-
- NEVER use CoverUp on an original disk. NEVER use it if you
- may want to recover erased files on a disk. ALWAYS check that the
- files are still good before you send out the disk.
-
- If you want to run CoverUp from a batch file, it sets the
- errorlevel to zero for a clean finish and one for any failure.
-
- Any important disk should be checked against the original with
- a file comparison utility after the program is run.
-
-
-
- -6-
-
-
- What Is Happening While The Program Runs?
-
- Start Up
-
- The program checks for sufficient memeory, checks the DOS
- version, installs the critical error handler and the other traps
- needed for safe operation, and then checks the data it needs to
- read the disk. Generally takes less than four seconds.
-
- Erasing Data in Free Space on Disk
-
- The program finds an unused filename and opens a dummy file in
- the root directory. It then allocates all the available space on the
- disk to this file (1 to 4 seconds) and writes the erasing data to the
- file. Progress is marked by the row of large or small arrowheads. The
- size changes solely to make the progress more visible. When the file
- is full it is erased. The result is that all the free space has been
- overwritten and released to be used again.
-
- Erasing File Tails and Overwriting Old Directory Entries.
-
- The program starts with the root directory and looks at every
- entry. Unless the data exactly fills the last sector, each file is
- opened, and the unused space between the end of the data and the end
- of the space allocated to the file is overwritten, and then the file
- is truncated to its original length and the original time, date, and
- attribute restored. Whenever a subdirectory is found it is done and
- then the program resumes with the parent. A count of the erased
- entries is kept, and when the end of a directory is reached the
- program opens as many zero-length files with dummy names as there are
- erased entries and then erases them. The result is that the names
- of erased files are overwritten. Progress is marked by an 'F' or 'f'
- for each file and an 'E' or 'e' for each erased directory entry. The
- distinction between the large and small letters is meaningless; it
- simply makes the progress more visible. Note that there will always
- be at least one file entry to erase. This is the dummy file that was
- created to overwrite all the free space. The only exception is a disk
- that has no free space to begin with.
-
- Checking for Data in Bad Sectors
-
- The program counts the sectors marked bad in the File Allocation
- Table and reports the number of bytes in them. A floppy disk with
- any bad sectors at all should never be used for anything important.
- Many hard disks have some bad sectors; this report should be ignored
- unless the number is very large or starts changing from one run to
- the next. This number should be the same as CHKDSK reports.
-
- PROGRAM SPEED
-
- The speed of the program is not simple to predict. On a floppy
- it will run about the same amount of time it took to copy the disk.
- There is much more uncertainty with a hard disk. In general a 32 meg
-
-
-
- -7-
-
-
- disk with 1000 to 2000 files on a 12mhz AT will take less than ten
- minutes. If the program slows down abruptly (by about a factor of
- five) while doing a hard disk the problem is likely to be too few
- buffers. These are the buffers DOS uses in reading the directories
- and file allocation tables. When directories and files get too large
- the buffers overflow and DOS has to go back to the disk at every read.
- You could increase the number of buffers in CONFIG.SYS or break up
- very large directories into smaller ones. Or you can just be patient;
- the program will still work properly. If you have a good disk cache
- this may not be a problem.
-
-
- HARD DISKS
-
- There are a few reasons to use CoverUp on a hard disk. If it
- is necessary to give a hard drive with confidential data on it to
- someone else the usual procedure would be to do a complete back-up,
- low-level format the drive, and restore only what is necessary. This
- is at best tedious. A few manufacturers tell you to never redo the
- the low-level format. If you use CoverUp after the confidential files
- have been erased they will not be recoverable by any ordinary means.
- Do so only immediately after you have made a good back-up.
- If you run CoverUp once in a while it will make it easier to
- recover erased files. This is not as screwy as it sounds, even though
- the primary purpose of the program is to make it impossible to recover
- erased files. File un-erasers generally work by finding the entry of
- the file in the directory (this is possible because DOS only erases
- the first character) and hunting for the pieces of the erased file on
- the disk. (They are still there, for a while, because DOS frees the
- space without erasing the data.) After the first chunk the data could
- be anywhere on the disk. The un-eraser will show you chunks of file
- and ask if this is what you want. The fewer unallocated clusters with
- old data on the disk the easier it is to find the ones with your data.
- If you ran CoverUp recently, but NOT AFTER you erased the file you
- want to recover, there will be very few clusters with data in them to
- look at. This is an extreme measure; it's easier to keep good back-ups
- and be careful. Only run CoverUp after you have made a good back-up.
-
- WORMS
-
- Don't ever try to use CoverUp on a WORM. You will end up with
- an expensive and useless cartridge full of bad data.
-
- BACKING-UP FIRST
-
- Why do I insist on only running CoverUp immediately after a
- back-up? Do I lack confidence in the safety of the program?
- The program is conservatively designed, and I hope bug-free.
- Even with a flawless program I would still recommend backing-up
- before running it. Why? Because the program spends anywhere from a
- minute to half an hour (for a really enormous disk) writing to the
- disk. If DOS is interrupted during a write (by a power failure or by
- resetting the computer) the likely result is a corrupt disk, which may
-
-
-
- -8-
-
-
- be difficult to fix. Any program that spends a lot of time writing
- (a disk testing program like SpinRite or HDTEST, or a disk defragger)
- runs the same risk. Any such program will do more writing in a few
- minutes than a word processor would in a month. So back-up. The
- peace of mind is wonderful. If it seems like too much trouble, think
- about buying a tape drive. It will be a lot cheaper than replacing
- your data.
-
- How To Run CoverUp On A Hard Disk
-
- Now that you have read the warnings, start it by typing
-
- COVERUP [Drive]:/Y/+
-
- The program will pause and give you a chance to quit before going on.
- The plus sign was deliberately chosen to be awkward and nonintuitive.
-
-
- UNUSUAL DRIVES
-
- CoverUp tries to identify disks before running and checks to be
- sure the data it needs is in the right place. Unfortunately there
- are cases where the drive cannot be dealt with easily. Ramdisks and
- certain floppy disks (e.g. an add-on for Sanyo) identify themselves as
- hard drives. If you get an error message for what you know is a floppy
- or a ramdisk you can force the program to treat it as a floppy as long
- as it is smaller than 1 megabyte. Add /S to the command line.
- That is,
-
- COVERUP [Drive]:/Y/S
-
- If a disk does not identify itself as a hard disk but is larger
- than 4 megabytes the program will always treat it as a hard disk.
- See the previous section, HARD DISKS.
-
- If a disk seems to have only one File Allocation Table, which is
- the case with some ramdisks, and is unlikely but possible with other
- drives, you can force CoverUp to run by adding /! to the command
- line. That is,
-
- COVERUP [Drive]:/Y/!
-
- Do so only if you are sure the disk was actually written in
- the drive you are using.
-
- CoverUp will refuse to deal with any other disk it sees as odd.
- If you have a drive CoverUp won't work with let me know and I'll see
- what can be done.
-
- [A note on ramdisks. The only case where CoverUp might be
- useful on a ramdisk would be on one used as a master for track-by-
- track duplicating. A ramdisk set up this way will look exactly like
- a floppy to CoverUp, and will generate no errors.]
-
-
-
-
- -9-
-
-
- ERROR MESSAGES
-
- Most of the error messages are self-explanatory or refer to a
- section in the manual. Some explanation for the others may be useful.
- Most of them are in the program to cover unlikely cases. These
- messages are presented in roughly the order the order they might occur.
- If you have a reasonably standard system, keep the drive door
- closed, keep the drive clean, and only use decent quality disks you
- will probably never see any of these messages.
-
- 'Unable to find critical error flag. Program cannot run without it.'
-
- 'Unable to install critical error handler. Program cannot run
- without it.'
-
- CoverUp uses a critical error handler that provides a functional
- equivalent of FAIL for versions of DOS before 3.1. This means
- that the program can handle disk errors without help from the user
- and without corrupting DOS's internal tables. The problem is that
- the installation is complicated and relies on undocumented features
- of DOS. If you ever get either of these two messages let me know
- so I can work on a fix.
-
- 'The cluster-size is too big for CoverUp to handle.'
-
- If you have a drive with clusters bigger than 32k and you want
- to use CoverUp please let me know. The program can be rewritten to
- cover the case, but I have never heard of such a beast.
-
- 'CoverUp has found inconsistencies in the data...'
-
- 'The File Allocation Tables are not where CoverUp expects to find
- them or they are mismatched.'
-
- Caused either by a programming error or a completely non-
- standard disk layout. Let me know and I'll see what can be done.
- May also be a corrupt File Allocation Table. Run CHKDSK and see
- what it says. If it's a floppy disk erase it and reformat and start
- again. If it's a hard disk get expert help.
-
-
-
- -10-
-
-
- 'Disk error during start up.'
-
- 'Disk missing, unformatted, or unreadable.'
-
- 'CoverUp has encountered an error with the disk and is exiting.'
-
- These are general error messages. The most likely causes are an
- open drive door or a bad disk. Disks are not as interchangeable as
- they should be. In particular 360k disks that have been written in
- 1.2 meg drives are frequently unreliable in 360k drives. Floppy disks
- which have any bad sectors at all may cause problems; FORMAT does not
- do a good job of rejecting marginal sectors. As a general rule any
- floppy disk that shows bad sectors after formatting should be thrown
- away (or at least never used for data you want to see again). The
- drive may be dirty, try cleaning it according to the manufacturer's
- instructions.
- If you see these messages on a hard disk there is either a bug in
- the program, or a serious problem with the drive. Read/write errors
- should be VERY rare with any decent hard drive. If this happens to
- you, make sure you have a back-up, run any diagnostics you have, and
- keep an eye out for any repetition. If you suspect CoverUp rather
- than your disk let me know, with the most detailed possible account of
- the problem.
- If you have any of these errors without an obvious reason check
- the data on the disk carefully before you use it again.
-
- 'CoverUp has had a disk error which it cannot clean up.'
-
- If CoverUp runs into an error at a time the disk has been altered
- by the program it makes one attempt to clean up before exiting.
- If it fails it gives instructions for finishing the clean-up. If you
- have the choice start over with a newly copied disk; otherwise follow
- the instructions given. If the program was interrupted while writing
- the File Allocation Table or directory the damage may be difficult to
- fix and the instructions given will not be adequate. The only likely
- causes of such an interruption are a power-failure, turning off or
- re-setting the computer, or opening the drive door. The result will
- be the same with any program that is caught writing the disk. At this
- point you need something like Norton Disk Doctor and expert help.
-
-
- MESSAGE IN A BOX
-
- If the program encounters a fatal error after the start-up, a
- neatly boxed message full of register values will appear. If the
- error seems to have been caused by a bug, and not by something
- obvious like a bad disk or open door, copy them down carefully
- and send them to me. This information will tell me where the error
- happened and the error codes returned by DOS, and give me a good
- start on fixing it.
-
-
-
- -11-
-
-
- REVISIONS
-
-
- 7/11/90 Version 1.00 First distributed version.
-
- 7/20/90 Version 1.01 Bug-fix and small improvements.
-
- Fixed unexpected incompatibility with SHARE. If SHARE is loaded
- and a program attempts to change the attribute of a file (which
- CoverUp must do) and the file is open, changing the attribute will
- seem to work, but when the file is closed DOS will return an error
- 'Invalid Handle'. Fixed by changing the attribute only when a file
- is not open.
- Added improved error reporting to make bugs easier to track.
- Except for the start-up errors, where the messages are quite specific,
- fatal errors now generate a neatly boxed report of the error codes
- returned by the function itself and by INT 021 AH=059 (in versions
- of DOS where it is available), and the address of the function that
- had the error.
- Revised manual. Added report of number of files checked and
- bytes and directory entries erased. Improved messages.
-
-
-