1mkfs_pcfs(1M)           System Administration Commands           mkfs_pcfs(1M)
2
3
4

NAME

6       mkfs_pcfs - construct a FAT file system
7

SYNOPSIS

9       mkfs -F pcfs [generic_options] [-o FSType_specific_options] raw_device_file
10
11

DESCRIPTION

13       The  pcfs-specific  module  of  mkfs constructs a File Allocation Table
14       (FAT) on removable media (diskette, JAZ disk, ZIP disk, PCMCIA card), a
15       hard disk, or a file (see NOTES). FATs are the standard MS-DOS and Win‐
16       dows file system format. Note that you can use fdformat(1) to construct
17       a FAT file system only on a diskette or PCMCIA card.
18
19
20       mkfs  for  pcfs determines an appropriate FAT size for the medium, then
21       it installs an initial boot sector and an empty FAT. A sector  size  of
22       512  bytes  is used. mkfs for pcfs can also install the initial file in
23       the file system (see the pcfs-specific -o i option).  This  first  file
24       can optionally be marked as read-only, system, and/or hidden.
25
26
27       If  you  want to construct a FAT with mkfs for pcfs on a medium that is
28       not formatted, you must first perform a low-level format on the  medium
29       with  fdformat(1) or format(1M). Non-diskette media must also be parti‐
30       tioned with the fdisk(1M) utility. Note that all existing data  on  the
31       diskette or disk partition, if any, is destroyed when a new FAT is con‐
32       structed.
33
34
35       generic_options are supported by the generic mkfs command. See mkfs(1M)
36       for a description of these options.
37
38
39       raw_device_file  indicates the device on which to write unless the -o N
40       option has been specified, or if the  -V  or  -m  generic  options  are
41       passed from the generic mkfs module.
42

OPTIONS

44       See mkfs(1M) for the list of supported generic options.
45
46
47       The following options are supported:
48
49       -o FSType_specific_options    Specify pcfs file system-specific options
50                                     in a comma-separated list with no  inter‐
51                                     vening  spaces.  If  invalid  options are
52                                     specified, a warning message  is  printed
53                                     and the invalid options are ignored.
54
55                                     b=label       Label the media with volume
56                                                   label. The volume label  is
57                                                   restricted  to 11 uppercase
58                                                   characters.
59
60
61                                     B=filename    Install  filename  as   the
62                                                   boot  loader  in  the  file
63                                                   system's  boot  sector.  If
64                                                   you  don't  specify  a boot
65                                                   loader,  an   MS-DOS   boot
66                                                   loader  is  installed.  The
67                                                   MS-DOS boot loader requires
68                                                   specific    MS-DOS   system
69                                                   files to make the  diskette
70                                                   bootable.   See  NOTES  for
71                                                   more information.
72
73
74                                     fat=n         The size of  a  FAT  entry.
75                                                   Currently,  12,  16, and 32
76                                                   are   valid   values.   The
77                                                   default     is    12    for
78                                                   diskettes,  16  for  larger
79                                                   media.
80
81
82                                     h             Mark    the    first   file
83                                                   installed as a hidden file.
84                                                   The  -i option must also be
85                                                   specified.
86
87
88                                     hidden=n      Set the  number  of  hidden
89                                                   sectors  to  n. This is the
90                                                   number of  sectors  on  the
91                                                   physical disk preceding the
92                                                   start of the volume  (which
93                                                   is the boot sector itself).
94                                                   This  defaults  to  0   for
95                                                   diskettes   or  a  computed
96                                                   valued (based on the  fdisk
97                                                   table)   for   disks.  This
98                                                   option may be used only  in
99                                                   conjunction     with    the
100                                                   nofdisk option.
101
102
103                                     i=filename    Install  filename  as   the
104                                                   initial  file  in  the  new
105                                                   file  system.  The  initial
106                                                   file's contents are guaran‐
107                                                   teed to occupy  consecutive
108                                                   clusters  at  the  start of
109                                                   the files area. When creat‐
110                                                   ing  bootable media, a boot
111                                                   program should be specified
112                                                   as the initial file.
113
114
115                                     nofdisk       Do  not  attempt to find an
116                                                   fdisk table on the  medium.
117                                                   Instead  rely  on  the size
118                                                   option for determining  the
119                                                   partition size. By default,
120                                                   the created FAT is 16  bits
121                                                   and  begins  at  the  first
122                                                   sector of the device.  This
123                                                   origination  sector  can be
124                                                   modified  with  the  hidden
125                                                   option (-h).
126
127
128                                     nsect=n       The  number  of sectors per
129                                                   track on the disk.  If  not
130                                                   specified,   the  value  is
131                                                   determined   by   using   a
132                                                   dkio(7I)  ioctl  to get the
133                                                   disk  geometry,   or   (for
134                                                   diskette)  from the results
135                                                   of an FDIOGCHAR ioctl.
136
137
138                                     ntrack=n      The number  of  tracks  per
139                                                   cylinder  on  the  disk. If
140                                                   not specified, the value is
141                                                   determined   by   using   a
142                                                   dkio(7I) ioctl to  get  the
143                                                   disk   geometry,   or  (for
144                                                   diskette) from the  results
145                                                   of an FDIOGCHAR ioctl.
146
147
148                                     N             No  execution  mode.  Print
149                                                   normal output, but  do  not
150                                                   actually   write  the  file
151                                                   system to the medium.  This
152                                                   is most useful when used in
153                                                   conjunction with  the  ver‐
154                                                   bose option.
155
156
157                                     r             Mark    the    first   file
158                                                   installed as read-only. The
159                                                   -i   option  must  also  be
160                                                   specified.
161
162
163                                     reserve=n     Set the number of  reserved
164                                                   sectors  to  n. This is the
165                                                   number of  sectors  in  the
166                                                   volume, preceding the start
167                                                   of the first FAT, including
168                                                   the  boot sector. The value
169                                                   should always be  at  least
170                                                   1, and the default value is
171                                                   exactly 1.
172
173
174                                     s             Mark   the    first    file
175                                                   installed as a system file.
176                                                   The -i option must also  be
177                                                   specified.
178
179
180                                     size=n        The  number  of  sectors in
181                                                   the  file  system.  If  not
182                                                   specified,   the  value  is
183                                                   determined from the size of
184                                                   the  partition given in the
185                                                   fdisk   table    or    (for
186                                                   diskette)  by way of compu‐
187                                                   tation using the  FDIOGCHAR
188                                                   ioctl.
189
190
191                                     spc=n         The  size of the allocation
192                                                   unit for space  within  the
193                                                   file system, expressed as a
194                                                   number  of   sectors.   The
195                                                   default  value  depends  on
196                                                   the FAT entry size and  the
197                                                   size of the file system.
198
199
200                                     v             Verbose  output.  Describe,
201                                                   in detail, operations being
202                                                   performed.
203
204
205

