<chapter id="disksxadd-38159"><title>x86: Adding a Disk (Tasks)</title><highlights><para>This chapter describes how to add a disk to an x86 based system.</para><para>For information on the procedures associated with adding a disk to an x86 based
system, see <olink targetptr="disksxadd-73" remap="internal">Adding a System Disk or a Secondary
Disk (Task Map)</olink>.</para><para>For overview information about disk management, see <olink targetptr="disksconcepts-29477" remap="internal">Chapter&nbsp;10, Managing Disks (Overview)</olink>.
For step-by-step instructions on adding a disk to a SPARC based system, see <olink targetptr="diskssadd-16103" remap="internal">Chapter&nbsp;12, SPARC: Adding a Disk (Tasks)</olink>.</para>
</highlights><sect1 id="disksxadd-73" arch="x86"><title>Adding a System Disk or a Secondary
Disk (Task Map)</title><para>The following task map identifies the procedures for adding a disk to
an x86 based system.</para><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec9" colwidth="33*"/><colspec colname="colspec10" colwidth="33*"/><colspec colname="colspec11" colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry rowsep="0"><para>1. Connect the disk and boot.</para>
</entry><entry rowsep="0"><para><emphasis>System Disk</emphasis></para><para>Connect the new disk and boot from a local or remote Solaris CD or DVD. </para>
</entry><entry rowsep="0"><para><olink targetptr="disksxadd-12484" remap="internal">How to Connect a System Disk</olink></para>
</entry>
</row><row><entry rowsep="1"><para></para>
</entry><entry rowsep="1"><para><emphasis>Secondary Disk</emphasis> </para><para>Connect the new disk and perform a reconfiguration boot so that the
system will recognize the disk. </para>
</entry><entry rowsep="1"><para><olink targetptr="disksxadd-21330" remap="internal">How to Connect a Secondary Disk and
Boot</olink> </para>
</entry>
</row><row><entry><para>2. (Optional) Change the <literal>fdisk</literal> partition identifier.</para>
</entry><entry><para>The Solaris 10 <literal>fdisk</literal> partition identifier on x86
systems has been changed from 130 (<literal>0x82</literal>) to 191 (<literal>0xbf</literal>).</para><para>You can use a new <literal>fdisk</literal> menu option to switch back
and forth between the new and old identifier.</para>
</entry><entry><para><olink targetptr="fpyqd" remap="internal">How to Change the Solaris fdisk Identifier</olink></para>
</entry>
</row><row><entry><para>3. Create slices and  label the disk.</para>
</entry><entry><para>Create disk slices and label the disk if the disk manufacturer has not
already done so. </para>
</entry><entry><para><olink targetptr="disksxadd-19036" remap="internal">How to Create a Solaris fdisk Partition</olink> and <olink targetptr="disksxadd-33190" remap="internal">How to Create Disk Slices and Label a Disk</olink></para>
</entry>
</row><row><entry><para>4. Create file systems.</para>
</entry><entry><para>Create UFS file systems on the disk slices with the <command>newfs</command> command.
You must create the root (<filename>/</filename>) or <filename>/usr</filename> file
system (or both) for a system disk. </para>
</entry><entry><para><olink targetptr="disksxadd-41967" remap="internal">How to Create File Systems</olink></para>
</entry>
</row><row><entry><para>5. Restore file systems.</para>
</entry><entry><para>Restore the root (<filename>/</filename>) or <filename>/usr</filename> file
system (or both) on the system disk. If necessary, restore file systems on
the secondary disk. </para>
</entry><entry><para><olink targetptr="bkuprestoretasks-38055" remap="internal">Chapter&nbsp;26, Restoring
Files and File Systems (Tasks)</olink></para>
</entry>
</row><row><entry><para>6. Install boot block.</para>
</entry><entry><para><emphasis>System Disk Only.</emphasis> Install the boot block on the
root (<filename>/</filename>) file system so that the system can boot. </para>
</entry><entry><para><olink targetptr="disksxadd-45774" remap="internal">How to Install a Boot Block on a
System Disk</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="disksxadd-1" arch="x86"><title>Adding a System Disk or a Secondary
Disk</title><para>A system disk contains the root (<filename>/</filename>) or <filename>/usr</filename> file
systems, or both. If the disk that contains either of these file systems becomes
damaged, you have two ways to recover:</para><itemizedlist><listitem><para>You can reinstall the entire Solaris OS.</para>
</listitem><listitem><para>Or, you can replace the system disk and restore your file
systems from a backup medium.</para>
</listitem>
</itemizedlist><para>A secondary disk doesn't contain the root (<filename>/</filename>) and <filename>/usr</filename> file systems. A secondary disk usually contains space for
user files. You can add a secondary disk to a system for more disk space.
Or, you can replace a damaged secondary disk. If you replace a secondary disk
on a system, you can restore the old disk's data on the new disk.</para><task id="disksxadd-12484" arch="x86"><title>How to Connect a System Disk</title><tasksummary><para>This procedure assumes that the operating system is shutdown. </para>
</tasksummary><procedure><step id="disksxadd-step-5"><para>Disconnect the damaged system disk from
the system.</para>
</step><step id="disksxadd-step-6"><para>Ensure that the disk you are adding has a different target number
than the other devices on the system. </para><para>Typically, a small switch
is located at the back of the disk for this purpose. </para>
</step><step id="disksxadd-step-7"><para>Connect the replacement system disk to the
system, and check the physical connections.</para><para>Refer to the disk's
hardware installation guide for details.</para>
</step><step id="disksxadd-step-8"><para>Boot the system.</para><para>This procedure
assumes that you are booting from GRUB's Solaris failsafe boot option.</para><substeps><step id="disksxadd-step-11"><para>Press any key to reboot the system if the
system displays the <literal>Press any key to reboot</literal> prompt. Or,
use the reset button to restart the system if the system is shut down. </para><para>The GRUB menu is displayed after a few minutes.</para>
</step><step id="disksxadd-step-12"><para>Use the arrow keys to select the Solaris
failsafe boot option.</para>
</step><step><para>Press return.</para>
</step><step><para>At the <literal>Do you wish to automatically update boot archives?</literal> prompt
answer no.</para><para>The root prompt (<literal>#</literal>) is displayed.</para><note><para>You must reboot the system when you want to exit Solaris failsafe
boot mode. You cannot reboot the system to multiuser mode until the system
disk is successfully added, the data is restored, and the bootblocks are installed.</para>
</note>
</step>
</substeps>
</step>
</procedure><taskrelated-custom><title>After You Connect a System Disk ...</title><para>You can create an <literal>fdisk</literal> partition if the disk is
less than 1 terabyte size. Go to <olink targetptr="disksxadd-19036" remap="internal">How to
Create a Solaris fdisk Partition</olink>.</para>
</taskrelated-custom>
</task><sect2 id="fgojw"><title>Changing the <literal>fdisk</literal> Partition Identifier</title><para>The Solaris <literal>fdisk</literal> partition identifier on x86 systems
has been changed from 130 (<literal>0x82</literal>) to 191 (<literal>0xbf</literal>).
All Solaris commands, utilities, and drivers have been updated to work with
either <literal>fdisk</literal> identifier. There is no change in <command>fdisk</command> functionality.</para>
</sect2><task id="fpyqd"><title>How to Change the Solaris <literal>fdisk</literal> Identifier</title><tasksummary><para>A new <literal>fdisk</literal> menu option enables you to switch back
and forth between the new and old identifier. The <literal>fdisk</literal> identifier
can be changed even when the file system that is contained in the partition
is mounted.</para><para>Two <literal>type</literal> values in the <literal>fdisk</literal> menu
reflect the old and new identifiers as follows:</para><itemizedlist><listitem><para><literal>Solaris</literal> identifies <literal>0x82</literal></para>
</listitem><listitem><para><literal>Solaris2</literal> identifies <literal>0xbf</literal></para>
</listitem>
</itemizedlist>
</tasksummary><procedure><step><para>Become superuser.</para>
</step><step><para>Display the current <literal>fdisk</literal> identifier.</para><para>For example:</para><screen>            Total disk size is 39890 cylinders
            Cylinder size is 4032 (512 byte) blocks

                                              Cylinders
     Partition   Status    Type          Start   End   Length    %
     =========   ======    ============  =====   ===   ======   ===
         1       Active    x86 Boot          1     6       6      0
         2                 Solaris2          7  39889    39883    100</screen>
</step><step><para>Select option 4 from the <literal>fdisk</literal> menu to change
the <literal>fdisk</literal> partition identifier back to <literal>0x82</literal></para><screen>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: <userinput>4</userinput></screen>
</step><step><para>Select option 5 to update your disk configuration and exit.</para>
</step><step><para>If necessary, select option 4 from the <literal>fdisk</literal> menu
to change the <literal>fdisk</literal> partition identifier back to <literal>0xbf</literal>.</para><para>For example:</para><screen>Total disk size is 39890 cylinders
            Cylinder size is 4032 (512 byte) blocks

                                              Cylinders
     Partition   Status    Type          Start   End   Length    %
     =========   ======    ============  =====   ===   ======   ===
         1       Active    x86 Boot          1     6       6      0
         2                 Solaris           7  39889    39883    100

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: <userinput>4</userinput></screen>
</step><step><para>Select option 5 to update your disk configuration and exit.</para>
</step>
</procedure>
</task><task id="disksxadd-21330" arch="x86"><title>How to Connect a Secondary Disk
and Boot</title><tasksummary><para>If you are adding a disk with an EFI disk label on an x64 system, see <olink targetptr="disksconcepts-14" remap="internal">EFI Disk Label</olink> for more information.</para><para>For more information about hot-plugging devices, see <olink targetptr="devconfig2-1" remap="internal">Chapter&nbsp;6, Dynamically Configuring Devices (Tasks)</olink>.</para>
</tasksummary><procedure><step id="disksxadd-step-16"><para>Become superuser or assume an equivalent
role.</para>
</step><step performance="optional" id="disksxadd-step-17"><para>If the disk is unsupported
by the Solaris software, add the device driver for the disk by following the
instructions included with the hardware.</para>
</step><step id="disksxadd-step-19"><para>Shut down the system.</para><screen># <userinput>shutdown -i0 -g</userinput><replaceable>n</replaceable> <userinput>-y</userinput></screen><variablelist><varlistentry><term><option>i0</option></term><listitem><para>Brings the system down to run level 0, the power-down state.</para>
</listitem>
</varlistentry><varlistentry><term><option>g</option><replaceable>n</replaceable></term><listitem><para>Notifies logged-in users that they have <replaceable>n</replaceable> seconds
before the system begins to shut down. </para>
</listitem>
</varlistentry><varlistentry><term><option>y</option></term><listitem><para>Specifies that the command should run without user intervention.</para>
</listitem>
</varlistentry>
</variablelist><para>The <literal>Press any key to reboot</literal> prompt is displayed.</para>
</step><step id="disksxadd-step-20"><para>Turn off the power to the system and all
external peripheral devices.</para>
</step><step id="disksxadd-step-21"><para>Ensure that the disk you are adding has a different target number
than the other devices on the system. </para><para>Typically, a small switch
is located at the back of the disk for this purpose.</para>
</step><step id="disksxadd-step-22"><para>Connect the disk to the system and check
the physical connections.</para><para>Refer to the disk's hardware installation
guide for details.</para>
</step><step id="disksxadd-step-23"><para>Turn on the power to all external peripheral
devices.</para>
</step><step id="disksxadd-step-24"><para>Turn on the power to the system.</para><para>The
system boots and displays the login prompt.</para>
</step>
</procedure><taskrelated-custom><title>After You Connect a Secondary Disk and Boot ...</title><para>After the system is booted, you can create an <literal>fdisk</literal> partition
if the disk is less than 1 terabyte in size. Go to <olink targetptr="disksxadd-19036" remap="internal">How to Create a Solaris fdisk Partition</olink>.</para>
</taskrelated-custom>
</task><sect2 id="disksxadd-54639" arch="x86"><title>Guidelines for Creating an <literal>fdisk</literal> Partition</title><para>Follow these guidelines when you set up one or more <literal>fdisk</literal> partitions.</para><itemizedlist><listitem><para>The <command>fdisk</command> command cannot be used on disks
with an EFI label that are greater than 1 terabyte in size.</para>
</listitem><listitem><para>The disk can be divided into a maximum of four <literal>fdisk</literal> partitions.
One of partitions must be a Solaris partition.</para>
</listitem><listitem><para>The Solaris partition must be made the active partition on
the disk. The active partition is partition whose operating system will be
booted by default at system startup.</para>
</listitem><listitem><para>Solaris <literal>fdisk</literal> partitions must begin on
cylinder boundaries. </para>
</listitem><listitem><para>Solaris <literal>fdisk</literal> partitions must begin at
cylinder 1, not cylinder 0, on the first disk because additional boot information,
including the master boot record, is written in sector 0. </para>
</listitem><listitem><para>The Solaris <literal>fdisk</literal> partition can be the
entire disk. Or, you might want to make it smaller to allow room for a DOS
partition. You can also make a new <literal>fdisk</literal> partition on a
disk without disturbing existing partitions (if sufficient space is available)
to create a new partition.</para>
</listitem>
</itemizedlist><note arch="x86"><para>Solaris slices are also called partitions. Certain
interfaces might refer to a <emphasis>slice</emphasis> as a <emphasis>partition</emphasis>.</para><para><literal>fdisk</literal> partitions are supported only on x86
based systems. To avoid confusion, Solaris documentation tries to distinguish
between <literal>fdisk</literal> partitions and the entities within the Solaris <literal>fdisk</literal> partition. These entities might be called slices or partitions.</para>
</note>
</sect2><task id="disksxadd-19036" arch="x86"><title>How to Create a Solaris <literal>fdisk</literal> Partition</title><taskprerequisites><para>If you need information about <command>fdisk</command> partitions, see <olink targetptr="disksxadd-54639" remap="internal">Guidelines for Creating an fdisk Partition</olink>.</para>
</taskprerequisites><procedure><step id="disksxadd-step-28"><para>Become superuser or assume an equivalent
role.</para>
</step><step id="disksxadd-step-29"><para>Invoke the <command>format</command> utility. </para><screen># <userinput>format</userinput></screen><para>A numbered list of disks is displayed.</para><para>For more information,
see <olink targetdoc="refman1m" targetptr="format-1m" remap="external"><citerefentry><refentrytitle>format</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>.</para>
</step><step id="disksxadd-step-30"><para>Type the number of the disk on which to
create a Solaris <literal>fdisk</literal> partition.</para><screen>Specify disk (enter its number): <replaceable>disk-number</replaceable></screen><para>where <replaceable>disk-number</replaceable> is the number of the disk
on which you want to create a Solaris <literal>fdisk</literal> partition.</para>
</step><step id="disksxadd-step-31"><para>Select the <literal>fdisk</literal> menu.</para><screen>format> <userinput>fdisk</userinput></screen><para>The <literal>fdisk</literal> menu that is displayed depends upon whether
the disk has existing <literal>fdisk</literal> partitions. Determine the next
step by using the following table.</para><informaltable frame="topbot"><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="column1" colwidth="162.40*"/><colspec colname="column2" colwidth="85.76*"/><colspec colname="column3" colwidth="147.85*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Go To</para>
</entry><entry><para>For More Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>Create a Solaris <literal>fdisk</literal> partition to span the entire
disk.</para>
</entry><entry><para>Step 5</para>
</entry><entry><para><olink targetptr="disksxadd-12321" remap="internal">Example&nbsp;13&ndash;1</olink></para>
</entry>
</row><row><entry><para>Create a Solaris <literal>fdisk</literal> partition and preserve one
or more existing non Solaris <literal>fdisk</literal> partitions.</para>
</entry><entry><para>Step 6</para>
</entry><entry><para><olink targetptr="disksxadd-31473" remap="internal">Example&nbsp;13&ndash;2</olink></para>
</entry>
</row><row><entry><para>Create a Solaris <literal>fdisk</literal> partition and one or more
additional non Solaris <literal>fdisk</literal> partition.</para>
</entry><entry><para>Step 6</para>
</entry><entry><para><olink targetptr="disksxadd-35230" remap="internal">Example&nbsp;13&ndash;3</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</step><step id="disksxadd-step-32"><para>Create and activate a Solaris <literal>fdisk</literal> partition
that spans the entire disk by specifying <command>y</command> at the prompt.
 Then, go to step 13.</para><screen>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.
<userinput>y</userinput></screen>
</step><step id="disksxadd-step-33"><para>Specify <command>n</command> at the prompt
if you do not want the Solaris <literal>fdisk</literal> partition to span
the entire disk.</para><screen>Type "y" to accept the default partition, otherwise type "n" to edit the
 partition table.
<userinput>n</userinput>
             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:</screen>
</step><step id="disksxadd-step-34"><para>Select option 1, <command>Create a partition</command>,
to create an <literal>fdisk</literal> partition.</para><screen>Enter Selection: <userinput>1</userinput></screen>
</step><step id="disksxadd-step-35"><para>Create a Solaris <literal>fdisk</literal> partition
by selecting <command>1(=Solaris2)</command>.</para><screen>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? <userinput>1</userinput></screen>
</step><step id="disksxadd-step-36"><para>Identify the percentage of the disk to
be reserved for the Solaris <literal>fdisk</literal> partition. Keep in mind
the size of any existing <literal>fdisk</literal> partitions when you calculate
this percentage. </para><screen>Specify the percentage of disk to use for this partition
(or type "c" to specify the size in cylinders). <replaceable>nn</replaceable></screen>
</step><step id="disksxadd-step-37"><para>Activate the Solaris <literal>fdisk</literal> partition
by typing <command>y</command> at the prompt.</para><screen>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". <userinput>y</userinput></screen><para>The <literal>Enter Selection</literal> prompt is displayed after the <literal>fdisk</literal> partition is activated.</para>
</step><step id="disksxadd-step-38"><para>Select option 1, <command>Create a partition</command>,
to create another <literal>fdisk</literal> partition.</para><para>See steps
8&ndash;10 for instructions on creating an <literal>fdisk</literal> partition.</para>
</step><step id="disksxadd-step-39"><para>Update the disk configuration, and exit
the <literal>fdisk</literal> menu from the <literal>selection</literal> menu.</para><screen>Selection: <userinput>5</userinput> </screen>
</step><step id="disksxadd-step-40"><para>Relabel the disk by using the <command>label</command> command.</para><screen>format> <userinput>label</userinput>
Ready to label disk, continue? <userinput>yes</userinput>
format> </screen>
</step><step id="disksxadd-step-41"><para>Quit the <literal>format</literal> utility.</para><screen>format> <userinput>quit</userinput></screen>
</step>
</procedure><example id="disksxadd-12321" arch="x86"><title>Creating a Solaris <literal>fdisk</literal> Partition That Spans the
Entire Drive</title><para>The following example uses the <command>format</command> utility's <literal>fdisk</literal> option to create a Solaris <literal>fdisk</literal> partition
that spans the entire drive.</para><screen># <userinput>format</userinput>
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c0d0 &lt;DEFAULT cyl 2466 alt 2 hd 16 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
       1. c0d1 &lt;DEFAULT cyl 522 alt 2 hd 32 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0
       2. c1d0 &lt;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): <userinput>0</userinput>
