Solaris 10 5/08 Installation Guide: Solaris Live Upgrade and Upgrade Planning

Chapter 6 Failure Recovery: Falling Back to the Original Boot Environment (Tasks)

This chapter explains how to recover from an activation failure.

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.

SPARC: Falling Back to the Original Boot Environment

You can fallback to the original boot environment by using three methods:

ProcedureSPARC: To Fall Back Despite Successful New Boot Environment Activation

Use this procedure when you have successfully activated your new boot environment, but are unhappy with the results.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # /sbin/luactivate BE_name
    
    BE_name

    Specifies the name of the boot environment to be activated

  3. Reboot.


    # init 6
    

    The previous working boot environment becomes the active boot environment.

ProcedureSPARC: To Fall Back From a Failed Boot Environment Activation

  1. 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.


    OK boot device_name -s
    
    device_name

    Specifies the name of devices from where the system can boot, for example /dev/dsk/c0t0d0s0

  2. Type:


    # /sbin/luactivate BE_name
    
    BE_name

    Specifies the name of the boot environment to be activated

  3. At the prompt, type:


    Do you want to fallback to activate boot environment <disk name> 
    (yes or no)? yes
    

    A message displays that the fallback activation is successful.

  4. Reboot.


    # init 6
    

    The previous working boot environment becomes the active boot environment.

ProcedureSPARC: To Fall Back to the Original Boot Environment by Using a DVD, CD, or Net Installation Image

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 (/) slice from the last-active boot environment. Then run the luactivate command, which makes the switch. When you reboot, the last-active boot environment is up and running again.

  1. 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:


    OK boot cdrom -s 
    

    or


    OK boot net -s
    

    or


    OK boot device_name -s
    
    device_name

    Specifies the name of the disk and the slice where a copy of the operating system resides, for example /dev/dsk/c0t0d0s0

  2. If necessary, check the integrity of the root (/) file system for the fallback boot environment.


    # fsck device_name
    
    device_name

    Specifies the location of the root (/) 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 /dev/dsk/cwtxdysz.

  3. Mount the active boot environment root (/) slice to some directory, such as /mnt:


    # mount device_name /mnt
    
    device_name

    Specifies the location of the root (/) 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 /dev/dsk/cwtxdysz.

  4. From the active boot environment root (/) slice, type:


    # /mnt/sbin/luactivate
    

    luactivate activates the previous working boot environment and indicates the result.

  5. Unmount /mnt


    # umount  /mnt
    
  6. Reboot.


    # init 6
    

    The previous working boot environment becomes the active boot environment.

x86: Falling Back to the Original Boot Environment

To fall back to the original boot environment, choose the procedure the best fits your circumstances.

Procedurex86: To Fall Back Despite Successful New Boot Environment Activation With the GRUB Menu

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.


Note –

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 Solaris 8, 9, or 10 3/05 release, the boot environment is not a GRUB boot environment.


  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Reboot the system.


    # init 6
    

    The GRUB menu is displayed. The Solaris OS is the original boot environment. The second_disk boot environment was successfully activated and appears on the GRUB menu. The failsafe entries are for recovery if for some reason the primary entry does not boot.


    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.
  3. To boot to the original boot environment, use the arrow key to select the original boot environment and press Return.


Example 6–1 To Fall Back Despite Successful New Boot Environment Activation


# su
# init 6

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.

Select the original boot environment, Solaris.


Procedurex86: To Fall Back From a Failed Boot Environment Activation With the GRUB Menu

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 /dev/dsk/c0t4d0s0. The original boot environment, c0t4d0s0, becomes the active boot environment.


Caution – Caution –

