1rmformat(1)                      User Commands                     rmformat(1)
2
3
4

NAME

6       rmformat - removable rewritable media format utility
7

SYNOPSIS

9       rmformat [-DeHUv] [-b label] [-c blockno]
10            [-Fquick | long | force ] [-s filename] [devname]
11
12
13       rmformat -V read | write devname
14
15
16       rmformat -l [devname]
17
18

DESCRIPTION

20       The  rmformat  utility is used to format, label, partition, and perform
21       other miscellaneous  functions  on  removable,  rewritable  media  that
22       include  floppy drives, and the PCMCIA memory and ata cards. The rmfor‐
23       mat utility should also be  used with all  USB  mass  storage  devices,
24       including  USB hard drives. This utility can also be used for the veri‐
25       fication and surface analysis and for repair of the bad  sectors  found
26       during  verification if the drive or the driver supports bad block man‐
27       agement.
28
29
30       After formatting, rmformat writes the  label,  which  covers  the  full
31       capacity of the media as one slice on floppy and PCMCIA memory cards to
32       maintain compatibility with the behavior  of  fdformat.  The  partition
33       information  can  be changed with the help of other options provided by
34       rmformat.
35

OPTIONS

37       The following options are supported:
38
39       -b label
40
41           Labels the media with a SUNOS label. A SUNOS volume label  name  is
42           restricted  to  8  characters. For media size greater than 1 TB, an
43           EFI label is created. For writing a  DOS  Volume  label,  the  user
44           should use mkfs_pcfs(1M).
45
46
47       -c blockno
48
49           Corrects  and  repairs  the  given  block.  This correct and repair
50           option may not be applicable to all devices supported by  rmformat,
51           as some devices may have a drive with bad block management capabil‐
52           ity and others may have this option implemented in the  driver.  If
53           the drive or driver supports bad block management, a best effort is
54           made to rectify the bad block. If the bad  block  still  cannot  be
55           rectified,  a  message  is  displayed  to  indicate  the failure to
56           repair. The block number can be  provided  in  decimal,  octal,  or
57           hexadecimal format.
58
59           The  normal  floppy  and PCMCIA memory and ata cards do not support
60           bad block management.
61
62
63       -D
64
65           Formats a 720KB (3.5 inch) double density  diskette.  This  is  the
66           default  for  double  density type drives. This option is needed if
67           the drive is a high or extended-density type.
68
69
70       -e
71
72           Ejects the media upon completion. This feature may not be available
73           if the drive does not support motorized eject.
74
75
76       -F quick | long | force
77
78           Formats the media.
79
80           The  quick  option  starts a format without certification or format
81           with limited certification of certain tracks on the media.
82
83           The long option starts a complete format.  For  some  devices  this
84           might  include  the  certification  of the whole media by the drive
85           itself.
86
87           The force option to format is provided to start a long format with‐
88           out user confirmation before the format is  started.
89
90           In  legacy  media  such  as floppy drives, all options start a long
91           format depending on the mode (Extended Density mode,  High  Density
92           mode,  or Double Density mode) with which the floppy drive operates
93           by default. On PCMCIA memory cards, all options start a  long  for‐
94           mat.
95
96
97       -H
98
99           Formats  a  1.44  MB  (3.5 inch) high density diskette. This is the
100           default for high density type drives. It is needed if the drive  is
101           the Extended Density type.
102
103
104       -l
105
106           Lists  all  removable  devices.  By  default,  without any options,
107           rmformat also lists all  removable  devices.  If  the  dev_name  is
108           given,  rmformat lists the device associated with the dev_name. The
109           output shows the  device  pathname,  vendor  information,  and  the
110           device type.
111
112
113       -s filename
114
115           Enables  the user to lay out the partition information in the SUNOS
116           label.
117
118           The user should provide a file as input with information about each
119           slice  in  a format providing byte offset, size required, tags, and
120           flags, as follows:
121
122             slices: n = offset, size [, flags, tags]
123
124
125           where n is the slice number, offset is the byte offset at which the
126           slice  n  starts,  and  size is the required size for slice n. Both
127           offset and size must be a multiple of 512 bytes. These numbers  can
128           be represented as decimal, hexadecimal, or octal numbers. No float‐
129           ing point numbers are accepted. Details  about  maximum  number  of
130           slices  can be obtained from the System Administration Guide: Basic
131           Administration.
132
133           To specify the size or offset in  kilobytes,  megabytes,  or  giga‐
134           bytes,  add  KB, MB, GB, respectively. A number without a suffix is
135           assumed to be a byte offset. The flags are represented as follows:
136
137             wm = read-write, mountable
138             wu = read-write, unmountable
139             ru = read-only, unmountable
140
141
142           The tags are represented as follows: unassigned, boot, root,  swap,
143           usr, backup, stand, var, home, alternates.
144
145           The  tags  and  flags can be omitted from the four tuple when finer
146           control on those values is not required. It  is  required  to  omit
147           both  or  include  both. If the tags and flags are omitted from the
148           four tuple for a particular slice, a  default  value  for  each  is
149           assumed.  The  default  value for flags is wm and for tags is unas‐
150           signed.
151
152           Either full tag names can be provided or an  abbreviation  for  the
153           tags  can  be  used. The abbreviations can be the first two or more
154           letters from the standard tag names. rmformat is  case  insensitive
155           in handling the defined tags & flags.
156
157           Slice specifications are separated by :
158
159           For example:
160
161             slices: 0 = 0, 30MB, "wm", "home" :
162                     1 = 30MB, 51MB :
163                     2 = 0, 100MB, "wm", "backup" :
164                     6 = 81MB, 19MB
165
166
167           rmformat does the necessary checking to detect any overlapping par‐
168           titions or illegal requests to addresses beyond the capacity of the
169           media  under consideration. There can be only one slice information
170           entry for each slice n. If multiple slice information  entries  for
171           the same slice n are provided, an appropriate error message is dis‐
172           played. The slice 2 is the backup slice  covering  the  whole  disk
173           capacity.  The  pound  sign character, #, can be used to describe a
174           line of comments in the input file. If the line starts with #, then
175           rmformat  ignores  all  the characters following # until the end of
176           the line.
177
178           Partitioning some of the media with very small capacity is  permit‐
179           ted, but be cautious in using this option on such devices.
180
181
182       -U
183
184           Performs   umount  on  any  file  systems  and  then  formats.  See
185           mount(1M). This option unmounts all the mounted slices and issues a
186           long format on the device requested.
187
188
189       -V read | write
190
191           Verifies  each  block of media after format. The write verification
192           is a destructive mechanism. The user is  queried  for  confirmation
193           before  the verification is started. The output of this option is a
194           list of block numbers, which are identified as bad.
195
196           The read verification only  verifies  the  blocks  and  report  the
197           blocks which are prone to errors.
198
199           The  list of block numbers displayed can be used with the -c option
200           for repairing.
201
202

