<chapter id="luexample-1"><title>Solaris Live Upgrade (Examples)</title><highlights><para>This chapter provides
examples of creating a boot environment, then upgrading and activating the
new boot environment which then becomes the currently running system. This
chapter contains the following sections:</para><itemizedlist><listitem><para><olink targetptr="luexample-100" remap="internal">Example of Upgrading With
Solaris Live Upgrade</olink></para>
</listitem><listitem><para><olink targetptr="luexample-90" remap="internal">Example of Detaching and Upgrading
One Side of a RAID-1 Volume (Mirror)</olink></para>
</listitem><listitem><para><olink targetptr="luexample-51" remap="internal">Example of Migrating From
an Existing Volume to a Solaris Volume Manager RAID-1 Volume</olink></para>
</listitem><listitem><para><olink targetptr="luexample-28" remap="internal">Example of Creating an Empty
Boot Environment and Installing a Solaris Flash Archive</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="luexample-100"><title>Example of Upgrading With Solaris Live Upgrade</title><para>In this example, a new boot environment
is created by using the <command>lucreate</command> command on a system that
is running the Solaris 9 release. The new boot environment is upgraded to
the Solaris Express 5/07 release by using the <command>luupgrade</command> command.
The upgraded boot environment is activated by using the <command>luactivate</command> command.
An example of falling back to the original boot environment is also given.</para><sect2 id="luexample-3"><title>To Install Solaris Live Upgrade on the Active
Boot Environment</title><note><para>This procedure assumes that the
system is running removable media services. If you have questions about removable
media services that manage discs, refer to <olink targetdoc="sagdfs" remap="external"><citetitle remap="book">System Administration Guide: Devices and File Systems</citetitle></olink> for
detailed information.</para>
</note><orderedlist><listitem><para>Insert the Solaris Operating System DVD or Solaris Software - 2 CD. </para>
</listitem><listitem><para>Follow the step for the media you are using.</para><itemizedlist><listitem><para>If you are using the Solaris Operating System DVD, change the directory to
the installer and run the installer.</para><itemizedlist><listitem><para><emphasis role="strong">For SPARC based systems</emphasis>:</para><screen># <userinput>cd /media/cdroms0/Solaris_11/Tools/Installers</userinput>
# <userinput>./liveupgrade20</userinput></screen>
</listitem><listitem><para><emphasis role="strong">For x86 based systems</emphasis>:</para><screen># <userinput>cd /media/cdrom/Solaris_11/Tools/Installers</userinput>
# <userinput>./liveupgrade20</userinput></screen>
</listitem>
</itemizedlist><para>The Solaris installation program GUI is displayed.</para>
</listitem><listitem><para>If you are using the Solaris Software - 2 CD, run the installer. </para><screen>% <userinput>./installer</userinput></screen><para>The Solaris installation program GUI is displayed.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>From the Select Type of Install panel, click Custom.</para>
</listitem><listitem><para>On the Locale Selection panel, click the language to be installed.</para>
</listitem><listitem><para>Choose the software to install.</para><itemizedlist><listitem><para>For DVD, on the Component Selection panel, click Next to install
the packages.</para>
</listitem><listitem><para>For CD, on the Product Selection panel, click Default Install
for Solaris Live Upgrade and click the other product choices to deselect this
software.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>Follow the directions on the Solaris installation program
panels to install  the software.</para>
</listitem>
</orderedlist>
</sect2><sect2 id="luexample-2"><title>To Create a Boot Environment</title><para>The source boot environment is named <literal>c0t4d0s0</literal> by
using the <option>c</option> option. Naming the source boot environment is
 required only when the first boot environment is created. For more information
