home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 620.lha / rdb / rdb.doc.pp / rdb.doc
Text File  |  1992-03-05  |  6KB  |  139 lines

  1.  
  2.                           rdb
  3.  
  4. Copyright © 1992, by Larry Phillips
  5.  
  6. LEGAL: Ugh, but it has to be said.
  7.  
  8.     This program is copyright. It is not public domain. It is, however,
  9. freely distributable. This means that you may use it and pass it
  10. around by any means you see fit, as long as there is no extra charge
  11. for it, over and above the cost of the media on which it is stored,
  12. and in the case of it being on a BBS or information network, that
  13. there is no extra charge over and above connect-time charges for
  14. downloading it. No commercial use of this program is allowed without
  15. prior arrangements with the author. This document must accompany the
  16. executable program.
  17.  
  18.   Use this program at your own risk. While I have attempted to test
  19. the operation fully, you must recognize that bugs can lurk, and that
  20. it is a dangerous program if used improperly, and I will not be
  21. responsible for any damages, however caused.
  22.  
  23.   This is not a shareware product, but I will not throw out any
  24. contributions you care to make, be they cash, letters, postcards, or
  25. macadamia nuts (yes, Dave Haynie is not the only one addicted to
  26. them).
  27.  
  28. --------------------------------------------------------------------
  29.  
  30. PURPOSE: Why I wrote this program.
  31.  
  32. Hard drives on the Amiga are usually automounted by means of data
  33. stored in the first two cylinders on the drive.  These sectors contain
  34. data known as the 'RigidDiskBlocks' (RDBs), or 'hardblocks'.  They are
  35. vital to automounting, and contain a number of required parameters
  36. that AmigaDos uses to access the partitions on the drive.  If they are
  37. damaged, your drive will either mount improperly, or not at all. RDBs
  38. are generally placed on the drive by the hard disk preparation
  39. software supplied with your host adapter (commonly called a controller
  40. in Amiga circles).
  41.  
  42. The purpose of rdb is to allow you to save and restore these sectors.
  43. There are a number of reasons you might want to have the RDB
  44. information handy. A disk error could cause the RDBs to be corrupted,
  45. or you might want to set up a replacement drive with the same
  46. parameters as the one being replaced. In either case, it will be
  47. faster to use rdb than the hard drive preparation software, and you
  48. will not have to remember how you had the drive set up.
  49.  
  50. If your RDBs become corrupted, using rdb with the RESTORE option will
  51. leave your data in the AmigaDos partitions intact. Note that if the
  52. corruption extended into any of the AmigaDos partitions, rdb will
  53. leave it alone too, and the data in the corrupted partitions will not
  54. be valid (rdb is NOT magic, so it will not recover the data itself).
  55. I suppose it's obvious, but I'll say it anyway; You must have previously
  56. used rdb with the SAVE option, in order to use the RESTORE option.
  57.  
  58. Operation is fairly simple, though you should pay close attention to
  59. the commands you use, noting that this program does play with the very
  60. heart of the hard drive automounting data. It will not knowingly let
  61. you restore an invalid RDB, but error checking is minimal, and only
  62. done on the first block of the RDB (the RDSK data structure).
  63.  
  64. ----------------------------------------------------------------------
  65.  
  66. USAGE: How to do it.
  67.  
  68. To use rdb from the command line (WorkBench operation is not
  69. supported):
  70.  
  71. rdb devicename unit <SHOW/SAVE/RESTORE> [filename]
  72.  
  73. devicename: The name of the device driver for your hard drive
  74.             examples: scsi.device, hardframe.device, etc.
  75.  
  76. unit: the unit number for the drive you want to work with
  77.       examples: 1, 2, 13, etc. (13 would be target 3, LUN 1)
  78.  
  79.  
  80. SHOW/SAVE/RESTORE: You must use one of these options. See below.
  81.  
  82. filename: optional. Name of a file to save to or restore from.
  83.  
  84.  
  85. OPTIONS: Shown in upper case, but may be entered in lower case.
  86.  
  87.    SHOW: displays the RDSK data structure, which is the first block in
  88.          the RDBs. The SHOW option does not check the RDSK data
  89.          structure for validity, and will show the first block
  90.          regardless of contents.  This is in case of corrupted data.
  91.          The contents of the forst block might point you toward the
  92.          cause of the corruption.
  93.  
  94.    SAVE: Reads the entire RDB area from the drive, and saves it to a
  95.          file. Note that this is overkill in most cases, since the RDBs
  96.          seldom use the entire area reserved for RDBs. Will not
  97.          knowingly save an invalid RDB, though only the RDSK data
  98.          structure is checked.  See below for filename conventions.
  99.  
  100. RESTORE: Restores the RDBs from a file. Will not knowingly restore an
  101.          invalid RDB, though only the RDSK data structure is checked.
  102.          See below for filename conventions.
  103.  
  104.  
  105.  
  106. FILENAMES: If you do not supply a filename for the save or restore
  107.            operations, one will be provided for you. The filename will
  108.            be named in the format: 'devicename-unit.rdb'. An example
  109.            would be 'scsi.device-3.rdb', indicating that unit 3 of
  110.            scsi.device was the drive specified in the command line.
  111.  
  112. ---------------------------------------------------------------------
  113.  
  114. EXAMPLE USAGE:
  115.  
  116.    rdb scsi.device 3 show
  117.  
  118.         Displays the first block of the RDBs for the hard drive on
  119.         scsi.device, SCSI target address 3
  120.  
  121.    rdb hardframe.device 2 save
  122.    rdb hardframe.device 2 save rdb2
  123.  
  124.         Reads and saves a copy of the RDBs for the drive on
  125.         hardframe.device, SCSI target address 2. The first example
  126.         would generate a file called 'hardframe.device-2.rdb', and the
  127.         second would create a file called 'rdb2'.
  128.  
  129.    rdb foodisk.device 6 restore
  130.    rdb foodisk.device 6 restore foo6.rdb
  131.  
  132.         Reads the RDBs from a file and writes them to the RDB area for
  133.         the drive on foodisk.device, unit 6. The first example will
  134.         read its data from a file called 'foodisk.device-6.rdb', and
  135.         the second will read its data from a file falled 'foo6.rdb'.
  136.  
  137.  
  138.  
  139.