OPERANDS

204       The following operand is supported:
205
206       devname
207
208           devname can be provided as absolute  device  pathname  or  relative
209           pathname  for  the device from the current working directory or the
210           nickname, such as cdrom or rmdisk.
211
212           For floppy devices, to access the first drive  use  /dev/rdiskette0
213           (for  systems  without  volume  management) or floppy0 (for systems
214           with volume management). Specify /dev/rdiskette1 (for systems with‐
215           out  volume management) or floppy1 (for systems with volume manage‐
216           ment) to use the second drive.
217
218           For systems without volume management running, the  user  can  also
219           provide  the  absolute device pathname as /dev/rdsk/c?t?d?s? or the
220           appropriate relative  device  pathname  from  the  current  working
221           directory.
222
223

EXAMPLES

225       Example 1 Formatting a Diskette
226
227         example$ rmformat -F quick /dev/rdiskette
228         Formatting will erase all the data on disk.
229         Do you want to continue? (y/n)y
230
231
232
233       Example 2 Formatting a Diskette for a UFS File System
234
235
236       The following example formats a diskette and creates a UFS file system:
237
238
239         example$ rmformat -F quick /dev/aliases/floppy0
240         Formatting will erase all the data on disk.
241         Do you want to continue? (y/n)y
242         example$ su
243         # /usr/sbin/newfs /dev/aliases/floppy0
244         newfs: construct a new file system /dev/rdiskette: (y/n)? y
245         /dev/rdiskette: 2880 sectors in 80 cylinders of 2 tracks, 18 sectors
246                  1.4MB in 5 cyl groups (16 c/g, 0.28MB/g, 128 i/g)
247          super-block backups (for fsck -F ufs -o b=#) at:
248           32, 640, 1184, 1792, 2336,
249         #
250
251
252
253       Example 3 Formatting Removable Media for a PCFS File System
254
255
256       The following example shows how to create an alternate fdisk partition:
257
258
259         example$ rmformat -F quick /dev/rdsk/c0t4d0s2:c
260         Formatting will erase all the data on disk.
261         Do you want to continue? (y/n)y
262         example$ su
263         # fdisk /dev/rdsk/c0t4d0s2:c
264         # mkfs -F pcfs /dev/rdsk/c0t4d0s2:c
265         Construct a new FAT file system on /dev/rdsk/c0t4d0s2:c: (y/n)? y
266         #
267
268
269
270
271       The  following example describes how to create a PCFS file system with‐
272       out an fdisk partition:
273
274
275         example$ rmformat -F quick /dev/rdiskette
276         Formatting will erase all the data on disk.
277         Do you want to continue? (y/n)y
278         example$ su
279         # mkfs -F pcfs -o nofdisk,size=2 /dev/rdiskette
280         Construct a new FAT file system on /dev/rdiskette: (y/n)? y
281         #
282
283
284
285       Example 4 Listing All Removable Devices
286
287
288       The following example shows how to list removable devices. This  output
289       shows a long listing of such devices.
290
291
292         example$ rmformat -l
293         Looking for devices...
294         Logical Node: /dev/rdsk/c5t0d0s2
295         Physical Node: /pci@1e,600000/usb@b/hub@2/storage@4/disk@0,0
296         Connected Device: TEAC    FD-05PUB         1026
297         Device Type: Floppy drive
298         Bus: USB
299         Size: 1.4 MB
300         Label: floppy
301         Access permissions: Medium is not write protected.
302
303
304

FILES

306       /dev/diskette0
307
308           Directory  providing  block  device  access for the media in floppy
309           drive 0.
310
311
312       /dev/rdiskette0
313
314           Directory providing character device access for the media in floppy
315           drive 0.
316
317
318       /dev/aliases
319
320           Directory providing symbolic links to the character devices for the
321           different media under the control of volume management using appro‐
322           priate alias.
323
324
325       /dev/aliases/floppy0
326
327           Symbolic link to the character device for the media in floppy drive
328           0.
329
330
331       /dev/rdiskette
332
333           Symbolic link providing character device access for  the  media  in
334           the primary floppy drive, usually drive 0.
335
336
337       /dev/dsk
338
339           Directory  providing  block device access for the PCMCIA memory and
340           ata cards and removable media devices.
341
342
343       /dev/rdsk
344
345           Directory providing character device access for the  PCMCIA  memory
346           and ata cards and removable media devices.
347
348
349       /dev/aliases/pcmemS
350
351           Symbolic link to the character device for the PCMCIA memory card in
352           socket S, where S represents a PCMCIA socket number.
353
354
355       /dev/aliases/rmdisk0
356
357           Symbolic link to the generic removable media device that is  not  a
358           CD-ROM, floppy, DVD-ROM, PCMCIA memory card, and so forth.
359
360
361       /dev/rdsk
362
363           Directory  providing  character device access for the PCMCIA memory
364           and ata cards and other removable devices.
365
366
367       /dev/dsk
368
369           Directory providing block device access for the PCMCIA  memory  and
370           ata cards and other removable media devices.
371
372

ATTRIBUTES

374       See attributes(5) for descriptions of the following attributes:
375
376
377
378
379       ┌─────────────────────────────┬─────────────────────────────┐
380       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
381       ├─────────────────────────────┼─────────────────────────────┤
382       │Availability                 │SUNWrmvolmgr                 │
383       └─────────────────────────────┴─────────────────────────────┘
384

SEE ALSO

386       cpio(1),  eject(1),  fdformat(1),  tar(1),  volcheck(1), volrmmount(1),
387       format(1M),   mkfs_pcfs(1M),   mount(1M),    newfs(1M),    prtvtoc(1M),
388       rmmount(1M),  rpc.smserverd(1M),  attributes(5),  scsa2usb(7D), sd(7D),
389       pcfs(7FS), udfs(7FS)
390
391
392       System Administration Guide: Basic Administration
393

NOTES

395       A rewritable media or PCMCIA memory card or PCMCIA ata card  containing
396       a  ufs file system created on a SPARC-based system (using newfs(1M)) is
397       not identical to a rewritable media or PCMCIA memory card containing  a
398       ufs  file system created on an x86 based system. Do not interchange any
399       removable media containing ufs between these platforms; use cpio(1)  or
400       tar(1) to transfer files on diskettes or memory cards between them. For
401       interchangeable filesystems refer to pcfs(7FS) and udfs(7FS).
402
403
404       rmformat might not list all removable devices in  virtualization  envi‐
405       ronments.
406

BUGS

408       Currently,  bad  sector mapping is not supported on floppy diskettes or
409       PCMCIA memory cards. Therefore, a diskette or memory card  is  unusable
410       if rmformat finds an error (bad sector).
411
412
413
414SunOS 5.11                        19 Feb 2009                      rmformat(1)
Impressum