about naming using the <option>c</option> option, see the description in &ldquo;To
Create a Boot Environment for the First Time&rdquo; <olink targetptr="lucreate-step-2200" remap="internal">Step&nbsp;2</olink>.</para><para>The new boot environment is named <literal>c0t15d0s0</literal>. The <option>A</option> option creates a description that is associated with the boot environment
name. </para><para>The root (<filename>/</filename>) file system is copied to the new boot
environment. Also, a new swap slice is created rather than sharing the source
boot environment's swap slice.</para><screen remap="wide"># <userinput>lucreate -A 'BE_description' -c /dev/dsk/c0t4d0s0 -m /:/dev/dsk/c0t15d0s0:ufs</userinput>\
<userinput>-m -:/dev/dsk/c0t15d0s1:swap -n /dev/dsk/c0t15d0s0</userinput></screen>
</sect2><sect2 id="luexample-4"><title>To Upgrade the Inactive Boot Environment</title><para>The inactive boot environment is named <literal>c0t15d0s0</literal>.
The operating system image to be used for the upgrade is taken from the network.</para><screen># <userinput>luupgrade -n c0t15d0s0 -u -s /net/ins-svr/export/Solaris_11 \ 
combined.solaris_wos</userinput></screen>
</sect2><sect2 id="luexample-7"><title>To Check if Boot Environment Is Bootable</title><para>The <command>lustatus</command> command reports if the boot environment
creation is complete. <command>lustatus</command> also shows if the boot environment
is bootable.</para><screen># <userinput>lustatus</userinput>
boot environment   Is        Active  Active     Can	    Copy
Name               Complete  Now	 OnReboot   Delete	 Status
------------------------------------------------------------------------
c0t4d0s0           yes       yes      yes      no      -
c0t15d0s0          yes       no       no       yes     -</screen>
</sect2><sect2 id="luexample-5"><title>To Activate the Inactive Boot Environment</title><para>The <literal>c0t15d0s0</literal> boot environment is made bootable with
the <command>luactivate</command> command. The system is then rebooted and <literal>c0t15d0s0</literal> becomes the active boot environment. The <literal>c0t4d0s0</literal> boot
environment is now inactive.</para><screen># <userinput>luactivate c0t15d0s0</userinput>
# <userinput>init 6</userinput></screen>
</sect2><sect2 id="luexample-6"><title>(Optional) To Fall Back to the Source Boot
Environment</title><para>The following procedures for falling back depend on your new boot environment
activation situation:</para><itemizedlist><listitem><para>For SPARC based systems:</para><itemizedlist><listitem><para>The activation is successful, but you want to return to the
original boot environment. See <olink targetptr="luexample-15" remap="internal">Example 10&ndash;1</olink>.</para>
</listitem><listitem><para>The activation fails and you can boot back to the original
boot environment. See <olink targetptr="luexample-16" remap="internal">Example 10&ndash;2</olink>.</para>
</listitem><listitem><para>The activation fails and you must boot back to the original
boot environment by using media or a net installation image. See <olink targetptr="luexample-17" remap="internal">Example 10&ndash;3</olink>.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>For x86 based systems, <emphasis role="strong">starting with
the Solaris 10 1/06 release</emphasis> and when you use the GRUB menu:</para><itemizedlist><listitem><para>The activation fails, the GRUB menu is displayed correctly,
but the new boot environment is not bootable. See <olink targetptr="gbdcm" remap="internal">Example
10&ndash;4</olink></para>
</listitem><listitem><para>The activation fails and the GRUB menu does not display. See <olink targetptr="gaemf" remap="internal">Example 10&ndash;5</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist><example id="luexample-15" arch="sparc"><title>To Fall Back Despite Successful
Boot Environment Creation</title><para>In this example, the original <literal>c0t4d0s0</literal> boot environment
is reinstated as the active boot environment although it was activated successfully.
The device name is <literal>first_disk</literal>.</para><screen># <userinput>/sbin/luactivate first_disk</userinput> 
# <userinput>init 6</userinput></screen>
</example><example id="luexample-16" arch="sparc"><title>To Fall Back From a Failed
Boot Environment Activation</title><para>In this example, the new boot environment was not bootable. You must
return to the OK prompt before booting from the original boot environment, <literal>c0t4d0s0</literal>, in single-user mode. </para><screen>OK <userinput>boot net -s</userinput>
# <userinput>/sbin/luactivate first_disk</userinput>
Do you want to fallback to activate boot environment c0t4d0s0 
(yes or no)? <userinput>yes</userinput>
# <userinput>init 6</userinput></screen><para>The original boot environment, <literal>c0t4d0s0</literal>, becomes
the active boot environment.</para>
</example><example id="luexample-17" arch="sparc"><title>To Fall Back to the Original
Boot Environment by Using a DVD, CD, or Net Installation Image</title><para>In this example, the new boot environment was not bootable. You cannot
boot from the original boot environment and must use media or a net installation
image. The device is <filename>/dev/dsk/c0t4d0s0</filename>. The original
boot environment, <literal>c0t4d0s0</literal>, becomes the active boot environment.</para><screen>OK <userinput>boot net -s</userinput>
# <userinput>fsck /dev/dsk/c0t4d0s0</userinput>
# <userinput>mount /dev/dsk/c0t4d0s0 /mnt</userinput> 
# <userinput>/mnt/sbin/luactivate</userinput>
Do you want to fallback to activate boot environment c0t4d0s0 
(yes or no)? <userinput>yes</userinput>
# <userinput>umount /mnt</userinput> 
# <userinput>init 6</userinput></screen>
</example><example id="gbdcm" arch="x86"><title>To Fall Back to the Original Boot Environment
By Using the GRUB Menu</title><para><emphasis role="strong">Starting with the Solaris 10 1/06 release</emphasis>,
the following example provides the steps to fall back by using the GRUB menu.</para><para>In this example, the GRUB menu is displayed correctly, but the new boot
environment is not bootable. To enable a fallback, the original boot environment
is booted in single-user mode. </para><orderedlist><listitem><para>Become superuser or assume an equivalent role.</para>
</listitem><listitem><para>To display the GRUB menu, reboot the system.</para><screen># <userinput>init 6</userinput></screen><para>The GRUB menu is displayed.</para><screen>GNU GRUB version 0.95 (616K lower / 4127168K upper memory)
+-------------------------------------------------------------------+
|Solaris                                                            |
|Solaris failsafe                                                   |
|second_disk                                                        |
|second_disk failsafe                                               |
+-------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted. Press
enter to boot the selected OS, 'e' to edit the commands before
booting, or 'c' for a command-line.</screen>
</listitem><listitem><para>From the GRUB menu, select the original boot environment.
The boot environment must have been created with GRUB software. A boot environment
that was created before the <emphasis role="strong">Solaris 10 1/06 release</emphasis> is
not a GRUB boot environment. If you do not have a bootable GRUB boot environment,
then skip to <olink targetptr="gaemf" remap="internal">Example 10&ndash;5</olink>.</para>
</listitem><listitem><para>Edit the GRUB menu by typing: <userinput>e</userinput>.</para>
</listitem><listitem><para>Select <filename>kernel /boot/platform/i86pc/kernel/unix</filename> by using the arrow keys and type <emphasis role="strong">e</emphasis>. The grub edit menu is displayed.</para><screen>grub edit>kernel$ /boot/platform/i86pc/kernel/unix</screen>
</listitem><listitem><para>Boot to single user mode, by typing <userinput>-s</userinput>.</para><screen>grub edit>kernel$ /boot/platform/i86pc/kernel/unix <userinput>-s</userinput></screen>
</listitem><listitem><para>Boot and mount the boot environment. Then activate it.</para>
</listitem>
</orderedlist><screen># <userinput>b</userinput>
# <userinput>fsck /dev/dsk/c0t4d0s0</userinput>
# <userinput>mount /dev/dsk/c0t4d0s0 /mnt</userinput> 
# <userinput>/mnt/sbin/luactivate</userinput>
Do you want to fallback to activate boot environment c0t4d0s0
(yes or no)? <userinput>yes</userinput>
# <userinput>umount /mnt</userinput>
# <userinput>init 6</userinput></screen>
</example><example id="gaemf" arch="x86"><title>To Fall Back to the Original Boot Environment
With the GRUB Menu by Using the DVD or CD</title><para><emphasis role="strong">Starting with the Solaris 10 1/06 release</emphasis>,
the following example provides the steps to fall back by using the DVD or
CD.</para><para>In this example, the new boot environment was not bootable. Also, the
GRUB menu does not display. To enable a fallback, the original boot environment
is booted in single-user mode.</para><orderedlist><listitem><para>Insert the Solaris Operating System for x86 Platforms DVD or Solaris Software for x86 Platforms - 1 CD.</para>
</listitem><listitem><para>Become superuser or assume an equivalent role.</para>
</listitem><listitem><para>Boot from the DVD or CD.</para><screen># <userinput>init 6</userinput></screen><para>The GRUB menu is displayed.</para><itemizedlist><listitem><para>For an installation with CD media:</para><screen>GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
+-------------------------------------------------------------------+
|Solaris Express 5/07 <replaceable>image_directory</replaceable>                                      |
|Solaris Express 5/07 Serial Console tty                                 |
|Solaris Express 5/07 Serial Console ttyb (for lx50, v60x and v65)       |
+-------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted. Press
enter to boot the selected OS, 'e' to edit the commands before
booting, or 'c' for a command-line.</screen>
</listitem><listitem><para>For an installation with a DVD media:</para><screen>GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
+-------------------------------------------------------------------+
|Solaris Express 5/07 Developer Edition <replaceable>image_directory</replaceable>                    |
|Solaris Express 5/07                                                    |
|Solaris Express 5/07 Serial Console ttya                                |
|Solaris Express 5/07 Serial Console ttyb (for lx50, v60x and v65)       |
+-------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted. Press
enter to boot the selected OS, 'e' to edit the commands before
booting, or 'c' for a command-line.</screen>
</listitem>
</itemizedlist>
</listitem><listitem><para>Wait for the default option to boot or choose any option displayed.</para><para>The installation screen is displayed.</para><itemizedlist><listitem><para>For CD media you see the following screen.</para><screen>+-------------------------------------------------------------------+

