<chapter id="luupgrade-85"><title>Failure Recovery: Falling Back to the
Original Boot Environment (Tasks)</title><highlights><para>This chapter explains how to recover from an activation failure.</para><para>If a failure is detected after upgrading or
if the application is not compatible with an upgraded component, fall back
to the original boot environment by using one of the following procedures,
depending on your platform.  </para><itemizedlist><listitem><para><emphasis role="strong">For SPARC based systems</emphasis>:</para><itemizedlist><listitem><para><olink targetptr="luupgrade-112" remap="internal">To Fall Back Despite Successful
New Boot Environment Activation</olink></para>
</listitem><listitem><para><olink targetptr="upgrade-64" remap="internal">To Fall Back From a Failed Boot
Environment Activation</olink></para>
</listitem><listitem><para><olink targetptr="luupgrade-98" remap="internal">To Fall Back to the Original
Boot Environment by Using a DVD, CD, or Net Installation Image</olink></para>
</listitem>
</itemizedlist>
</listitem><listitem><para><emphasis role="strong">For x86 based systems</emphasis>:</para><itemizedlist><listitem><para><olink targetptr="gaciv" remap="internal">To Fall Back Despite Successful New
Boot Environment Activation With the GRUB Menu</olink></para>
</listitem><listitem><para><olink targetptr="luupgrade-199" remap="internal">To Fall Back From a Failed
Boot Environment Activation With the GRUB Menu</olink></para>
</listitem><listitem><para><olink targetptr="gbdew" remap="internal">To Fall Back From a Failed Boot Environment
Activation With the GRUB Menu and the DVD or CD</olink></para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</highlights><sect1 id="gampw" arch="sparc"><title>Falling Back to the Original Boot Environment</title><para>You can fallback to the original boot environment by using three methods:</para><itemizedlist><listitem><para><olink targetptr="luupgrade-112" remap="internal">To Fall Back Despite Successful
New Boot Environment Activation</olink></para>
</listitem><listitem><para><olink targetptr="upgrade-64" remap="internal">To Fall Back From a Failed Boot
Environment Activation</olink></para>
</listitem><listitem><para><olink targetptr="luupgrade-98" remap="internal">To Fall Back to the Original
Boot Environment by Using a DVD, CD, or Net Installation Image</olink></para>
</listitem>
</itemizedlist><task id="luupgrade-112" arch="sparc"><title>To Fall Back Despite Successful
New Boot Environment Activation</title><tasksummary><para>Use this procedure when you have successfully activated your new boot
environment, but are unhappy with the results. </para>
</tasksummary><procedure>&suStepA;<step id="luupgrade-step-60"><para>Type:</para><screen># <userinput>/sbin/luactivate</userinput> <replaceable>BE_name</replaceable></screen><variablelist><varlistentry><term><replaceable>BE_name</replaceable></term><listitem><para>Specifies the name of the boot environment to be activated</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="upgrade-step-111"><para>Reboot. </para><screen># <userinput>init 6</userinput></screen><para>The previous working boot environment becomes the active boot environment.</para>
</step>
</procedure>
</task><task id="upgrade-64" arch="sparc"><title>To Fall Back From a Failed Boot
Environment Activation</title><tasksummary><itemizedlist><listitem><para>If you experience a failure while booting the new boot environment
and can boot the original boot environment in single-user mode, use this procedure
to fall back to the original boot environment.</para>
</listitem><listitem><para>If you need to boot from media or a net installation image,
see <olink targetptr="luupgrade-98" remap="internal">To Fall Back to the Original Boot Environment
by Using a DVD, CD, or Net Installation Image</olink>.</para>
</listitem>
</itemizedlist>
</tasksummary><procedure><step id="upgrade-step-1139"><para>At the OK prompt, boot the machine to single-user
state from the Solaris Operating System DVD, Solaris Software - 1 CD, the network, or a local
disk.</para><screen>OK <userinput>boot <replaceable>device_name</replaceable> -s</userinput></screen><variablelist><varlistentry><term><replaceable>device_name</replaceable></term><listitem><para>Specifies the name of devices from where the system can boot,
for example <filename>/dev/dsk/c0t0d0s0</filename></para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="luupgrade-step-601"><para>Type:</para><screen># <userinput>/sbin/luactivate</userinput> <replaceable>BE_name</replaceable></screen><variablelist><varlistentry><term><replaceable>BE_name</replaceable></term><listitem><para>Specifies the name of the boot environment to be activated </para>
</listitem>
</varlistentry>
</variablelist><itemizedlist><listitem><para>If this command fails to display a prompt, proceed to <olink targetptr="luupgrade-98" remap="internal">To Fall Back to the Original Boot Environment by
Using a DVD, CD, or Net Installation Image</olink>.</para>
</listitem><listitem><para>If the prompt is displayed, continue.</para>
</listitem>
</itemizedlist>
</step><step id="luupgrade-step-62"><para>At the prompt, type:</para><screen>Do you want to fallback to activate boot environment &lt;disk name> 
(yes or no)? <userinput>yes</userinput></screen><para>A message displays that the fallback activation is successful.</para>
</step><step id="upgrade-step-1111"><para>Reboot. </para><screen># <userinput>init 6</userinput></screen><para>The previous working boot environment becomes the active boot environment.</para>
</step>
</procedure>
</task><task id="luupgrade-98" arch="sparc"><title>To Fall Back to the Original Boot
Environment by Using a DVD, CD, or Net Installation Image</title><tasksummary><para>Use this procedure to boot from a DVD, CD, a net installation image
or another disk that can be booted. You need to mount the root (<filename>/</filename>)
slice from the last-active boot environment. Then run the <command>luactivate</command> command,
which makes the switch. When you reboot, the last-active boot environment
is up and running again.</para>
</tasksummary><procedure><step id="upgrade-step-139"><para>At the OK prompt, boot the machine to single-user
state from the Solaris Operating System DVD, Solaris Software - 1 CD, the network, or a local
disk:</para><screen>OK <userinput>boot cdrom -s</userinput> </screen><para>or</para><screen>OK <userinput>boot net -s</userinput></screen><para>or</para><screen>OK <userinput>boot <replaceable>device_name</replaceable> -s</userinput></screen><variablelist><varlistentry><term><replaceable>device_name</replaceable></term><listitem><para>Specifies the name of the disk and the slice where a copy
of the operating system resides, for example <filename>/dev/dsk/c0t0d0s0</filename></para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="upgrade-step-138"><para>If necessary, check the integrity of the
root (<filename>/</filename>) file system for the fallback boot environment.</para><screen># <userinput>fsck</userinput> <replaceable>device_name</replaceable></screen><variablelist><varlistentry><term><replaceable>device_name</replaceable></term><listitem><para>Specifies the location of the root (<filename>/</filename>)
file system on the disk device of the boot environment you want to fall back
to. The device name is entered in the form of <filename>/dev/dsk/c</filename><replaceable>w</replaceable><filename>t</filename><replaceable>x</replaceable><filename>d</filename><replaceable>y</replaceable><filename>s</filename><replaceable>z</replaceable>.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="upgrade-step-267"><para>Mount the active boot environment root (<filename>/</filename>) slice to some directory, such as <filename>/mnt</filename>:
 </para><screen># <userinput>mount</userinput> <replaceable>device_name</replaceable> <userinput>/mnt</userinput></screen><variablelist><varlistentry><term><replaceable>device_name</replaceable></term><listitem><para>Specifies the location of the root (<filename>/</filename>)
