home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man8 / mkfs.8 < prev    next >
Encoding:
Text File  |  1975-06-26  |  3.0 KB  |  137 lines

  1. .th MKFS VIII 11/1/73
  2. .sh NAME
  3. mkfs \*- construct a file system
  4. .sh SYNOPSIS
  5. .bd /etc/mkfs
  6. special
  7. proto
  8. .sh DESCRIPTION
  9. .it Mkfs
  10. constructs a file system
  11. by writing on the special file
  12. .it special
  13. according to the directions
  14. found in
  15. the prototype file
  16. .it proto.
  17. The prototype file
  18. contains tokens separated by spaces or
  19. new lines.
  20. The first token is the name of a file
  21. to be copied onto block zero as
  22. the bootstrap program
  23. (see boot procedures (VIII)).
  24. The second token is a number specifying the
  25. size of the created file system.
  26. Typically it will be the number of blocks on the device,
  27. perhaps diminished
  28. by space for swapping.
  29. The next token is the i-list size in blocks
  30. (remember there are 16 i-nodes per block).
  31. The next set of tokens comprise the specification
  32. for the root file.
  33. File specifications consist of tokens
  34. giving the mode,
  35. the user-id,
  36. the group id,
  37. and the initial contents of the file.
  38. The syntax of the contents field
  39. depends on the mode.
  40. .s3
  41. The mode token for a file is a 6 character string.
  42. The first character
  43. specifies the type of the file.
  44. (The characters
  45. .bd \*-bcd
  46. specify regular, block special,
  47. character special and directory files
  48. respectively.)
  49. The second character of the type
  50. is either
  51. .bd u
  52. or
  53. .bd \*-
  54. to specify set-user-id mode or not.
  55. The third is
  56. .bd g
  57. or
  58. .bd \*-
  59. for the set-group-id mode.
  60. The rest of the mode
  61. is a three digit octal number giving the
  62. owner, group, and other read, write, execute
  63. permissions (see
  64. .it chmod
  65. (I)).
  66. .s3
  67. Two decimal number
  68. tokens come after the mode; they specify the
  69. user and group ID's of the owner of the file.
  70. .s3
  71. If the file is a regular file,
  72. the next token is a pathname
  73. whence the contents and size are copied.
  74. .s3
  75. If the file is a block or character special file,
  76. two decimal number tokens
  77. follow which give the major and minor device numbers.
  78. .s3
  79. If the file is a directory,
  80. .it mkfs
  81. makes the entries \fB.\fR and \fB..\fR
  82. and then
  83. reads a list of names and
  84. (recursively)
  85. file specifications for the entries
  86. in the directory.
  87. The scan is terminated with the
  88. token \fB$\fR.
  89. .s3
  90. If the prototype file cannot be opened and
  91. its name consists of a string of digits,
  92. .it mkfs
  93. builds a file system with a single
  94. empty directory on it.
  95. The size of the file system is the value
  96. of
  97. .it proto
  98. interpreted as a decimal number.
  99. The i-list size is the file system size
  100. divided by
  101. 43 plus the size divided by 1000.
  102. (This corresponds to an average size of
  103. three blocks per file
  104. for a 4000 block file system and
  105. six blocks per file at 40,000.)
  106. The boot program is left uninitialized.
  107. .s3
  108. A sample prototype specification follows:
  109. .s3
  110. .nf
  111. .in +5
  112. /usr/mdec/uboot
  113. 4872 55
  114. d\*-\*-777 3 1
  115. usr    d\*-\*-777 3 1
  116.     sh    \*-\*-\*-755 3 1 /bin/sh
  117.     ken    d\*-\*-755 6 1
  118.         $
  119.     b0    b\*-\*-644 3 1 0 0
  120.     c0    c\*-\*-644 3 1 0 0
  121.     $
  122. $
  123. .in -5
  124. .fi
  125. .sh "SEE ALSO"
  126. file system (V),
  127. directory (V),
  128. boot procedures (VIII)
  129. .sh BUGS
  130. It is not possible to initialize a file larger than
  131. 64K bytes.
  132. .br
  133. The size of the file system is restricted to
  134. 64K blocks.
  135. .br
  136. There should be some way to specify links.
  137.