|Select the type of installation you want to perform:                |
|                                                                    |
|         1 Solaris Interactive                                      |
|         2 Custom JumpStart                                         |
|         3 Solaris Interactive Text (Desktop session)               |
|         4 Solaris Interactive Text (Console session)               |
|         5 Apply driver updates                                     |
|         6 Single user shell                                        |
|                                                                    |
|        Enter the number of your choice followed by the &lt;ENTER> key.|
|        Alternatively, enter custom boot arguments directly.        |
|
|         If you wait 30 seconds without typing anything,            |
|         an interactive installation will be started.               |
+----------------------------------------------------------------- --+</screen>
</listitem><listitem><para>For DVD media, you see the following screen.</para>
</listitem>
</itemizedlist><screen>+--------------------------------------------------------------------+
|Select the type of installation you want to perform:                |
|                                                                    |
|        1 Solaris Interactive GUI                                   |
|        2 Apply driver updates                                      |
|        3 Single user shell                                         |
|Enter the number of your choice followed by the &lt;ENTER> key.        |
|Alternatively, enter custom boot arguments directly.                |
|                                                                    |
|    If you wait 30 seconds without typing anything,                 |
|     an interactive installation will be started.                   |
+--------------------------------------------------------------------+</screen>
</listitem><listitem><para>Choose the &ldquo;Single user shell&rdquo; option.</para><para>The
following message is displayed.</para><screen>Do you wish to automatically update the boot archive? y /n</screen>
</listitem><listitem><para>Type: n</para><screen>Starting shell...
#</screen><para>You are now in single user mode.</para>
</listitem><listitem><para>Mount the boot environment. Then activate and reboot.</para><screen># <userinput>fsck /dev/dsk/c0t4d0s0</userinput>
# <userinput>mount /dev/dsk/c0t4d0s0 /mnt</userinput> 
# <userinput>/mnt/sbin/luactivate</userinput>
Do you want to fallback to activate boot environment c0t4d0s0
(yes or no)? <userinput>yes</userinput>
# <userinput>umount /mnt</userinput>
# <userinput>init 6</userinput></screen>
</listitem>
</orderedlist>
</example>
</sect2>
</sect1><sect1 id="luexample-90"><title>Example of Detaching and Upgrading One Side
of a RAID-1 Volume (Mirror)</title><para>This
example shows you how to do the following tasks:</para><itemizedlist><listitem><para>Create a RAID-1 volume (mirror) on a new boot environment</para>
</listitem><listitem><para>Break the mirror and upgrade one half of the mirror</para>
</listitem><listitem><para>Attach the other half of the mirror, the concatenation, to
the new mirror</para>
</listitem>
</itemizedlist><para><olink targetptr="luexample-fig-2" remap="internal">Figure 10&ndash;1</olink> shows the
current boot environment, which contains three physical disks.</para><figure id="luexample-fig-2"><title>Detaching and Upgrading One Side of a
RAID-1 Volume (Mirror)</title><mediaobject><imageobject><imagedata entityref="lu-create-upgrd-mir1"/>
</imageobject><textobject><simpara>The context describes the illustration.</simpara>
</textobject>
</mediaobject>
</figure><orderedlist><listitem><para>Create a new boot environment, <literal>second_disk</literal>,
that contains a mirror.</para><para>The following command performs these tasks.</para><itemizedlist><listitem><para><command>lucreate</command> configures a UFS file system for
the mount point root (<filename>/</filename>). A mirror, <filename>d10</filename>,
is created. This mirror is the receptacle for the current boot environment's
root (<filename>/</filename>) file system, which is copied to the mirror <filename>d10</filename>. All data on the mirror <filename>d10</filename> is overwritten.</para>
</listitem><listitem><para>Two slices, <filename>c0t1d0s0</filename> and <filename>c0t2d0s0</filename>,
are specified to be used as submirrors. These two submirrors are attached
to mirror <filename>d10</filename>. </para>
</listitem>
</itemizedlist><screen># <userinput>lucreate -c first_disk -n second_disk \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t1d0s0:attach \ 
-m /:/dev/dsk/c0t2d0s0:attach</userinput></screen>
</listitem><listitem><para>Activate the <literal>second_disk</literal> boot environment.</para><screen># <userinput>/sbin/luactivate second_disk</userinput>
# <userinput>init 6</userinput></screen>
</listitem><listitem><para>Create another boot environment, <literal>third_disk</literal>.</para><para>The following command performs these tasks.</para><itemizedlist><listitem><para><command>lucreate</command> configures a UFS file system for
the mount point root (<filename>/</filename>). A mirror, <filename>d20</filename>,
is created.  </para>
</listitem><listitem><para>Slice <filename>c0t1d0s0</filename> is removed from its current
mirror and is added to mirror <literal>d20</literal>. The contents of the
submirror, the root (<filename>/</filename>) file system, are preserved and
no copy occurs. </para>
</listitem>
</itemizedlist><screen># <userinput>lucreate -n third_disk \ 
-m /:/dev/md/dsk/d20:ufs,mirror \ 
-m /:/dev/dsk/c0t1d0s0:detach,attach,preserve</userinput></screen>
</listitem><listitem><para>Upgrade the new boot environment, <literal>third_disk</literal> </para><screen># <userinput>luupgrade -u -n third_disk \ 
-s /net/installmachine/export/Solaris_11/OS_image</userinput></screen>
</listitem><listitem><para>Add a patch to the upgraded boot environment.</para><screen># <userinput>luupgrade -t n third_disk -s /net/patches 222222-01</userinput></screen>
</listitem><listitem><para>Activate the <literal>third_disk</literal> boot environment
to make this boot environment the currently running system.</para><screen># <userinput>/sbin/luactivate third_disk</userinput>
# <userinput>init 6</userinput></screen>
</listitem><listitem><para>Delete the boot environment <literal>second_disk</literal>. </para><screen># <userinput>ludelete second_disk</userinput></screen>
</listitem><listitem><para>The following commands perform these tasks. </para><itemizedlist><listitem><para>Clear mirror <literal>d10</literal>. </para>
</listitem><listitem><para>Check for the number for the concatenation of <literal>c0t2d0s0</literal>. </para>
</listitem><listitem><para>Attach the concatenation that is found by the <command>metastat</command> command
to the mirror <literal>d20</literal>. The <literal>metattach</literal> command
synchronizes the newly attached concatenation with the concatenation in mirror <literal>d20</literal>. All data on the concatenation is overwritten.</para>
</listitem>
</itemizedlist><screen># <userinput>metaclear d10 
# metastat -p | grep c0t2d0s0</userinput>
d<replaceable>num</replaceable> 1 1 c0t2d0s0
<userinput># metattach d20 d<replaceable>num</replaceable></userinput></screen><variablelist><varlistentry><term><replaceable>num</replaceable></term><listitem><para>Is the number found in the <command>metastat</command> command
for the concatenation</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</orderedlist><para>The new boot environment, <literal>third_disk</literal>, has been upgraded
and is the currently running system. <literal>third_disk</literal> contains
the root (<filename>/</filename>) file system that is mirrored.</para><para><olink targetptr="luexample-fig-3" remap="internal">Figure 10&ndash;2</olink> shows the
entire process of detaching a mirror and upgrading the mirror by using the
commands in the preceding example.</para><figure id="luexample-fig-3"><title>Detaching and Upgrading One Side of a
RAID-1 Volume (Mirror) (continued)</title><mediaobject><imageobject><imagedata entityref="lu-create-upgrd-mir2" width="100"/>
</imageobject><textobject><simpara>The context describes the illustration.</simpara>
</textobject>
</mediaobject>
</figure>
</sect1><sect1 id="luexample-51"><title>Example of Migrating From an Existing Volume
to a Solaris Volume Manager RAID-1 Volume</title><para>Solaris
Live Upgrade enables the creation of a new boot environment on RAID&ndash;1
volumes (mirrors). The current boot environment's file systems can be on any
of the following:</para><itemizedlist><listitem><para>A physical storage device</para>
</listitem><listitem><para>A Solaris Volume Manager controlled RAID&ndash;1 volume</para>
</listitem><listitem><para>A Veritas VXFS controlled volume</para>
</listitem>
</itemizedlist><para>However, the new boot environment's target must be a Solaris Volume
Manager RAID-1 volume. For example, the slice that is designated for a copy
of the root  (<filename>/</filename>) file system must be <filename>/dev/vx/dsk/rootvol</filename>. <filename>rootvol</filename> is the volume that contains the
 root (<filename>/</filename>) file system.</para><para>In this example, the current boot environment contains the root (<filename>/</filename>) file system on a volume that is not a Solaris Volume Manager