For the Solaris 10 3/05 release, 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. Starting with the Solaris 10 1/06 release, 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.


  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. To display the GRUB menu, reboot the system.


    # init 6
    

    The GRUB menu is displayed.


    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.
  3. 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 Solaris 10 1/06 release is not a GRUB boot environment. If you do not have a bootable GRUB boot environment, then skip to this procedure, x86: To Fall Back From a Failed Boot Environment Activation With the GRUB Menu and the DVD or CD.

  4. Boot to single user mode by editing the Grub menu.

    1. To edit the GRUB main menu, type e.

      The GRUB edit menu is displayed.


      root (hd0,2,a)
      kernel /platform/i86pc/multiboot
      module /platform/i86pc/boot_archive
    2. Select the original boot environment's kernel entry by using the arrow keys.

    3. To edit the boot entry, type e.

      The kernel entry is displayed in the GRUB edit menu.


      grub edit>kernel /boot/multiboot
    4. Type -s and press Enter.

      The following example notes the placement of the -s option.


      grub edit>kernel /boot/multiboot -s
      
    5. To begin the booting process in single user mode, type b.

  5. If necessary, check the integrity of the root (/) file system for the fallback boot environment.


    # fsck mount_ point
    
    mount_point

    A root (/) file system that is known and reliable

  6. Mount the original boot environment root slice to some directory (such as /mnt):


    # mount device_name /mnt
    
    device_name

    Specifies the location of the root (/) 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 /dev/dsk/cwtxdysz.

  7. From the active boot environment root slice, type:


    # /mnt/sbin/luactivate
    

    luactivate activates the previous working boot environment and indicates the result.

  8. Unmount /mnt.


    # umount /mnt
    
  9. Reboot.


    # init 6
    

    The previous working boot environment becomes the active boot environment.

Procedurex86: To Fall Back From a Failed Boot Environment Activation With the GRUB Menu and the DVD or CD

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 /dev/dsk/c0t4d0s0. The original boot environment, c0t4d0s0, becomes the active boot environment.


Caution – Caution –

For the Solaris 10 3/05 release, 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. Starting with the Solaris 10 1/06 release, 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.


  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Insert the Solaris Operating System for x86 Platforms DVD or Solaris Software for x86 Platforms - 1 CD.

  3. Boot from the DVD or CD.


    # init 6
    

    The GRUB menu is displayed.


    GNU GRUB version 0.95 (616K lower / 4127168K upper memory)
    +-------------------------------------------------------------------+
    |Solaris 10 5/08                                               |
    |Solaris 10 5/08 Serial Console ttya                           |
    |Solaris 10 5/08 Serial Console ttyb (for lx50, v60x and v65x  |
    +-------------------------------------------------------------------+
    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.
  4. Wait for the default option to boot or choose any option displayed.

    The installation screen is displayed.


    +-------------------------------------------------------------------+
    
    |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 <ENTER> key.|
    |        Alternatively, enter custom boot arguments directly.        |
    |
    |         If you wait 30 seconds without typing anything,            |
    |         an interactive installation will be started.               |
    +----------------------------------------------------------------- --+
  5. Choose the “Single user shell” option.

    The following message is displayed.


    Do you wish to automatically update the boot archive? y /n
  6. Type: n


    Starting shell...
    #

    You are now in single user mode.

  7. If necessary, check the integrity of the root (/) file system for the fallback boot environment.


    # fsck mount_ point
    
    mount_point

    A root (/) file system that is known and reliable

  8. Mount the original boot environment root slice to some directory (such as /mnt):


    # mount device_name /mnt
    
    device_name

    Specifies the location of the root (/) 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 /dev/dsk/cwtxdysz.

  9. From the active boot environment root slice, type:


    # /mnt/sbin/luactivate
    Do you want to fallback to activate boot environment c0t4d0s0
    (yes or no)? yes
    

    luactivate activates the previous working boot environment and indicates the result.

  10. Unmount /mnt.


    # umount device_name
    
    device_name

    Specifies the location of the root (/) 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 /dev/dsk/cwtxdysz.

  11. Reboot.


    # init 6
    

    The previous working boot environment becomes the active boot environment.