系统管理指南:设备和文件系统

Procedure如何在不运行 vold 的情况下在 USB 海量存储设备中修改分区和创建 PCFS 文件系统

以下步骤介绍如何删除现有分区,创建新分区,然后在 USB 设备中创建 PCFS 文件系统。执行此任务之前,请确保先备份所有数据。

  1. 成为超级用户。

  2. 启动 fdisk 实用程序。

    例如:


    # fdisk /dev/rdsk/c3t0d0p0
    
  3. 通过选择选项 3 来删除分区。

    例如:


          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: 3
    
  4. 选择要删除的分区号。

    例如:


          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): 1
    
    
    
    Partition deleted.
  5. 创建分区。

    例如:


          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: 1
    
  6. 选择 FAT32 分区类型。


          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? c
    
  7. 指定此分区所使用的磁盘百分比。


           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). 100
    
  8. 选择新分区应为活动分区还是非活动分区。


                  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". n
    
  9. 更新磁盘配置并退出。


          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: 5
    
  10. 在此分区中创建 PCFS 文件系统。

    例如:


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