Managing Devices in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

How to Modify Partitions and Create a PCFS File System on a USB Mass Storage Device

The following steps describe how to delete an existing partition, create a new partition, and then create a PCFS file system on the USB device. Make sure you backup any data before you perform this task.

  1. Become an administrator.
  2. Modify the partitions as follows:
    1. Start the fdisk utility.
      # fdisk device
    2. On the interactive interface that is displayed, choose the appropriate options for the following actions as prompted.
      • Delete the partition.

      • Specify the partition number to delete.

      • Create the partition.

      • Select the partition type to create.

      • Specify the percentage of disk space to use for the partition.

      • Specify whether the new partition will be active or inactive.

      • Choose to update the disk configuration and exit.

  3. Unmount the device, if necessary.

    For more information about unmounting a USB device, see How to Mount or Unmount a USB Mass Storage Device.

  4. Create the PCFS file system on this partition.
    # mkfs -F FS-type -o FS-type-specific-option raw-device-file
    
Example 13-1  Modifying the Partitions of a USB Diskette

In the following example, the disk configuration of c3t0d0p0 is modified, starting with the creation of a new partition.

# fdisk /dev/rdsk/c3t0d0p0
      Total disk size is 29 cylinders
Cylinder size is 2048 (512 byte) blocks

Cylinders
Partition   Status    Type          Start   End   Length    %
=========   ======    ============  =====   ===   ======   ===
1       Active    Solaris2          1    28      28     97

SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Enter Selection: 3Partition will be deleted.


      Total disk size is 29 cylinders
Cylinder size is 2048 (512 byte) blocks

Cylinders
Partition   Status    Type          Start   End   Length    %
=========   ======    ============  =====   ===   ======   ===
1       Active    Solaris2          1    28      28     97

SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Specify the partition number to delete (or enter 0 to exit): 1Partition number to delete.

Partition deleted.Deletion is completed.


      Total disk size is 29 cylinders
Cylinder size is 2048 (512 byte) blocks

Cylinders
Partition   Status    Type          Start   End   Length    %
=========   ======    ============  =====   ===   ======   ===

WARNING: no partitions are defined!

SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Enter Selection: 1Partition will be created.


      Total disk size is 29 cylinders
Cylinder size is 2048 (512 byte) blocks

Cylinders
Partition   Status    Type          Start   End   Length    %
=========   ======    ============  =====   ===   ======   ===

WARNING: no partitions are defined!

SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Select the partition type to create:
1=SOLARIS2  2=UNIX        3=PCIXOS     4=Other
5=DOS12     6=DOS16       7=DOSEXT     8=DOSBIG
9=DOS16LBA  A=x86 Boot    B=Diagnostic C=FAT32
D=FAT32LBA  E=DOSEXTLBA   F=EFI        0=Exit? cPartition type is selected.


       Total disk size is 29 cylinders
Cylinder size is 2048 (512 byte) blocks

Cylinders
Partition   Status    Type          Start   End   Length    %
=========   ======    ============  =====   ===   ======   ===

WARNING: no partitions are defined!

SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Select the partition type to create:
Specify the percentage of disk to use for this partition (or type "c" to
specify the size in cylinders). 100Percentage of disk space is specified.


              Total disk size is 29 cylinders
Cylinder size is 2048 (512 byte) blocks

Cylinders
Partition   Status    Type          Start   End   Length    %
=========   ======    ============  =====   ===   ======   ===

WARNING: no partitions are defined!

SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Select the partition type to create:
Should this become the active partition? If yes, it  will be activated
each time the computer is reset or turned on.
Please type "y" or "n". nInactive partition is selected.


      Total disk size is 29 cylinders
Cylinder size is 2048 (512 byte) blocks

Cylinders
Partition   Status    Type          Start   End   Length    %
=========   ======    ============  =====   ===   ======   ===
1                 Win95 FAT32       1    28      28     97

SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Enter Selection: 5Disk configuration will be updated.

# mkfs -F pcfs -o fat=32 /dev/rdsk/c3t0d0p0:c
Construct a new FAT file system on /dev/rdsk/c3t0d0p0:c: (y/n)? yFile system is created.