Use this procedure to add a file system to a USB mass storage device with removable media services disabled.
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 diskette:
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:
Perform steps 7–8 only if you need to format a USB diskette.
Become superuser.
For information on disabling removable media services, see How to Disable or Enable Removable Media Services.
Verify that removable media services are not running.
# svcs volfs STATE STIME FMRI disable 10:39:12 svc:/system/filesystem/volfs:default |
Add the USB device to your system.
For information on hot-plugging USB devices, see:
(Optional) Identify the USB device.
The following example identifies a USB diskette device.
# cd /dev/rdsk # ls -l c*0 | grep usb lrwxrwxrwx 1 root root 55 Mar 5 10:35 c2t0d0s0 -> ../../devices/pci@1f,0/usb@c,3/storage@3/disk@0,0:a,raw |
In this example, the diskette device is c2t0d0s0.
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 select one of the following:
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-MB diskette on a SPARC system:
# mkfs -F pcfs -o nofdisk,size=2880 /dev/rdsk/c4t0d0s2 |
The following example shows how to create a PCFS file system on a 1.4-MB diskette on an x86 system:
# mkfs -F pcfs -o nofdisk,size=2880 /dev/rdsk/c4t0d0p0 |
The following example shows how to create a PCFS file system on a 100-MB 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-MB 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.