System Administration Guide: Devices and File Systems

Procedurex86: How to Create a Solaris fdisk Partition

Before You Begin

If you need information about fdisk partitions, see x86: Guidelines for Creating an fdisk Partition.

  1. Become superuser or assume an equivalent role.

  2. Invoke the format utility.


    # format
    

    A numbered list of disks is displayed.

    For more information, see format(1M).

  3. Type the number of the disk on which to create a Solaris fdisk partition.


    Specify disk (enter its number): disk-number
    

    where disk-number is the number of the disk on which you want to create a Solaris fdisk partition.

  4. Select the fdisk menu.


    format> fdisk
    

    The fdisk menu that is displayed depends upon whether the disk has existing fdisk partitions. Determine the next step by using the following table.

    Task 

    Go To 

    For More Information 

    Create a Solaris fdisk partition to span the entire disk.

    Step 5 

    Example 13–1

    Create a Solaris fdisk partition and preserve one or more existing non Solaris fdisk partitions.

    Step 6 

    Example 13–2

    Create a Solaris fdisk partition and one or more additional non Solaris fdisk partition.

    Step 6 

    Example 13–3

  5. Create and activate a Solaris fdisk partition that spans the entire disk by specifying y at the prompt. Then, go to step 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. Specify n at the prompt if you do not want the Solaris fdisk partition to span the entire disk.


    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. Select option 1, Create a partition, to create an fdisk partition.


    Enter Selection: 1
    
  8. Create a Solaris fdisk partition by selecting 1(=Solaris2).


    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. Identify the percentage of the disk to be reserved for the Solaris fdisk partition. Keep in mind the size of any existing fdisk partitions when you calculate this percentage.


    Specify the percentage of disk to use for this partition
    (or type "c" to specify the size in cylinders). nn
    
  10. Activate the Solaris fdisk partition by typing y at the prompt.


    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
    

    The Enter Selection prompt is displayed after the fdisk partition is activated.

  11. Select option 1, Create a partition, to create another fdisk partition.

    See steps 8–10 for instructions on creating an fdisk partition.

  12. Update the disk configuration, and exit the fdisk menu from the selection menu.


    Selection: 5 
    
  13. Relabel the disk by using the label command.


    format> label
    Ready to label disk, continue? yes
    format> 
  14. Quit the format utility.


    format> quit
    

Example 13–1 x86: Creating a Solaris fdisk Partition That Spans the Entire Drive

The following example uses the format utility's fdisk option to create a Solaris fdisk partition that spans the entire drive.


# 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


Example 13–2 x86: Creating a Solaris fdisk Partition While Preserving an Existing fdisk Partition

The following example shows how to create a Solaris fdisk partition on a disk that has an existing DOS-BIG fdisk partition.


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


Example 13–3 x86: Creating a Solaris fdisk Partition and an Additional fdisk Partition

This following example shows how to create a Solaris fdisk partition and a DOSBIG fdisk partition.


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

After You Create a Solaris fdisk Partition ...

After you create a Solaris fdisk partition on the disk, you can create slices on the disk. Go to x86: How to Create Disk Slices and Label a Disk