|
|
1.1 root 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 foreigner 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 50.
101: (This corresponds to an average size of
102: three blocks per file.)
103: The boot program is left uninitialized.
104: .s3
105: A sample prototype specification follows:
106: .s3
107: .nf
108: .in +5
109: /usr/mdec/uboot
110: 4872 55
111: d\*-\*-777 3 1
112: usr d\*-\*-777 3 1
113: sh \*-\*-\*-755 3 1 /bin/sh
114: ken d\*-\*-755 6 1
115: $
116: b0 b\*-\*-644 3 1 0 0
117: c0 c\*-\*-644 3 1 0 0
118: $
119: $
120: .in -5
121: .fi
122: .sh "SEE ALSO"
123: file system(V),
124: directory(V),
125: boot procedures(VIII)
126: .sh DIAGNOSTICS
127: There are various diagnostics for
128: syntax errors,
129: inconsistent values,
130: and sizes too small.
131: .sh BUGS
132: It is not possible to initialize a file larger than
133: 64K bytes.
134: .br
135: The size of the file system is restricted to
136: 64K blocks.
137: .br
138: There should be some way to specify links.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.