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

Procedurex86: 如何创建 Solaris fdisk 分区

开始之前

如果需要有关 fdisk 分区的信息,请参见x86: fdisk 分区创建准则

  1. 成为超级用户或承担等效角色。

  2. 调用 format 实用程序。


    # format
    

    将显示可用磁盘的编号列表。

    有关更多信息,请参见 format(1M)

  3. 键入要创建 Solaris fdisk 分区的磁盘的编号。


    Specify disk (enter its number): disk-number
    

    其中 disk-number 是要创建 Solaris fdisk 分区的磁盘的编号。

  4. 选择 fdisk 菜单。


    format> fdisk
    

    所显示的 fdisk 菜单取决于磁盘上是否已存在fdisk 分区。使用下表确定下一步操作。

    任务 

    请转至 

    更多信息 

    创建一个跨整个磁盘的 Solaris fdisk 分区。

    步骤 5 

    示例 14–1

    创建一个 Solaris fdisk 分区,并保留一个或多个现有的非 Solaris fdisk 分区。

    步骤 6 

    示例 14–2

    创建一个 Solaris fdisk 分区以及一个或多个其他非 Solaris fdisk 分区。

    步骤 6 

    示例 14–3

  5. 通过在提示符下指定 y,创建并激活跨整个磁盘的 Solaris fdisk 分区。然后,转至步骤 13。


    No fdisk table exists. The default partition for the disk is:
    
    
    
    a 100% "SOLARIS System" partition
    
    
    
    Type "y" to accept the default partition, otherwise type "n" to edit the
    
    partition table.
    
    y
    
  6. 如果不希望 Solaris fdisk 分区占满整个磁盘,请在提示符下指定 n


    Type "y" to accept the default partition, otherwise type "n" to edit the
    
     partition table.
    
    n
    
                 Total disk size is 3498 cylinders
    
                 Cylinder size is 1199 (512 byte) blocks
    
                                             Cylinders
    
        Partition   Status    Type      Start   End   Length    %
    
        =========   ======    ========  =====   ===   ======   ===
    
    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:
  7. 选择选项 1 (Create a partition) 以创建 fdisk 分区。


    Enter Selection: 1
    
  8. 通过选择 1(=Solaris2) 创建 Solaris fdisk 分区。


    Indicate the type of partition you want 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? 1
    
  9. 确定要为 Solaris fdisk 分区保留的磁盘百分比。计算此百分比时,请牢记任何现有 fdisk 分区的大小。


    Specify the percentage of disk to use for this partition
    
    (or type "c" to specify the size in cylinders). nn
    
  10. 通过在提示符下键入 y,激活 Solaris fdisk 分区。


    Should this to become the active partition? If yes, it will be 
    
    activated each time the computer is reset or turned on.
    
    Please type "y" or "n". y
    

    激活 fdisk 分区后,将显示提示 Enter Selection

  11. 选择选项 1 Create a partition 以创建另一个 fdisk 分区。

    有关创建 fdisk 分区的说明,请参见步骤 8–10。

  12. 更新磁盘配置,然后从 selection 菜单退出 fdisk 菜单。


    Selection: 5 
    
  13. 使用 label 命令重新标记磁盘。


    format> label
    
    Ready to label disk, continue? yes
    
    format> 
  14. 退出 format 实用程序。


    format> quit
    

示例 14–1 x86: 创建一个占满整个驱动器的 Solaris fdisk 分区

以下示例使用 format 实用程序的 fdisk 选项创建一个占满整个驱动器的 Solaris fdisk 分区。


# format

Searching for disks...done

AVAILABLE DISK SELECTIONS:

       0. c0d0 <DEFAULT cyl 2466 alt 2 hd 16 sec 63>

          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0

       1. c0d1 <DEFAULT cyl 522 alt 2 hd 32 sec 63>

          /pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0

       2. c1d0 <DEFAULT cyl 13102 alt 2 hd 16 sec 63>

          /pci@0,0/pci-ide@7,1/ide@1/cmdk@0,0

Specify disk (enter its number): 0

selecting c0d0

Controller working list found

[disk formatted]

format> fdisk

No fdisk table exists. The default partitioning for your disk is:

 

  a 100% "SOLARIS System" partition.

 

Type "y" to accept the default partition, otherwise type "n" to edit the

partition table. y



format> label

Ready to label disk, continue? yes

format> quit


示例 14–2 x86: 创建 Solaris fdisk 分区并保留现有的 fdisk 分区

以下示例说明如何在包含现有 DOS-BIG fdisk 分区的磁盘上创建 Solaris fdisk 分区。


format> fdisk

             Total disk size is 3498 cylinders

             Cylinder size is 1199 (512 byte) blocks



                                               Cylinders

      Partition   Status    Type          Start   End   Length    %

      =========   ======    ============  =====   ===   ======   ===

          1       Active    DOS-BIG           1   699     699     20

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

Indicate the type of partition you want 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?1

Indicate the percentage of the disk you want this partition

to use (or enter "c" to specify in cylinders). 80

Should this become the active partition? If yes, it will be 

activated each time the computer is or turned on. 

Please type "y" or "n". y

             Total disk size is 3498 cylinders

             Cylinder size is 1199 (512 byte) blocks

                                               Cylinders

      Partition   Status    Type          Start   End   Length    %

      =========   ======    ============  =====   ===   ======   ===

          1                 DOS-BIG           1   699     699     20

          2       Active    Solaris2        700  3497    2798     80

    

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

Partition 2 is now the active partition 

format> label

Ready to label disk, continue? yes

format> q


示例 14–3 x86: 创建 Solaris fdisk 分区和另一个 fdisk 分区

以下示例说明如何创建 Solaris fdisk 分区和 DOSBIG fdisk 分区。


format> fdisk

No fdisk table exists. The default partitioning for your disk is:

   a 100% "SOLARIS System" partition.

Type "y" to accept the default partition, otherwise type "n" to edit the

partition table.

n

             Total disk size is 3498 cylinders

             Cylinder size is 1199 (512 byte) blocks

                                               Cylinders

      Partition   Status    Type          Start   End   Length    %

      =========   ======    ============  =====   ===   ======   ===

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

Indicate the type of partition you want 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?  8

Specify the percentage of disk to use for this partition

(or type "c" to specify the size in cylinders)20

Should this to become the Active partition? If yes, it will be 

activated each time the computer is reset or turned on. 

again. Please type "y" or "n". n

             Total disk size is 3498 cylinders

             Cylinder size is 1199 (512 byte) blocks

                                               Cylinders

      Partition   Status    Type          Start   End   Length    %

      =========   ======    ============  =====   ===   ======   ===

          1                 DOS-BIG           1   699     699     20

  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

Indicate the type of partition you want 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? 1

Indicate the percentage of the disk you want this partition

to use (or enter "c" to specify in cylinders). 80

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". y

             Total disk size is 3498 cylinders

             Cylinder size is 1199 (512 byte) blocks

                                               Cylinders

      Partition   Status    Type          Start   End   Length    %

      =========   ======    ============  =====   ===   ======   ===

          1                 DOS-BIG           1   699     699     20

          2       Active    Solaris2         700  3497    2798     80

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

Partition 2 is now the Active partition 

format> q

创建 Solaris fdisk 分区之后

在磁盘上创建 Solaris fdisk 分区后,可以在该磁盘上创建片。请转至x86: 如何创建磁盘片和标记磁盘