selecting c0d0
Controller working list found
[disk formatted]
format> <userinput>fdisk</userinput>
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. <userinput>y</userinput>

format> <userinput>label</userinput>
Ready to label disk, continue? <userinput>yes</userinput>
format> <userinput>quit</userinput></screen>
</example><example id="disksxadd-31473" arch="x86"><title>Creating a Solaris <literal>fdisk</literal> Partition While Preserving
an Existing <literal>fdisk</literal> Partition</title><para>The following example shows how to create a Solaris <literal>fdisk</literal> partition
on a disk that has an existing <literal>DOS-BIG</literal> <literal>fdisk</literal> partition.</para><screen>format> <userinput>fdisk</userinput>
             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: <userinput>1</userinput>
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?<userinput>1</userinput>
Indicate the percentage of the disk you want this partition
to use (or enter "c" to specify in cylinders). <userinput>80</userinput>
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". <userinput>y</userinput>
             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:<userinput>5</userinput>
Partition 2 is now the active partition 
format> <userinput>label</userinput>
Ready to label disk, continue? <userinput>yes</userinput>
format> <userinput>q</userinput></screen>
</example><example id="disksxadd-35230" arch="x86"><title>Creating a Solaris <literal>fdisk</literal> Partition and an Additional <literal>fdisk</literal> Partition</title><para>This following example shows how to create a Solaris <literal>fdisk</literal> partition
and a <literal>DOSBIG</literal> <literal>fdisk</literal> partition.</para><screen>format> <userinput>fdisk</userinput>
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.
<userinput>n</userinput>
             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: <userinput>1</userinput>
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?  <userinput>8</userinput>
Specify the percentage of disk to use for this partition
(or type "c" to specify the size in cylinders)<userinput>20</userinput>
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". <userinput>n</userinput>
             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: <userinput>1</userinput>
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? <userinput>1</userinput>
Indicate the percentage of the disk you want this partition
to use (or enter "c" to specify in cylinders). <userinput>80</userinput>
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". <userinput>y</userinput>
             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: <userinput>5</userinput>
