System Administration Guide: Basic Administration
Previous Next

Booting the Failsafe Archive on a SPARC Based System

Booting a system from a root (/) file system image that is a boot archive, and then remounting this file system on the actual root device can sometimes result in a boot archive and root file system that do not match, or are inconsistent. Under these conditions, the proper operation and integrity of the system is compromised. After the root (/) file system is mounted, and before relinquishing the in-memory file system, the system performs a consistency verification against the two files systems. If an inconsistency is detected, the normal boot sequence is suspended and the system reverts to failsafe mode.

Also, if a system failure, a power failure, or a kernel panic occurs immediately following a kernel file update, the boot archives and the root (/) file system might not be synchronized. Although the system might still boot with the inconsistent boot archives, it is recommended that you boot the failsafe archive to update the boot archives. You can also use the bootadm command to manually update the boot archives. For more information, see Using the bootadm Command to Manage the Boot Archives.

The failsafe archive can be booted for recovery purposes or to update the boot archive on both the SPARC and x86 platforms.

On the SPARC platform the failsafe archive is:

/platform/`uname -m`/failsafe

You would boot the failsafe archive by using the following syntax:

ok boot -F failsafe

Failsafe booting is also supported on systems that are booted from ZFS. When booting from a ZFS-rooted BE, each BE has its own failsafe archive. The failsafe archive is located where the root (/) file system is located, as is the case with a UFS-rooted BE. The default failsafe archive is the archive that is in the default bootable file system. The default bootable file system (dataset) is indicated by the value of the pool's bootfs property.

For information about booting an x86 based failsafe archive, see Booting the Failsafe Archive on an x86 Based System.

Another method that can be used to update the boot archives is to clear the boot-archive service. However, the preferred methods for updating the boot archives are to boot the failsafe archive or use the bootadm command. For more information, see How to Update an Inconsistent Boot Archive by Clearing the boot-archive Service.

How to Boot the Failsafe Archive on a SPARC Based System

Use this procedure to boot the failsafe archive on a SPARC based system. If the system does not boot after the boot archive is updated, you might need to boot the system in single-user mode. For more information, see SPARC: How to Boot a System to Run Level S (Single-User Level).


Note - This procedures also includes instructions for booting the failsafe archive for a specific ZFS dataset.


  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. Bring the system to the ok prompt:
    # init 0
  3. Boot the failsafe archive.
    • To boot the default failsafe archive, type:
      ok boot -F failsafe
    • To boot the failsafe archive of a specific ZFS dataset:
      ok boot -F failsafe -Z dataset

      For example:

      ok  boot -F failsafe -Z rpool/ROOT/zfsBE2

      Note - To determine the name of the dataset to boot, first use the boot -L command to display a list of the available BEs on the system. For more information, see SPARC: How to List Available Bootable Datasets Within a ZFS Root Pool.


    If an inconsistent boot archive is detected a message is displayed.

  4. To update the boot archive, type y and press Return.
    An out of sync boot archive was detected on rpool.
    The boot archive is a cache of files used during boot
    and should be kept in sync to ensure proper system operation.
    
    Do you wish to automatically update this boot archive? [y,n,?] y

    If the archive was updated successfully, a message is displayed:

    The boot archive on rpool was updated successfully.
Example 12-7 SPARC: Booting the Failsafe Archive

This example shows how to boot the failsafe archive on a SPARC based system. If no device is specified, the failsafe archive for the default boot device is booted.

ok boot -F failsafe
Resetting ...
screen not found.
Can't open input device. Keyboard not present.  Using ttya for input and output.

Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.23, 1024 MB memory installed, Serial #13116682.
Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.

Rebooting with command: boot -F failsafe
Boot device: /pci@1f,4000/scsi@3/disk@1,0:a  File and args: -F failsafe
SunOS Release 5.10t
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Configuring /dev Searching for installed OS instances...

An out of sync boot archive was detected on /dev/dsk/c0t1d0s0.
The boot archive is a cache of files used during boot and
should be kept in syncto ensure proper system operation.

Do you wish to automatically update this boot archive? [y,n,?] y 
Updating boot archive on /dev/dsk/c0t1d0s0.
The boot archive on /dev/dsk/c0t1d0s0 was updated successfully.

Solaris 5.10 was found on /dev/dsk/c0t1d0s0.
Do you wish to have it mounted read-write on /a? [y,n,?] n
Starting shell.
#
Example 12-8 SPARC: Booting the Failsafe Archive for a Specified ZFS Dataset

This example shows how to boot the failsafe archive of a ZFS dataset. Note that the boot -L command is first used to display a list of available boot environments. This command must be run at the ok prompt.

ok boot -L
Rebooting with command: boot -L                                       
Boot device: /pci@1f,4000/scsi@3/disk@1,0  File and args: -L
1 zfsBE2
Select environment to boot: [ 1 - 1 ]: 1

To boot the selected entry, invoke:
boot [<root-device>] -Z rpool/ROOT/zfsBE2

Program terminated
{0} ok 





Resetting ... 

screen not found.
Can't open input device.
Keyboard not present.  Using ttya for input and output.

Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.23, 1024 MB memory installed, Serial #13116682.
Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.



                                                                      
{0} ok  boot -F failsafe -Z rpool/ROOT/zfsBE2
Boot device: /pci@1f,4000/scsi@3/disk@1,0  File and args: -F failsafe -Z 
rpool/ROOT/zfsBE2
SunOS Release 5.10
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Configuring /dev
Searching for installed OS instances...

ROOT/zfsBE2 was found on rpool.
Do you wish to have it mounted read-write on /a? [y,n,?] y
mounting rpool on /a

Starting shell.
# 
# 
# 
# zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool  16.8G  6.26G  10.5G    37%  ONLINE  /a
# 
# zpool status
  pool: rpool
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c0t1d0s0  ONLINE       0     0     0

errors: No known data errors
# 
# df -h
Filesystem             size   used  avail capacity  Mounted on
/ramdisk-root:a        163M   153M     0K   100%    /
/devices                 0K     0K     0K     0%    /devices
/dev                     0K     0K     0K     0%    /dev
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   601M   344K   601M     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
swap                   602M   1.4M   601M     1%    /tmp
/tmp/root/etc          602M   1.4M   601M     1%    /.tmp_proto/root/etc
fd                       0K     0K     0K     0%    /dev/fd
rpool/ROOT/zfsBE2       16G   5.7G   9.8G    37%    /a
rpool/export            16G    20K   9.8G     1%    /a/export
rpool/export/home       16G    18K   9.8G     1%    /a/export/home
rpool                   16G    63K   9.8G     1%    /a/rpool
Previous Next