3 mkfs \- make a file system
5 \fBmkfs \fR[\fB\-Ldot\fR] [\fB\-B \fIblocksize\fR] [\fB\-i \fIinodes\fR] [\fB\-b \fIblocks\fR] \fIspecial \fIprototype\fR
20 # Make a listing on standard output
23 # Use mod time of \fImkfs\fR binary for all files
26 # Use a drive other than 0 or 1 (safety precaution)
29 # Do not test if file system fits on the medium
32 # Make a version 1 file system (for backward compatibility)
35 # Number of i-nodes (files)
38 # Filesystem block size (in bytes)
41 # Filesystem size (in blocks)
44 # Extra space after dynamic sizing (blocks and inodes)
47 .B mkfs /dev/fd1 proto
48 # Make a file system on \fI/dev/fd1\fR
50 .B mkfs -b 360 /dev/fd1
51 # Make empty 360 block file system
54 # Alternate way to specify the size
58 builds a file system and copies specified files to it.
59 The prototype file tells which directories and files to copy to it.
60 If the prototype file cannot be opened, and its name is just a string of
61 digits, an empty file system will be made with the specified number of
63 A sample prototype file follows.
64 The text following the \fI#\fR sign in the example below is comment.
65 In real prototype files, comments are not allowed.
68 .ta 0.20i 0.70i 1.10i 3i 3.5i 4i
69 boot # boot block file (ignored)
70 360 63 # blocks and i-nodes
71 d--755 1 1 # root directory
72 bin d--755 \|2 1 # bin dir: mode (755), uid (2), gid (1)
73 sh \|---755 2 1 /user/bin/shell # shell has mode \fIrwxr-xr-x\fP
74 mv -u-755 2 1 /user/bin/mv # u = SETUID bit
75 login -ug755 2 1 /user/bin/login # SETUID and SETGID
77 dev d--755 2 1 # special files: tty (char), fd0 (block)
78 tty c--777 2 1 4 0 # uid=2, gid=1, major=4, minor=0
79 fd0 b--644 2 1 2 0 360 # uid, gid, major, minor, blocks
81 user d--755 12 1 # user dir: mode (755), uid (12), gid (1)
82 ast d--755 12 1 # \fI/user/ast\fP
83 $ # \fI/user/ast\fP is empty
84 $ # end of \fI/user\fP
85 $ # end of root directory
88 The first entry on each line (except the first 3 and the $ lines, which
89 terminate directories) is the name the file or directory will get on the
91 Next comes its mode, with the first character being
92 \fB\-dbcs\fR for regular files, directories, block special files and character
93 special files, symlinks, respectively.
94 The next two characters are used to specify the SETUID and SETGID bits, as
96 The last three characters of the mode are the
100 Following the mode are the uid and gid.
101 For special files, the major and minor devices are needed.
103 The maximum size of a file system is 1 Gb for a version 2 file system,
104 and 64 Mb for a version 1 file system. Alas the 8086
106 runs out of memory on a V2 file system larger than 128 Mb, so for the 8086
109 you have to limit yourself to file systems of that size.