home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / DISK / COVERUP1.ZIP / COVERUP.DOC < prev    next >
Encoding:
Text File  |  1990-07-21  |  26.9 KB  |  533 lines

  1.  
  2.    
  3.                                   CoverUp.DOC 
  4.                        Copyright (C) 1990 Jay Vanderbilt   
  5.    
  6.    
  7.         CoverUp.COM     10819 bytes 
  8.                         Erases all data in free space on a disk 
  9.                         Erases the data in a cluster beyond the file end 
  10.                         Overwrites all data in erased directory entries 
  11.                         Reports the number of bytes in bad sectors
  12.                         [Does not deal with data in clusters marked bad]
  13.                         Preserves time, date, and all attributes of files
  14.                         Sets errorlevel for use in batch files
  15.                         Reports on progress as it runs 
  16.                         Exits on start-up if problems detected 
  17.                         Exits after clean-up on all disk errors 
  18.                         Should handle any standard hard or floppy disk 
  19.    
  20.         Requirements    DOS 2.00+  192k free memory 
  21.         
  22.         Speed           1.2meg floppy, 72 files, 720k, 3 directories 1 m 28 s 
  23.                         360k floppy, 24 files, 240k, 1 directory         35 s 
  24.                         32meg hard, 980 files, 23meg, 18 directories 4 m  6 s 
  25.                         [Times for 12 mhz AT Clone MS-DOS 3.30  VERIFY = OFF 
  26.                          Your times will vary.] 
  27.         
  28.         Erases with     0f6h for data 
  29.                         Meaningless name for directories 
  30.  
  31.  
  32.                                TABLE OF CONTENTS 
  33.  
  34.         Bug Reports.........................................................2 
  35.         What CoverUp Does And Why...........................................3 
  36.         WARNINGS............................................................4 
  37.         How To Use The Program..............................................5 
  38.         What Is Happening While The Program Runs?...........................6 
  39.         Program Speed.......................................................6 
  40.         Hard Disks..........................................................7 
  41.         Unusual Drives......................................................8 
  42.         Error Messages......................................................9 
  43.         Message In A Box...................................................10
  44.         Revisions..........................................................11
  45.  
  46.             CoverUp Version 1.01 Copyright (c) 1990, Jay Vanderbilt 
  47.  
  48.         CoverUp may be freely distributed provided that it is unaltered and
  49.         that the complete, unaltered documentation is included.  CoverUp
  50.         may not be sold or included in any commercial package without
  51.         written permission. 
  52.  
  53.                                     CREDITS
  54.  
  55.         The program was originally named and specified on BIX by Roedy Green. 
  56.         Roedy Green, Robert Babcock, and David Holm among others on BIX 
  57.         helped at various stages with the design and testing.  All mistakes,
  58.         bugs, and design errors are entirely my own.
  59.  
  60.  
  61.         
  62.                                      -2-
  63.  
  64.  
  65.                                 A Special Plea 
  66.                (From The Heart Of Anyone Who Has Written Freeware) 
  67.  
  68.  
  69.             Programmers who write and distribute freeware do not have the 
  70.         resources to test every possible combination of equipment and software; 
  71.         they must rely on cautious programming to avoid fatal errors and user 
  72.         feedback to find and fix special cases.  Consider the record some
  73.         of the biggest software houses have with compatibility problems. 
  74.         Consider the disdain with which they treat bug reports.  Remember that 
  75.         the people who write the programs you get for free always want to hear 
  76.         from you.  
  77.             If you have a problem, let me know.  If you like the program, 
  78.         let me know.  If you hate it, let me know.  If it isn't what you 
  79.         wanted, let me know.  Whatever you have to say, I want to hear it.   
  80.       
  81.  
  82.  
  83.              Report bugs and make suggestions for improvements to: 
  84.    
  85.                                 Jay Vanderbilt 
  86.                                 3 Calvin #1 
  87.                                 Somerville, Ma 02143 
  88.                                 617-776-5792  (reasonable hours please) 
  89.                                 j_vanderbilt on BIX 
  90.  
  91.  
  92.  
  93.                                       -3-
  94.  
  95.  
  96.                            What CoverUp Does and Why 
  97.    
  98.             This program erases everything from a floppy disk except the 
  99.         structure of the disk (directories and file allocation table) and the 
  100.         actual data in the files.  This is every bit as useless as it sounds 
  101.         99% of the time.  However, when you send a disk out to be duplicated 
  102.         or to a customer you might be surprised to find what can be lurking 
  103.         unnoticed beyond the ends of files or in the unused areas of the 
  104.         disk. 
  105.      
  106.                     What DOS Does When It Erases and Copies
  107.      
  108.             When DOS erases a file it does not touch any of the data; all 
  109.         it does is mark the directory entry and the disk space as available. 
  110.         Until that space is overwritten the original file is still there and 
  111.         can be read by anyone with a file uneraser or disk browser.  When DOS 
  112.         writes to a file it only allocates space in discrete chunks (clusters). 
  113.         The unused space at the end of a cluster contains whatever was there 
  114.         before the file was written and that also can be read by anyone with 
  115.         a disk browser.  When DOS writes or copies anything less than a 
  116.         full sector (512 bytes, the smallest unit the disk drive deals with)
  117.         it does so through its own internal buffers.  This includes the end of 
  118.         any file that is not an exact multiple of the size of a sector.  The 
  119.         sector will be filled out with whatever happened to be in the buffer 
  120.         from the last time it was used.  It is also possible, though unlikely, 
  121.         for data to be concealed in clusters marked bad.  Because the program
  122.         avoids using direct writes, CoverUp ignores this possibility.
  123.             Most of the time this means nothing.  Nonetheless it could be
  124.         embarrassing to send out half your mailing list or the save files 
  125.         for Zork with a disk of data for your customers.  People using disk-
  126.         browsing utilities could be confused by random gibberish at the ends 
  127.         of programs.  If you need to do something about it CoverUp is for 
  128.         you. 
  129.  
  130.  
  131.  
  132.                                       -4-
  133.  
  134.  
  135.                                    WARNINGS 
  136.  
  137.             Please read this section before you use the program.  It's 
  138.         important.  The program checks for dangerous conditions as well as 
  139.         it can, but it can't do everything.  With a little care you should 
  140.         never have a problem. 
  141.  
  142.         NEVER use CoverUp on the only copy of a disk! 
  143.  
  144.             This is so simple and obvious that it has to go first.  It's too
  145.         easy to forget how hard it is to recover the original of a file, and
  146.         how easy it is just to make another copy if something goes wrong. 
  147.  
  148.         NEVER use CoverUp on the original copy of copy-protected software! 
  149.  
  150.             This is a corollary of the first warning.  A copy-protection 
  151.         method may work by hiding data in unusual places or modifying the disk 
  152.         layout.  CoverUp will not remove the protection, but it may destroy 
  153.         the hidden data and make the program useless.  A legitimate copy of 
  154.         the software which has been installed on another disk will not be 
  155.         affected by CoverUp. 
  156.      
  157.         NEVER use CoverUp with drive-aliasing active (JOIN ASSGN or SUBST)! 
  158.      
  159.             ASSIGN, JOIN, and SUBST are utilities provided with DOS for use
  160.         with old programs that insist on having files on particular drives
  161.         or do not work with directories.  They work by faking the drive or 
  162.         directory name to the operating system.  These, and any similar
  163.         utilities, will give CoverUp severe problems because it will not be
  164.         working on the drive it thinks it is.  A simple test is to read the
  165.         directory of the disk you are going to use.  If another drive lights
  166.         up, or the directory doesn't match what should be on the disk, stop
  167.         and disable the drive-aliasing. 
  168.  
  169.         NEVER use CoverUp on a network drive! 
  170.  
  171.             CoverUp reads and writes every file on a drive.  It writes a 
  172.         file that fills all the empty space on the drive.  The network 
  173.         administrator will be seriously annoyed if you use anything like
  174.         CoverUp.  The program will in any case stop as soon as it reaches a
  175.         file it doesn't have access to.  It will do nothing useful for a user
  176.         on a network drive.  So don't try. 
  177.      
  178.         NEVER use CoverUp while a background process is active! 
  179.      
  180.             There are a number of programs that run in the background 
  181.         doing things like formatting disks or downloading or printing files
  182.         while the normal programs run.  They should be disabled.  CoverUp 
  183.         needs exclusive access to the drive while it is running.  If it is
  184.         run in the OS/2 compatibility box no other processes that use the
  185.         disk should be running.  The same applies to Desqview and any other
  186.         program which allows multiple processes. 
  187.  
  188.  
  189.  
  190.                                       -5-
  191.  
  192.    
  193.                             How To Use The Program 
  194.    
  195.             Disable any drive aliasing.  Read the directory of the drive 
  196.         you are using to make sure.  Put the disk in the drive and close the 
  197.         door.  Type:
  198.         
  199.                          COVERUP [Drive]:/Y   <ENTER>
  200.  
  201.         There is nothing magic about the 'Y'.  It is there only to make sure
  202.         that no one uses the program without reading a little about using it.
  203.         It's short for "Yes, I have looked at the manual."  Thank you.
  204.         The program will run from one to five minutes depending on the size 
  205.         of the disk and the number of files.  Do not open the door until you 
  206.         see the DOS prompt.  If you need to stop the program before it ends 
  207.         hit the <CONTROL> and <BREAK> keys together.  (On some keyboards 
  208.         <BREAK> is called <PAUSE>.)  The program will exit as soon as it can. 
  209.         If CoverUp runs into any error reading or writing the disk it will 
  210.         attempt to clean up before quitting.  If it cannot clean up (perhaps 
  211.         because the door was opened) it will report on what needs to be done. 
  212.         It is usually easier to recopy the disk and start again.  If the 
  213.         error was not due to an open door, the disk may have been defective. 
  214.         Throw it away and try a new one. 
  215.         
  216.             NEVER use CoverUp on an original disk.  NEVER use it if you 
  217.         may want to recover erased files on a disk.  ALWAYS check that the 
  218.         files are still good before you send out the disk. 
  219.         
  220.             If you want to run CoverUp from a batch file, it sets the 
  221.         errorlevel to zero for a clean finish and one for any failure. 
  222.         
  223.             Any important disk should be checked against the original with
  224.         a file comparison utility after the program is run. 
  225.  
  226.  
  227.  
  228.                                       -6-
  229.  
  230.  
  231.                    What Is Happening While The Program Runs? 
  232.  
  233.         Start Up 
  234.       
  235.             The program checks for sufficient memeory, checks the DOS 
  236.         version, installs the critical error handler and the other traps 
  237.         needed for safe operation, and then checks the data it needs to
  238.         read the disk.  Generally takes less than four seconds. 
  239.    
  240.         Erasing Data in Free Space on Disk
  241.    
  242.             The program finds an unused filename and opens a dummy file in 
  243.         the root directory.  It then allocates all the available space on the 
  244.         disk to this file (1 to 4 seconds) and writes the erasing data to the 
  245.         file.  Progress is marked by the row of large or small arrowheads. The 
  246.         size changes solely to make the progress more visible.  When the file 
  247.         is full it is erased.  The result is that all the free space has been
  248.         overwritten and released to be used again.
  249.         
  250.         Erasing File Tails and Overwriting Old Directory Entries. 
  251.         
  252.             The program starts with the root directory and looks at every 
  253.         entry.  Unless the data exactly fills the last sector, each file is
  254.         opened, and the unused space between the end of the data and the end
  255.         of the space allocated to the file is overwritten, and then the file
  256.         is truncated to its original length and the original time, date, and
  257.         attribute restored.  Whenever a subdirectory is found it is done and
  258.         then the program resumes with the parent.  A count of the erased
  259.         entries is kept, and when the end of a directory is reached the
  260.         program opens as many zero-length files with dummy names as there are
  261.         erased entries and then erases them.  The result is that the names 
  262.         of erased files are overwritten.  Progress is marked by an 'F' or 'f' 
  263.         for each file and an 'E' or 'e' for each erased directory entry.  The 
  264.         distinction between the large and small letters is meaningless; it 
  265.         simply makes the progress more visible.  Note that there will always
  266.         be at least one file entry to erase.  This is the dummy file that was
  267.         created to overwrite all the free space.  The only exception is a disk
  268.         that has no free space to begin with.
  269.         
  270.         Checking for Data in Bad Sectors 
  271.         
  272.             The program counts the sectors marked bad in the File Allocation
  273.         Table and reports the number of bytes in them.  A floppy disk with
  274.         any bad sectors at all should never be used for anything important.
  275.         Many hard disks have some bad sectors; this report should be ignored
  276.         unless the number is very large or starts changing from one run to
  277.         the next.  This number should be the same as CHKDSK reports.
  278.         
  279.                                  PROGRAM SPEED 
  280.         
  281.             The speed of the program is not simple to predict.  On a floppy
  282.         it will run about the same amount of time it took to copy the disk.
  283.         There is much more uncertainty with a hard disk.  In general a 32 meg
  284.  
  285.      
  286.  
  287.                                       -7-
  288.  
  289.  
  290.         disk with 1000 to 2000 files on a 12mhz AT will take less than ten 
  291.         minutes.  If the program slows down abruptly (by about a factor of      
  292.         five) while doing a hard disk the problem is likely to be too few 
  293.         buffers.  These are the buffers DOS uses in reading the directories 
  294.         and file allocation tables.  When directories and files get too large
  295.         the buffers overflow and DOS has to go back to the disk at every read.
  296.         You could increase the number of buffers in CONFIG.SYS or break up      
  297.         very large directories into smaller ones.  Or you can just be patient; 
  298.         the program will still work properly.  If you have a good disk cache 
  299.         this may not be a problem. 
  300.      
  301.  
  302.                                   HARD DISKS 
  303.  
  304.             There are a few reasons to use CoverUp on a hard disk.  If it
  305.         is necessary to give a hard drive with confidential data on it to
  306.         someone else the usual procedure would be to do a complete back-up, 
  307.         low-level format the drive, and restore only what is necessary.  This 
  308.         is at best tedious.  A few manufacturers tell you to never redo the 
  309.         the low-level format.  If you use CoverUp after the confidential files 
  310.         have been erased they will not be recoverable by any ordinary means. 
  311.         Do so only immediately after you have made a good back-up. 
  312.             If you run CoverUp once in a while it will make it easier to 
  313.         recover erased files.  This is not as screwy as it sounds, even though 
  314.         the primary purpose of the program is to make it impossible to recover 
  315.         erased files.  File un-erasers generally work by finding the entry of 
  316.         the file in the directory (this is possible because DOS only erases 
  317.         the first character) and hunting for the pieces of the erased file on
  318.         the disk.  (They are still there, for a while, because DOS frees the 
  319.         space without erasing the data.)  After the first chunk the data could
  320.         be anywhere on the disk.  The un-eraser will show you chunks of file
  321.         and ask if this is what you want.  The fewer unallocated clusters with
  322.         old data on the disk the easier it is to find the ones with your data.
  323.         If you ran CoverUp recently, but NOT AFTER you erased the file you 
  324.         want to recover, there will be very few clusters with data in them to
  325.         look at.  This is an extreme measure; it's easier to keep good back-ups
  326.         and be careful.  Only run CoverUp after you have made a good back-up.  
  327.      
  328.                                      WORMS 
  329.      
  330.              Don't ever try to use CoverUp on a WORM.  You will end up with
  331.         an expensive and useless cartridge full of bad data. 
  332.      
  333.                                BACKING-UP FIRST 
  334.      
  335.             Why do I insist on only running CoverUp immediately after a 
  336.         back-up?  Do I lack confidence in the safety of the program?  
  337.             The program is conservatively designed, and I hope bug-free. 
  338.         Even with a flawless program I would still recommend backing-up 
  339.         before running it.  Why?  Because the program spends anywhere from a
  340.         minute to half an hour (for a really enormous disk) writing to the 
  341.         disk.  If DOS is interrupted during a write (by a power failure or by
  342.         resetting the computer) the likely result is a corrupt disk, which may
  343.  
  344.  
  345.  
  346.                                       -8-
  347.  
  348.  
  349.         be difficult to fix.  Any program that spends a lot of time writing
  350.         (a disk testing program like SpinRite or HDTEST, or a disk defragger)
  351.         runs the same risk.  Any such program will do more writing in a few
  352.         minutes than a word processor would in a month.  So back-up.  The
  353.         peace of mind is wonderful.  If it seems like too much trouble, think
  354.         about buying a tape drive.  It will be a lot cheaper than replacing 
  355.         your data. 
  356.  
  357.                        How To Run CoverUp On A Hard Disk 
  358.  
  359.         Now that you have read the warnings, start it by typing 
  360.  
  361.                              COVERUP [Drive]:/Y/+ 
  362.  
  363.         The program will pause and give you a chance to quit before going on. 
  364.         The plus sign was deliberately chosen to be awkward and nonintuitive. 
  365.      
  366.      
  367.                                 UNUSUAL DRIVES 
  368.       
  369.             CoverUp tries to identify disks before running and checks to be
  370.         sure the data it needs is in the right place.  Unfortunately there 
  371.         are cases where the drive cannot be dealt with easily.  Ramdisks and 
  372.         certain floppy disks (e.g. an add-on for Sanyo) identify themselves as 
  373.         hard drives.  If you get an error message for what you know is a floppy 
  374.         or a ramdisk you can force the program to treat it as a floppy as long 
  375.         as it is smaller than 1 megabyte.  Add   /S   to the command line. 
  376.         That is, 
  377.      
  378.                              COVERUP [Drive]:/Y/S 
  379.      
  380.             If a disk does not identify itself as a hard disk but is larger 
  381.         than 4 megabytes the program will always treat it as a hard disk.  
  382.         See the previous section, HARD DISKS. 
  383.      
  384.             If a disk seems to have only one File Allocation Table, which is
  385.         the case with some ramdisks, and is unlikely but possible with other 
  386.         drives, you can force CoverUp to run by adding  /!  to the command 
  387.         line.  That is, 
  388.      
  389.                              COVERUP [Drive]:/Y/! 
  390.      
  391.              Do so only if you are sure the disk was actually written in
  392.         the drive you are using. 
  393.      
  394.             CoverUp will refuse to deal with any other disk it sees as odd. 
  395.         If you have a drive CoverUp won't work with let me know and I'll see 
  396.         what can be done. 
  397.      
  398.             [A note on ramdisks.  The only case where CoverUp might be 
  399.         useful on a ramdisk would be on one used as a master for track-by-
  400.         track duplicating.  A ramdisk set up this way will look exactly like
  401.         a floppy to CoverUp, and will generate no errors.] 
  402.      
  403.  
  404.      
  405.      
  406.                                       -9-
  407.      
  408.      
  409.                                 ERROR MESSAGES 
  410.      
  411.             Most of the error messages are self-explanatory or refer to a 
  412.         section in the manual.  Some explanation for the others may be useful. 
  413.         Most of them are in the program to cover unlikely cases.  These 
  414.         messages are presented in roughly the order the order they might occur. 
  415.             If you have a reasonably standard system, keep the drive door 
  416.         closed, keep the drive clean, and only use decent quality disks you 
  417.         will probably never see any of these messages. 
  418.      
  419.         'Unable to find critical error flag.  Program cannot run without it.' 
  420.      
  421.         'Unable to install critical error handler.  Program cannot run 
  422.          without it.' 
  423.      
  424.             CoverUp uses a critical error handler that provides a functional
  425.         equivalent of FAIL for versions of DOS before 3.1.  This means
  426.         that the program can handle disk errors without help from the user
  427.         and without corrupting DOS's internal tables.  The problem is that
  428.         the installation is complicated and relies on undocumented features
  429.         of DOS.  If you ever get either of these two messages let me know
  430.         so I can work on a fix. 
  431.                
  432.         'The cluster-size is too big for CoverUp to handle.' 
  433.      
  434.                 If you have a drive with clusters bigger than 32k and you want 
  435.         to use CoverUp please let me know.  The program can be rewritten to 
  436.         cover the case, but I have never heard of such a beast. 
  437.      
  438.         'CoverUp has found inconsistencies in the data...' 
  439.      
  440.         'The File Allocation Tables are not where CoverUp expects to find 
  441.          them or they are mismatched.' 
  442.      
  443.             Caused either by a programming error or a completely non-
  444.         standard disk layout.  Let me know and I'll see what can be done.
  445.         May also be a corrupt File Allocation Table.  Run CHKDSK and see
  446.         what it says.  If it's a floppy disk erase it and reformat and start
  447.         again.  If it's a hard disk get expert help. 
  448.  
  449.      
  450.      
  451.                                      -10-
  452.              
  453.      
  454.         'Disk error during start up.' 
  455.         
  456.         'Disk missing, unformatted, or unreadable.' 
  457.      
  458.         'CoverUp has encountered an error with the disk and is exiting.' 
  459.      
  460.             These are general error messages.  The most likely causes are an 
  461.         open drive door or a bad disk.  Disks are not as interchangeable as 
  462.         they should be.  In particular 360k disks that have been written in
  463.         1.2 meg drives are frequently unreliable in 360k drives.  Floppy disks 
  464.         which have any bad sectors at all may cause problems; FORMAT does not
  465.         do a good job of rejecting marginal sectors.  As a general rule any
  466.         floppy disk that shows bad sectors after formatting should be thrown
  467.         away (or at least never used for data you want to see again).  The 
  468.         drive may be dirty, try cleaning it according to the manufacturer's 
  469.         instructions. 
  470.             If you see these messages on a hard disk there is either a bug in
  471.         the program, or a serious problem with the drive.  Read/write errors 
  472.         should be VERY rare with any decent hard drive.  If this happens to 
  473.         you, make sure you have a back-up, run any diagnostics you have, and
  474.         keep an eye out for any repetition.  If you suspect CoverUp rather
  475.         than your disk let me know, with the most detailed possible account of
  476.         the problem. 
  477.             If you have any of these errors without an obvious reason check
  478.         the data on the disk carefully before you use it again. 
  479.      
  480.         'CoverUp has had a disk error which it cannot clean up.' 
  481.      
  482.             If CoverUp runs into an error at a time the disk has been altered
  483.         by the program it makes one attempt to clean up before exiting.
  484.         If it fails it gives instructions for finishing the clean-up.  If you
  485.         have the choice start over with a newly copied disk; otherwise follow
  486.         the instructions given.  If the program was interrupted while writing
  487.         the File Allocation Table or directory the damage may be difficult to
  488.         fix and the instructions given will not be adequate.  The only likely
  489.         causes of such an interruption are a power-failure, turning off or 
  490.         re-setting the computer, or opening the drive door.  The result will
  491.         be the same with any program that is caught writing the disk.  At this 
  492.         point you need something like Norton Disk Doctor and expert help. 
  493.  
  494.  
  495.                                MESSAGE IN A BOX
  496.  
  497.             If the program encounters a fatal error after the start-up, a
  498.         neatly boxed message full of register values will appear.  If the
  499.         error seems to have been caused by a bug, and not by something
  500.         obvious like a bad disk or open door, copy them down carefully
  501.         and send them to me.  This information will tell me where the error
  502.         happened and the error codes returned by DOS, and give me a good
  503.         start on fixing it.
  504.  
  505.  
  506.  
  507.                                      -11-
  508.           
  509.  
  510.                                    REVISIONS
  511.  
  512.  
  513.         7/11/90   Version 1.00  First distributed version.
  514.  
  515.         7/20/90   Version 1.01  Bug-fix and small improvements.
  516.  
  517.             Fixed unexpected incompatibility with SHARE.  If SHARE is loaded
  518.         and a program attempts to change the attribute of a file (which
  519.         CoverUp must do) and the file is open, changing the attribute will
  520.         seem to work, but when the file is closed DOS will return an error
  521.         'Invalid Handle'.  Fixed by changing the attribute only when a file
  522.         is not open.
  523.             Added improved error reporting to make bugs easier to track.
  524.         Except for the start-up errors, where the messages are quite specific,
  525.         fatal errors now generate a neatly boxed report of the error codes
  526.         returned by the function itself and by INT 021 AH=059 (in versions
  527.         of DOS where it is available), and the address of the function that
  528.         had the error.
  529.             Revised manual.  Added report of number of files checked and
  530.         bytes and directory entries erased.  Improved messages.
  531.  
  532.  
  533.