home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / alt_os / mint / mfs6011 / source / docs / minit.doc < prev    next >
Text File  |  1994-05-12  |  10KB  |  182 lines

  1. The program 'minit' creates minixfs filesystems. Then can be created on a
  2. TOS formatted disk or a TOS filesystem, then can also be created to alter
  3. the parameters of an already existing minixfs partition.
  4.  
  5. WARNING: USING MINIT TO CREATE FILESYSTEMS WILL IRRETRIEVABLY WIPE ALL DATA
  6. ON THAT PARTITION. This includes using it to create a filesystem 'on top' of
  7. an already existing one. Don't say I didn't warn you.
  8.  
  9. FILESYSTEM VERSIONS.
  10. Before you decide to make a filesystem you must decide which kind of filesystem
  11. you want to make. There are two kinds at present V1 and V2. These are
  12. compatible with the equivalent Minix filesystems. V1 filesystems are the
  13. standard Minix filesystems used with all versions of Minix, they do have a 
  14. number of shortcomings, there is only one kind of file access time and V1
  15. filesystems can be at most 64Mb in size. V2 filesystems are newer and are
  16. the same as the V2 filesystems used by Minix 1.6xx (and presumably higher).
  17. They have three access times and can be any size (if you hard disk software
  18. will support it). I would strongly advise the use of V2 filesystems.
  19.  
  20.         If you supply the -V option to minit you will make a V2 filesystem,
  21. otherwise it will be V1.
  22.  
  23. DIRECTORY INCREMENT
  24.         
  25.         It doesn't quite end there though. There are a couple more parameters
  26. you should know about. Under Minix itself you can have filenames of at most
  27. 14 characters in length. Minixfs uses this value by default. However there is
  28. a parameter called 'directory increment' which allows you to use longer
  29. filenames. This parameter must be a power of two between 1 and 8 (inclusive)
  30. in other words it can be 1,2,4 or 8. The maximum filename size is given by
  31. the formula maxlength= increment*16 - 2. Thus increments of 1,2,4,8 will
  32. result in maximum filename lengths of 14,30,62 and 126 respectively. However
  33. be advised that every filename whatever length occupies this space, so if you
  34. set the increment to 8 then a filename of length 1 will still use up the same
  35. space in a directory as a filename of length 126. Setting this too high will
  36. slow down directory operations somewhat. 2 is a reasonable value for this
  37. parameter. NB If you use Minix itself then only the default increment (1) is
  38. accessible to Minix; other values will seriously confuse Minix, so if you want
  39. partitions to be accessible to Minix use increment 1 (the default).
  40.  
  41.         The -n option allows you to set the directory increment, follow it by
  42. the increment you want. If this option is not present then a value of one is
  43. assumed.
  44.  
  45. PROTECTION
  46.  
  47.         A couple of options deal with 'protection'. This is a somewhat tricky
  48. subject. Basically protection is a method I use to prevent TOS from writing
  49. to a Minixfs partition when MiNT is not running, if TOS did then the partition
  50. would be damaged (possibly irreparably). If you will always use MiNT and 
  51. Minixfs, or you are absolutely certain you will never write to a Minixfs 
  52. partition without MiNT/Minixfs running then feel free to use no protection at 
  53. all.
  54.  
  55.         However this is rather unlikely so you usually will need some form of
  56. protection. There are currently two methods. Null Disk and other partition ID. 
  57.         
  58.         A Null disk makes TOS think it's root directory is full so it
  59. can't write to a filesystem because it can't create any files.
  60.  
  61.     If Null disk doesn't work then you can try an alternate partition ID.
  62. This only works if you have software with an XHDI version of 1.10 or higher,
  63. if you use the '-t' option to minit you can find out your XHDI version (if any).
  64. The partition ID is a three character identifier for the partition type. TOS
  65. uses GEM and BGM for its filesystems; you can use other types to ensure TOS 
  66. will never access the partition and Minixfs can. There are quite a few problems
  67. though. Not all hard disk software allows the partition ID to be edited. Also
  68. Minixfs can only automatically access other partitions with XHDI compliant
  69. software (see the information provided by the '-t' option). 
  70.  
  71.     If you have XHDI compliant software and you can edit the partition ID
  72. then you can use the ID MIX for Minixfs (you can also use RAW, but I wouldn't
  73. advise it). After altering the ID, reboot and use minit as normal and all should
  74. be OK.
  75.  
  76. OTHER OPTIONS
  77.  
  78.         Normally minit tries to find out the size of a partition by itself,
  79. this can sometimes fail. If it does then you must enter the partition size
  80. (in K) manually with the -b option.
  81.  
  82.         Inodes are part of the filesystem. Every file/directory/symbolic link
  83. on the filesystem uses precisely one inode. If you run out of inodes then you 
  84. can't create any more files/directories/symbolic links without first deleting
  85. some already there. The default number of inodes is a third the partition size
  86. in K. If you want to create more then use the '-i' option followed by the number
  87. you want. You can have at most 65535 inodes on a filesystem. The default will
  88. almost always suffice, but you can increase this if you will need more.
  89.  
  90.         The -S option writes out part of the filesystem called the 'super
  91. block' only. If you accidentally wipe out the start of a partition then this
  92. option may allow some data to be salvaged. If the start of a partition is
  93. wiped out then the partition may not be even recognised as minix, so the -S
  94. option can help under these rare circumstances. Note: you must use exactly the
  95. same pararmeters you used to create the fileystem in the first place.
  96.  
  97.         The -t option is a test option. It does almost everything needed to
  98. create a filesystem without writing anything. It also gives a status report
  99. of any options (e.g. XHDI support) the driver software may have. Use of '-t'
  100. is recommended before actually creating the partition; it wont harm anything.
  101.  
  102. HUGE PARTITIONS
  103.     A *huge* partition is a partition where the logical sector size is
  104. bigger than 1K. In practice this means bigger than 64Mb (or 32Mb with some
  105. partitioning software). Unlike TOS filesystems when you create a Minixfs
  106. filesystem bigger than 64Mb the filesystem is still accessed in 1K blocks.
  107. In this sense if you create a 1 byte file when the logical sector size is
  108. e.g. 4K you use up 1K of the disk not the 8K (2 sectors) TOS filesystems
  109. would use.
  110.  
  111.         If the partition you are creating is huge then you may have some
  112. problems. This is basically down to bugs and inconsistencies in driver
  113. software. I've tried to work around these as much as possible, but I can't
  114. guarantee anything. The rules are explained below, which should help if you 
  115. want to create such a partition and minit complains. Generally minit will
  116. complain if it can't find a work around for your software.
  117.  
  118.         If the drive letter is A-P (inclusive) you should always be OK.  If 
  119. you are using software which conforms to XHDI  then you should also have no
  120. problems (and you might want to set the partition ID to MIX as well). If
  121. neither is the case then you may need to either obtain XHDI compatible disk
  122. software or repartition/reorder (set the ID's so the large partition is on
  123. the first hard drive) to make the large partition drive A-P.
  124.  
  125.     The A-P restriction may be fixed in future versions of Minixfs if there
  126. is any demand (however it is rather tricky to do).
  127.  
  128. RECREATING A TOS PARTITION
  129.  
  130.     If you decide you want to turn a Minixfs partition back into a normal
  131. TOS partition then you can use the '-r' option. This will recreate a blank
  132. TOS filesystem on the partition selected. Certain hard disk software may not
  133. recognise the new filesystem, so always reboot after you use this option.
  134.  
  135. Note: This option only works at present if you created the filesystem with
  136. a newer version of minit. If there is any demand I may add an option for it
  137. to work if the filesystem is older, by 'improvising' a bit.
  138.  
  139.     Some hard disk software (e.g. ICD) and disk tools have an option to
  140. rebuild a single partition without disturbing the others. If you have such
  141. sofware then please use as opposed to the '-r' option. Such software will
  142. probably work under all circumstances (e.g. filesystems made with older minit
  143. versions). The primary reason I added the '-r' option was to allow people
  144. without partition rebuilding software to be saved the effort of reformatting
  145. or repartitioning their hard disks to get a TOS filesystem back.
  146.  
  147. USING MINIT
  148.  
  149.         After all the options must come a drive letter (either case) followed
  150. by a colon. You will then be given a warning, if you type 'y' or 'Y' then the
  151. process continues, otherwise it is aborted. If you are running Minixfs/MiNT
  152. the partition should be instantly recognisable. To check try using 'mfsconf'
  153. and you should get some status info about translation modes (see minixfs.doc).
  154. If you get the message 'drive X: is not minix' then there may be a problem.
  155. Try rebooting, if that doesn't work try recreating a TOS partition (there
  156. should be an option in you hard disk driver sofware to do this) and using
  157. minit without any protection options. If this still fails then your system
  158. hard disk driver software currently cannot use Minixfs partitions. Send me
  159. a report (see the file 'bugs.doc') and I'll see what I can do.
  160.  
  161. WARNING: you should not make the partition you boot from or the partition that
  162. you load MiNT and minix.xfs a Minixfs partition. This is because TOS cannot boot
  163. a Minixfs partition or run MiNT/minix.xfs from a Minixfs partition.
  164.  
  165. EXAMPLES
  166.  
  167. Create a minixfs filesystem on drive A:
  168.  
  169. minit A:
  170.  
  171. Create a V2 filesystem on E:
  172.  
  173. minit -V E:
  174.  
  175. Create a V2 filesystem with increment 2 and null disk protection on drive D: 
  176.  
  177. minit -V -d 2 -P D:
  178.  
  179. Test the disk driver software used to access drive F:
  180.  
  181. minit -t F:
  182.