file system on the disk device of the boot environment you want to fall back
to. The device name is entered in the form of <filename>/dev/dsk/c</filename><replaceable>w</replaceable><filename>t</filename><replaceable>x</replaceable><filename>d</filename><replaceable>y</replaceable><filename>s</filename><replaceable>z</replaceable>.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="upgrade-step-109"><para>From the active boot environment root (<filename>/</filename>) slice, type:</para><screen># <userinput>/mnt/sbin/luactivate</userinput></screen><para><command>luactivate</command> activates the previous working boot environment
and indicates the result.</para>
</step><step id="upgrade-step-137"><para>Unmount <filename>/mnt</filename></para><screen># <userinput>umount</userinput>  <userinput>/mnt</userinput></screen>
</step><step id="upgrade-step-1110"><para>Reboot. </para><screen># <userinput>init 6</userinput></screen><para>The previous working boot environment becomes the active boot environment.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="gampc" arch="x86"><title>Falling Back to the Original Boot Environment</title><para>To fall back to the original boot environment, choose the procedure
the best fits your circumstances.</para><itemizedlist><listitem><para><olink targetptr="gaciv" remap="internal">To Fall Back Despite Successful New
Boot Environment Activation With the GRUB Menu</olink></para>
</listitem><listitem><para><olink targetptr="luupgrade-199" remap="internal">To Fall Back From a Failed
Boot Environment Activation With the GRUB Menu</olink></para>
</listitem><listitem><para><olink targetptr="gbdew" remap="internal">To Fall Back From a Failed Boot Environment
Activation With the GRUB Menu and the DVD or CD</olink></para>
</listitem>
</itemizedlist><task id="gaciv" arch="x86"><title>To Fall Back Despite Successful New Boot
Environment Activation With the GRUB Menu</title><tasksummary><para>Use this procedure when you have successfully activated your new boot
environment, but are dissatisfied with the results. You can quickly switch
back to the original boot environment by using the GRUB menu.</para><note><para>The boot environments that are being switched must be GRUB boot
environments that were created with GRUB software. If a boot environment was
created with the <emphasis role="strong">Solaris 8, 9, or 10 3/05 release</emphasis>,
the boot environment is not a GRUB boot environment.</para>
</note>
</tasksummary><procedure>&suStepA;<step><para>Reboot the system.</para><screen># <userinput>init 6</userinput></screen><para>The GRUB menu is displayed. The Solaris OS is the original boot environment.
The <literal>second_disk</literal> boot environment was successfully activated
and appears on the GRUB menu. The <literal>failsafe</literal> entries are
for recovery if for some reason the primary entry does not boot.</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>
</step><step><para>To boot to the original boot environment, use the arrow key to
select the original boot environment and press Return.</para>
</step>
</procedure><example id="galuj"><title>To Fall Back Despite Successful New Boot Environment Activation</title><screen># <userinput>su</userinput>
# <userinput>init 6</userinput></screen><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><para>Select the original boot environment, <literal>Solaris</literal>.</para>
</example>
</task><task id="luupgrade-199" arch="x86"><title>To Fall Back From a Failed Boot
Environment Activation With the GRUB Menu</title><tasksummary><para>If you experience a failure while booting, use the following procedure
to fall back to the original boot environment. In this example, the GRUB menu
is displayed correctly, but the new boot environment is not bootable. The
device is <filename>/dev/dsk/c0t4d0s0</filename>. The original boot environment, <literal>c0t4d0s0</literal>, becomes the active boot environment.</para><caution><para><emphasis role="strong">For the Solaris 10 3/05 release</emphasis>,
the recommended action to fall back if the previous boot environment and new
boot environment were on different disks included changing the hard disk boot
order in the BIOS. <emphasis role="strong">Starting with the Solaris 10 1/06
release</emphasis>, changing the BIOS disk order is unnecessary and is strongly
discouraged. Changing the BIOS disk order might invalidate the GRUB menu and
cause the boot environment to become unbootable. If the BIOS disk order is
changed, reverting the order back to the original settings restores system
functionality.</para>
</caution>
</tasksummary><procedure>&suStepA;<step id="luupgrade-step-191"><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>
</step><step><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 this procedure, <olink targetptr="gbdew" remap="internal">To Fall Back From a
Failed Boot Environment Activation With the GRUB Menu and the DVD or CD</olink>.</para>
</step><step id="upgrade-step-1239"><para>Boot to single user mode by editing the
Grub menu.</para><substeps><step><para>To edit the GRUB main menu, type <userinput>e</userinput>. </para><para>The GRUB edit menu is displayed.</para><screen>root (hd0,2,a)
kernel$ /platform/i86pc/kernel/<replaceable>$ISADIR</replaceable>/unix
module$ /platform/i86pc/<replaceable>$ISADIR</replaceable>/boot_archive</screen><note><para><emphasis role="strong">Starting with the 5/07 Developer release,</emphasis> GRUB
has enhanced support for directly booting the <literal>unix</literal> kernel.
The new keyword, <literal>$ISADIR</literal>, resolves to <literal>amd64</literal> for
64-bit hardware and to null for 32-bit hardware. See <olink targetdoc="solinstallnet" targetptr="gazva" remap="external"><citetitle remap="section">GRUB Menu Commands for Installation</citetitle> in <citetitle remap="book">Solaris Express Installation Guide: Network-Based Installations</citetitle></olink>.</para>
</note>
</step><step><para>Select the original boot environment's kernel entry by using the
arrow keys. </para>
</step><step><para>To edit the boot entry, type <userinput>e</userinput>. </para><para>The
kernel entry is displayed in the GRUB edit menu.</para><screen>grub edit>kernel$ /boot/platform/i86pc/kernel/unix</screen>
</step><step><para>Type <userinput>-s</userinput> and press Enter. </para><para>The
following example notes the placement of the <option>s</option> option.</para><screen>grub edit>kernel$ /boot/platform/i86pc/kernel/unix <userinput>-s</userinput></screen>
</step><step><para>To begin the booting process in single user mode, type b. </para>
</step>
</substeps>
</step><step id="upgrade-step-238"><para>If necessary, check the integrity of the
root (<filename>/</filename>) file system for the fallback boot environment.</para><screen># <userinput>fsck</userinput> <replaceable>mount_ point</replaceable></screen><variablelist><varlistentry><term><replaceable>mount_point</replaceable></term><listitem><para>A root (<filename>/</filename>) file system that is known
and reliable</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="upgrade-step-167"><para>Mount the original boot environment root
slice to some directory (such as <filename>/mnt</filename>):  </para><screen># <userinput>mount</userinput> <replaceable>device_name</replaceable> <userinput>/mnt</userinput></screen><variablelist><varlistentry><term><replaceable>device_name</replaceable></term><listitem><para>Specifies the location of the root (<filename>/</filename>)
file system on the disk device of the boot environment you want to fall back
to. The device name is entered in the form of <filename>/dev/dsk/c</filename><replaceable>w</replaceable><filename>t</filename><replaceable>x</replaceable><filename>d</filename><replaceable>y</replaceable><filename>s</filename><replaceable>z</replaceable>.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="upgrade-step-209"><para>From the active boot environment root slice,
type:</para><screen># <userinput>/mnt/sbin/luactivate</userinput></screen><para><command>luactivate</command> activates the previous working boot environment
and indicates the result.</para>
</step><step id="upgrade-step-237"><para>Unmount <filename>/mnt</filename>.</para><screen># <userinput>umount /mnt</userinput></screen>
</step><step id="upgrade-step-211"><para>Reboot. </para><screen># <userinput>init 6</userinput></screen><para>The previous working boot environment becomes the active boot environment.</para>
</step>
</procedure>
</task><task id="gbdew" arch="x86"><title>To Fall Back From a Failed Boot Environment
Activation With the GRUB Menu and the DVD or CD</title><tasksummary><para>If you experience a failure while booting, use the following procedure
to fall back to the original boot environment. In this example, the new boot
environment was not bootable. Also, the GRUB menu does not display. The device
is <filename>/dev/dsk/c0t4d0s0</filename>. The original boot environment, <literal>c0t4d0s0</literal>, becomes the active boot environment.</para><caution><para><emphasis role="strong">For the Solaris 10 3/05 release</emphasis>,
the recommended action to fall back if the previous boot environment and new
boot environment were on different disks included changing the hard disk boot
order in the BIOS. <emphasis role="strong">Starting with the Solaris 10 1/06
release</emphasis>, changing the BIOS disk order is unnecessary and is strongly
discouraged. Changing the BIOS disk order might invalidate the GRUB menu and
cause the boot environment to become unbootable. If the BIOS disk order is
changed, reverting the order back to the original settings restores system
functionality.</para>
</caution>
</tasksummary><procedure>&suStepA;<step id="gbdez"><para>Insert the Solaris Operating System for x86 Platforms DVD or Solaris Software for x86 Platforms - 1 CD.</para>
</step><step><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>
</step><step><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>
</step><step><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>
</step><step><para>Type: n</para><screen>Starting shell...
#</screen><para>You are now in single user mode.</para>
</step><step id="gbdem"><para>If necessary, check the integrity of the root (<filename>/</filename>) file system for the fallback boot environment.</para><screen># <userinput>fsck</userinput> <replaceable>mount_ point</replaceable></screen><variablelist><varlistentry><term><replaceable>mount_point</replaceable></term><listitem><para>A root (<filename>/</filename>) file system that is known
and reliable</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="gbdfk"><para>Mount the original boot environment root slice to some
directory (such as <filename>/mnt</filename>):  </para><screen># <userinput>mount</userinput> <replaceable>device_name</replaceable> <userinput>/mnt</userinput></screen><variablelist><varlistentry><term><replaceable>device_name</replaceable></term><listitem><para>Specifies the location of the root (<filename>/</filename>)
file system on the disk device of the boot environment you want to fall back
to. The device name is entered in the form of <filename>/dev/dsk/c</filename><replaceable>w</replaceable><filename>t</filename><replaceable>x</replaceable><filename>d</filename><replaceable>y</replaceable><filename>s</filename><replaceable>z</replaceable>.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="gbdfd"><para>From the active boot environment root slice, type:</para><screen># <userinput>/mnt/sbin/luactivate</userinput>
Do you want to fallback to activate boot environment c0t4d0s0
(yes or no)? <userinput>yes</userinput></screen><para><command>luactivate</command> activates the previous working boot environment
and indicates the result.</para>
</step><step id="gbden"><para>Unmount <filename>/mnt</filename>.</para><screen># <userinput>umount</userinput> <replaceable>device_name</replaceable></screen><variablelist><varlistentry><term><replaceable>device_name</replaceable></term><listitem><para>Specifies the location of the root (<filename>/</filename>)
file system on the disk device of the boot environment you want to fall back
to. The device name is entered in the form of <filename>/dev/dsk/c</filename><replaceable>w</replaceable><filename>t</filename><replaceable>x</replaceable><filename>d</filename><replaceable>y</replaceable><filename>s</filename><replaceable>z</replaceable>.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="gbdfh"><para>Reboot. </para><screen># <userinput>init 6</userinput></screen><para>The previous working boot environment becomes the active boot environment.</para>
</step>
</procedure>
</task>
</sect1>
</chapter>