FILES

207       raw_device_file    The  device  on  which  to build the FAT. The device
208                          name  for  a   diskette   must   be   specified   as
209                          /dev/rdiskette0  for  the  first  diskette drive, or
210                          /dev/rdiskette1 for a  second  diskette  drive.  For
211                          non-diskette media, a disk device name must be qual‐
212                          ified with a suffix to indicate  the  proper  parti‐
213                          tion. For example, in the name /dev/rdsk/c0t0d0p0:c,
214                          the :c suffix indicates that the first partition  on
215                          the disk should receive the new FAT.
216
217                          For a file, raw_device_file is the block device name
218                          returned by lofiadm(1M).
219
220

EXAMPLES

222       The media in these examples must be formatted before running  mkfs  for
223       pcfs. See DESCRIPTION for more details.
224
225       Example 1 Creating a FAT File System on a Diskette
226
227
228       The following command creates a FAT file system on a diskette:
229
230
231         mkfs -F pcfs /dev/rdiskette
232
233
234
235       Example 2 Creating a FAT File System on a Disk
236
237
238       The  following  command  creates  a FAT file system on the second fdisk
239       partition of a disk attached to an x86 based system:
240
241
242         mkfs -F pcfs /dev/rdsk/c0d0p0:d
243
244
245
246       Example 3 Creating a FAT File System on a ZIP Disk
247
248
249       The following command creates a FAT file system on a ZIP  disk  located
250       on a SPARC based system:
251
252
253         mkfs -F pcfs /dev/rdsk/c0t4d0s2:c
254
255
256
257       Example 4 Creating a FAT File System on a JAZ Disk
258
259
260       The  following  command creates a FAT file system on a JAZ disk located
261       on  a  SPARC  based  system  and  overrides   the   sectors/track   and
262       tracks/cylinder values obtained from the device's controller:
263
264
265         mkfs -F pcfs -o nsect=32,ntrack=64 /dev/rdsk/c0t3d0s2:c
266
267
268

ATTRIBUTES

270       See attributes(5) for descriptions of the following attributes:
271
272
273
274
275       ┌─────────────────────────────┬─────────────────────────────┐
276       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
277       ├─────────────────────────────┼─────────────────────────────┤
278       │Availability                 │SUNWesu                      │
279       ├─────────────────────────────┼─────────────────────────────┤
280       │Interface Stability          │Stable                       │
281       └─────────────────────────────┴─────────────────────────────┘
282

SEE ALSO

284       fdformat(1),     fdisk(1M),    format(1M),    lofiadm(1M),    mkfs(1M),
285       attributes(5), fd(7D), dkio(7I), fdio(7I)
286

NOTES

288       The default MS-DOS boot loader, which is installed by default if  -o  B
289       is  not  specified,  requires  specific MS-DOS system files to make the
290       diskette bootable. These MS-DOS files are not installed when you format
291       a  diskette  with  mkfs for pcfs, which makes a diskette formatted this
292       way not bootable. Trying to boot from it on an x86  based  system  will
293       result in the following message:
294
295         Non-System disk or disk error
296         Replace and strike any key when ready
297
298
299
300
301       You  must  format a diskette with the DOS format command to install the
302       specific MS-DOS system files required by the default boot loader.
303
304
305       You can use lofiadm to create a file that appears  to  a  mkfs  command
306       (for  example, mkfs_pcfs or mkfs_ufs) as a raw device. You can then use
307       a mkfs command to create a file system on that device. See  lofiadm(1M)
308       for  examples  of creating a UFS and a PC (FAT) file system on a device
309       created by lofiadm.
310
311
312
313SunOS 5.11                        1 Dec 2003                     mkfs_pcfs(1M)
Impressum