date and time created 88/10/19 12:09:08 by bostic
[unix-history] / usr / src / usr.sbin / mkproto / mkproto.8
CommitLineData
f25e9191
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
f140d1f2 5.\" @(#)mkproto.8 6.1 (Berkeley) %G%
f25e9191 6.\"
f140d1f2 7.TH MKPROTO 8 ""
f25e9191
KM
8.UC 5
9.SH NAME
10mkproto \- construct a prototype file system
11.SH SYNOPSIS
12.B /etc/mkproto
13special proto
14.SH DESCRIPTION
15.I Mkproto
16is used to bootstrap a new file system.
17First a new file system is created using
18.IR newfs (8).
19.I Mkproto
20is then used to copy files from the old file system into the new
21file system according to the directions found in the prototype file
22.I proto.
23The prototype file
24contains tokens separated by spaces or
25new lines.
26The first tokens comprise the specification
27for the root directory.
28File specifications consist of tokens
29giving the mode,
30the user-id,
31the group id,
32and the initial contents of the file.
33The syntax of the contents field
34depends on the mode.
35.PP
36The mode token for a file is a 6 character string.
37The first character
38specifies the type of the file.
39(The characters
40.B \-bcd
41specify regular, block special,
42character special and directory files
43respectively.)
44The second character of the type
45is either
46.B u
47or
48.B \-
49to specify set-user-id mode or not.
50The third is
51.B g
52or
53.B \-
54for the set-group-id mode.
55The rest of the mode
56is a three digit octal number giving the
57owner, group, and other read, write, execute
58permissions, see
59.IR chmod (1).
60.PP
61Two decimal number
62tokens come after the mode; they specify the
63user and group ID's of the owner of the file.
64.PP
65If the file is a regular file,
66the next token is a pathname
67whence the contents and size are copied.
68.PP
69If the file is a block or character special file,
70two decimal number tokens
71follow which give the major and minor device numbers.
72.PP
73If the file is a directory,
74.I mkproto
75makes the entries
76.BR . ""
77and
78.B ..
79and then
80reads a list of names and
81(recursively)
82file specifications for the entries
83in the directory.
84The scan is terminated with the
85token
86.BR $ .
87.PP
88A sample prototype specification follows:
89.PP
90.nf
91.in +5
92d\-\-777 3 1
93usr d\-\-777 3 1
94 sh \-\-\-755 3 1 /bin/sh
95 ken d\-\-755 6 1
96 $
97 b0 b\-\-644 3 1 0 0
98 c0 c\-\-644 3 1 0 0
99 $
100$
101.in -5
102.fi
103.dt
104.SH "SEE ALSO"
105fs(5),
106dir(5),
107fsck(8),
108newfs(8)
109.SH BUGS
110There should be some way to specify links.
111.PP
112There should be some way to specify bad blocks.
113.PP
114Mkproto can only be run on virgin file systems.
115It should be possible to copy files into existent file systems.