volume. The new boot environment is created with the root (<filename>/</filename>)
file system on the Solaris Volume Manager RAID-1 volume <literal>c0t2d0s0</literal>.
The <command>lucreate</command> command migrates the current volume to the
Solaris Volume Manager volume. The name of the new boot environment is <literal>svm_be</literal>. The <command>lustatus</command> command reports if the new boot
environment is ready to be activated and be rebooted. The new boot environment
is activated to become the current boot environment. </para><screen># <userinput>lucreate -n svm_be -m /:/dev/md/dsk/d1:mirror,ufs \  
-m /:/dev/dsk/c0t2d0s0:attach</userinput>
# <userinput>lustatus</userinput>
# <userinput>luactivate svm_be</userinput>
# <userinput>lustatus</userinput>
# <userinput>init 6</userinput></screen>
</sect1><sect1 id="luexample-28"><title>Example of Creating an Empty Boot Environment
and Installing a Solaris Flash Archive</title><para>The following procedures cover the three-step process:</para><itemizedlist><listitem><para>Creating the empty boot environment</para>
</listitem><listitem><para>Installing the archive</para>
</listitem><listitem><para>Activating the boot environment which then becomes the currently
running boot environment.</para>
</listitem>
</itemizedlist><para>The <command>lucreate</command> command creates a boot environment that
is based on the file systems in the active boot environment. When you use
the <command>lucreate</command> command with the <option>s</option> - option, <command>lucreate</command> quickly creates an empty boot environment. The slices are
reserved for the file systems specified, but no file systems are copied. The
boot environment is named, but not actually created until installed with a Solaris Flash archive.
When the empty boot environment is installed with an archive, file systems
are installed on the reserved slices. The boot environment is then activated.</para><sect2 id="luexample-42"><title>To Create an Empty Boot Environment</title><para>In this first step, an empty boot environment is created. Slices are
reserved for the file systems that are specified, but no copy of file systems
from the current boot environment occurs. The new boot environment is named <literal>second_disk</literal>. </para><screen># <userinput>lucreate  -s - -m /:/dev/dsk/c0t1d0s0:ufs \  
-n second_disk</userinput></screen><para>The boot environment is ready to be populated with a Solaris Flash archive.</para><para><olink targetptr="luexample-fig-6" remap="internal">Figure 10&ndash;3</olink> shows the
creation of an empty boot environment.</para><figure id="luexample-fig-6"><title>Creating an Empty Boot Environment</title><mediaobject><imageobject><imagedata entityref="lu-empty-boot-env"/>
</imageobject><textobject><simpara>The context describes the illustration.</simpara>
</textobject>
</mediaobject>
</figure>
</sect2><sect2 id="luexample-40"><title>To Install a Solaris Flash Archive on
the New Boot Environment</title><para>In this second step, an archive is installed on the <literal>second_disk</literal> boot
environment that was created in the previous example. The archive is located
on the local system. The operating system versions for the <option>s</option> and <option>a</option> options are both Solaris Express 5/07 releases. The archive
is named <literal>Solaris_11.flar</literal>.</para><screen># <userinput>luupgrade -f -n second_disk \
-s /net/installmachine/export/Solaris_11/OS_image \ 
-a /net/server/archive/11.flar</userinput> </screen><para>The boot environment is ready to be activated.</para>
</sect2><sect2 id="luexample-50"><title>To Activate the New Boot Environment</title><para>In this last step, the <literal>second_disk</literal> boot environment
is made bootable with the <command>luactivate</command> command. The system
is then rebooted and <literal>second_disk</literal> becomes the active boot
environment. </para><screen># <userinput>luactivate second_disk</userinput>
# <userinput>init 6</userinput></screen><itemizedlist><listitem><para>For step-by-step information about creating an empty boot
environment, see <olink targetptr="lucreate-28" remap="internal">To Create an Empty Boot Environment
for a  Solaris Flash Archive</olink>.</para>
</listitem><listitem><para>For step-by-step information about creating a Solaris Flash archive,
see  <olink targetdoc="solinstallflash" targetptr="flashcreate-1" remap="external">Chapter 3, <citetitle remap="chapter">Creating Solaris Flash Archives (Tasks),</citetitle> in <citetitle remap="book">Solaris Express Installation Guide: Solaris Flash Archives (Creation and Installation)</citetitle></olink>.</para>
</listitem><listitem><para>For step-by-step information about activating a boot environment
or falling back to the original boot environment, see <olink targetptr="luupgrade-85" remap="internal">Chapter&nbsp;6, Failure Recovery: Falling Back to
the Original Boot Environment (Tasks)</olink>.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
</chapter>