Partition 2 is now the Active partition 
format> <userinput>q</userinput></screen>
</example><taskrelated-custom><title>After You Create a Solaris <literal>fdisk</literal> Partition
...</title><para>After you create a Solaris <literal>fdisk</literal> partition on the
disk, you can create slices on the disk. Go to <olink targetptr="disksxadd-33190" remap="internal">How to Create Disk Slices and Label a Disk</olink></para>
</taskrelated-custom>
</task><task id="disksxadd-33190" arch="x86"><title>How to Create Disk Slices and
Label a Disk</title><procedure><step id="disksxadd-step-45"><para>Become superuser or assume an equivalent
role.</para>
</step><step id="disksxadd-step-46"><para>Invoke the <command>format</command> utility. </para><screen># <userinput>format</userinput></screen><para>A numbered list of disks is displayed.</para>
</step><step id="disksxadd-step-47"><para>Type the number of the disk that you want
to repartition.</para><screen>Specify disk (enter its number): <replaceable>disk-number</replaceable></screen><para>where <replaceable>disk-number</replaceable> is the number of the disk
that you want to repartition.</para>
</step><step id="disksxadd-step-48"><para>Select the <command>partition</command> menu.</para><screen>format> <userinput>partition</userinput></screen>
</step><step id="disksxadd-step-49"><para>Display the current partition (slice) table.</para><screen>partition> <userinput>print</userinput></screen>
</step><step id="disksxadd-step-50"><para>Start the modification process.</para><screen>partition> <userinput>modify</userinput></screen>
</step><step id="disksxadd-step-51"><para>Set the disk to all free hog.</para><screen>Choose base (enter number) [0]? <userinput>1</userinput></screen><para>For more information about the free hog slice, see <olink targetptr="disksconcepts-15570" remap="internal">Using the Free Hog Slice</olink>.</para>
</step><step id="disksxadd-step-52"><para>Create a new partition table by answering <command>yes</command> when prompted to continue.</para><screen>Do you wish to continue creating a new partition
table based on above table[yes]? <userinput>yes</userinput></screen>
</step><step id="disksxadd-step-53"><para>Identify the free hog partition (slice)
and the sizes of the slices when prompted.</para><para>When adding a system
disk, you must set up slices for the following:</para><itemizedlist><listitem><para>root (slice 0) and swap (slice 1) and/or</para>
</listitem><listitem><para><filename>/usr</filename> (slice 6) </para>
</listitem>
</itemizedlist><para>After you identify the slices, the new partition table is displayed.</para>
</step><step id="disksxadd-step-54"><para>Make the displayed partition table the
current partition table by answering <command>yes</command> when prompted.</para><screen>Okay to make this the current partition table[yes]? <userinput>yes</userinput></screen><para>If you don't want the current partition table and you want to change
it, answer <command>no</command> and go to <olink targetptr="disksxadd-step-50" remap="internal">Step&nbsp;6</olink>.</para>
</step><step id="disksxadd-step-55"><para>Name the partition table.</para><screen>Enter table name (remember quotes): <userinput>"</userinput><replaceable>partition-name</replaceable><userinput>"</userinput></screen><para>where <replaceable>partition-name</replaceable> is the name for the
new partition table.</para>
</step><step id="disksxadd-step-56"><para>Label the disk with the new partition table
after you have finished allocating slices on the new disk.</para><screen>Ready to label disk, continue? <userinput>yes</userinput></screen>
</step><step id="disksxadd-step-57"><para>Quit the <command>partition</command> menu.</para><screen>partition> <userinput>quit</userinput></screen>
</step><step id="disksxadd-step-69"><para>Verify the new disk label.</para><screen>format> <userinput>verify</userinput></screen>
</step><step id="disksxadd-step-58"><para>Exit the <literal>format</literal> utility.</para><screen>format> <userinput>quit</userinput></screen>
</step>
</procedure><taskrelated-custom><title>After You Create Disk Slices and Label a Disk ...</title><para>After you create disk slices and label the disk, you can create file
systems on the disk. Go to <olink targetptr="disksxadd-41967" remap="internal">How to Create
File Systems</olink>.</para>
</taskrelated-custom>
</task><task id="disksxadd-41967" arch="x86"><title>How to Create File Systems</title><procedure><step id="disksxadd-step-61"><para>Become superuser or assume an equivalent
role.</para>
</step><step id="disksxadd-step-62"><para>Create a file system for each slice.</para><screen># <userinput>newfs</userinput> /dev/rdsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></screen><para>where <filename>/dev/rdsk/c</filename><replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable> is
the raw device for the file system to be created.</para><para>For more information
about the <command>newfs</command> command, see <olink targetptr="fscreate-96442" remap="internal">Chapter&nbsp;17, Creating UFS, TMPFS, and LOFS File Systems (Tasks)</olink> or <olink targetdoc="refman1m" targetptr="newfs-1m" remap="external"><citerefentry><refentrytitle>newfs</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>.</para>
</step><step id="disksxadd-step-70"><para>Verify the new file system by mounting.</para><screen># <userinput>mount</userinput> /dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable> <userinput>/mnt</userinput>
# <userinput>ls /mnt</userinput>
lost+found</screen>
</step>
</procedure><taskrelated-custom><title>After You Create File Systems ...</title><itemizedlist><listitem><para><emphasis role="strong">System Disk</emphasis> &ndash; You
need to restore the root (<filename>/</filename>) and <filename>/usr</filename> file
systems on the disk.</para><itemizedlist><listitem><para>Go to <olink targetptr="bkuprestoretasks-38055" remap="internal">Chapter&nbsp;26,
Restoring Files and File Systems (Tasks)</olink>.</para>
</listitem><listitem><para>After the root (<filename>/</filename>) and <filename>/usr</filename> file
systems are restored, install the boot block. Go to <olink targetptr="disksxadd-45774" remap="internal">How to Install a Boot Block on a System Disk</olink>.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><emphasis role="strong">Secondary Disk</emphasis> &ndash;
You might need to restore file systems on the new disk. Go to <olink targetptr="bkuprestoretasks-38055" remap="internal">Chapter&nbsp;26, Restoring Files and File
Systems (Tasks)</olink>. If you are not restoring file systems on the new
disk, you are finished adding a secondary disk.</para>
</listitem><listitem><para>For information on making the file systems available to users,
see <olink targetptr="fsmount-42780" remap="internal">Chapter&nbsp;18, Mounting and Unmounting
File Systems (Tasks)</olink>.</para>
</listitem>
</itemizedlist>
</taskrelated-custom>
</task><task id="disksxadd-45774" arch="x86"><title>How to Install a Boot Block on
a System Disk</title><procedure><step id="disksxadd-step-64"><para>Become superuser or assume an equivalent
role.</para>
</step><step id="disksxadd-step-65"><para>Install the boot blocks
on the system disk.</para><screen># <userinput>/sbin/installgrub /boot/grub/stage1 /boot/grub/stage2</userinput> <replaceable>/dev/rdsk/cwtxdysz</replaceable></screen><variablelist><varlistentry><term><filename>/boot/grub/stage1</filename></term><listitem><para>Is the partition boot file.</para>
</listitem>
</varlistentry><varlistentry><term><filename>/boot/grub/stage2</filename></term><listitem><para>Is the boot block code.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>/dev/rdsk/cwtxdysz</replaceable></term><listitem><para>Is the raw device name that represents the location of the
GRUB menu, <filename>/boot/grub/menu.lst</filename> on the Solaris root slice.</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, see <olink targetdoc="refman1m" targetptr="installgrub-1m" remap="external"><citerefentry><refentrytitle>installgrub</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>.</para>
</step><step id="disksxadd-step-71"><para>Verify that the boot blocks are installed
by rebooting the system to run level 3.</para><screen># <userinput>init 6</userinput></screen>
</step>
</procedure><example id="disksxadd-67" arch="x86"><title>Installing a Boot Block on a System Disk</title><para>The following example shows how to install the boot blocks on an x86
system. </para><screen># <userinput>/sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1d0s0</userinput>
stage1 written to partition 0 sector 0 (abs 2016)
stage2 written to to partition 0, 227 sectors starting 50 (abs 2066)</screen>
</example>
</task>
</sect1>
</chapter>