Oracle Solaris ZFS Administration Guide

Booting For Recovery Purposes in a ZFS Root Environment

Use the following procedure if you need to boot the system so that you can recover from a lost root password or similar problem.

You will need to boot failsafe mode or boot from alternate media, depending on the severity of the error. In general, you can boot failsafe mode to recover a lost or unknown root password.

If you need to recover a root pool or root pool snapshot, see Recovering the ZFS Root Pool or Root Pool Snapshots.

ProcedureHow to Boot ZFS Failsafe Mode

  1. Boot failsafe mode.

    On a SPARC system:

    ok boot -F failsafe

    On an x86 system, select failsafe mode from the GRUB prompt.

  2. Mount the ZFS BE on /a when prompted:

    ROOT/zfsBE was found on rpool.
    Do you wish to have it mounted read-write on /a? [y,n,?] y
    mounting rpool on /a
    Starting shell.
  3. Change to the /a/etc directory.

    # cd /a/etc
  4. If necessary, set the TERM type.

    # TERM=vt100
    # export TERM
  5. Correct the passwd or shadow file.

    # vi shadow
  6. Reboot the system.

    # init 6

ProcedureHow to Boot ZFS From Alternate Media

If a problem prevents the system from booting successfully or some other severe problem occurs, you will need to boot from a network install server or from a Solaris installation CD, import the root pool, mount the ZFS BE, and attempt to resolve the issue.

  1. Boot from an installation CD or from the network.

    • SPARC:

      ok boot cdrom -s 
      ok boot net -s

      If you don't use the -s option, you will need to exit the installation program.

    • x86: Select the network boot or boot from local CD option.

  2. Import the root pool and specify an alternate mount point. For example:

    # zpool import -R /a rpool
  3. Mount the ZFS BE. For example:

    # zfs mount rpool/ROOT/zfsBE
  4. Access the ZFS BE contents from the /a directory.

    # cd /a
  5. Reboot the system.

    # init 6