A USB diskette must be formatted before you can add a file system to it. All other USB mass storage devices just need a PCFS or UFS file system before they can be used. Keep the following key points in mind when formatting a USB device:
Do not use the rmformat -F except on a USB diskette.
If the default slices are not acceptable, use the rmformat -s command to create slices. Use the fdisk utility to partition a USB device, if needed. For step-by-step instructions, see:
How to Modify Partitions and Create a PCFS File System on a USB Mass Storage Device
How to Create a Solaris Partition and Modify the Slices on a USB Mass Storage Device
If the USB device is automatically mounted, you will have to unmount it before you can create a file system on the USB device. Use the rmmount -l command to identify the device nickname and then the rmumount command to unmount the USB device.
Perform steps 4-5 only if you need to format a USB diskette.
Become superuser.
Add the USB device to your system. For information on hot-plugging USB devices, see:
(Optional) Identify the USB device.
For example:
# rmformat Looking for devices... 1. Logical Node: /dev/rdsk/c2t0d0p0 Physical Node: /pci@0,0/pci108e,534a@2,1/hub@7/floppy@1/disk@0,0 Connected Device: MITSUMI USB FDD 1039 Device Type: Floppy drive Bus: USB Size: 1.4 MB Label: <None> Access permissions: Medium is not write protected. |
In this example, the diskette device is c2t0d0p0.
Insert a diskette into the diskette drive, if necessary.
Format the diskette, if necessary.
% rmformat -F long raw-device |
For example, on a SPARC system:
% rmformat -F long /dev/rdsk/c2t0d0s2 |
For example, on an x86 system:
% rmformat -F long /dev/rdsk/c3t0d0p0 |
Determine the file system type and make sure the device is unmounted. Then, select one of the following:
For more information about unmounting a USB device, see How to Mount or Unmount a USB Mass Storage Device.
Create a PCFS file system.
# mkfs -F pcfs -o nofdisk,size=size raw-device |
Specify the -size option in 512-byte blocks.
The following example shows how to create a PCFS file system on a 1.4-Mbyte diskette on a SPARC system:
# mkfs -F pcfs /dev/rdsk/c2t0d0p0 Construct a new FAT file system on /dev/rdsk/c2t0d0p0: (y/n)? y |
The following example shows how to create a PCFS file system on a 1.4-Mbyte diskette on an x86 system:
# mkfs -F pcfs /dev/rdsk/c2t0d0s2 Construct a new FAT file system on /dev/rdsk/c2t0d0s2: (y/n)? y |
The following example shows how to create a PCFS file system on a 100-Mbyte USB memory stick on a SPARC system:
# mkfs -F pcfs /dev/rdsk/c5t0d0s2:c |
The following example shows how to create a PCFS file system on a 100-Mbyte USB memory stick on an x86 system:
# mkfs -F pcfs /dev/rdsk/c5t0d0p0:c |
This command can take several minutes to complete.
Create a UFS file system.
# newfs raw-device |
For example:
# newfs /dev/rdsk/c4t0d0s7 |
Consider using the newfs -f 4096 option or newfs -T option for large USB hard disks.
UFS file system overhead consumes a significant portion of space on a diskette, due to a diskette's limited storage capacity.
See the next two procedures for a detailed example of creating a PCFS file system and modifying slices on a USB mass storage device.