If an Oracle Solaris 11 system becomes unbootable, you most likely will need to perform a recovery boot. You can boot from installation media or from a backup BE.
If you need to perform complete system (bare metal) recovery, see How to Create a Recovery Archive in Using Unified Archives for System Recovery and Cloning in Oracle Solaris 11.3.
The following error and recovery scenarios are similar to previous releases:
You can use the boot –a command to bypass a problem in the /etc/system file. When prompted, use syntax that is similar to the following:
Name of system file [/etc/system]: /dev/null
Press Return at the other prompts, as needed.
Consider creating a backup BE before you make any system configuration changes. Having a backup BE enables you to boot to another BE if some error occurs during the image update process. Several different pkg operations will create a backup BE on the system. You do not need to separately create a backup BE before you perform a pkg operation because you can specify options with the pkg command that will create the backup BE for you. Also, you might want to create a clone BE before using the sysconfig command on your system. For instructions on booting from a backup BE, see How to Boot From a Backup BE for Recovery Purposes.
Boot from the installation media or from an install server over the network to recover from a problem that is preventing the system from booting or to recover from a lost root password.
Boot a system in single-user mode to resolve a minor problem, such as correcting the root shell entry in the /etc/passwd file or changing a NIS server.
Resolving a boot configuration problem generally involves importing the root pool, mounting the BE, and fixing the problem, for example reinstalling the x86 boot loader if it has become corrupted.
Booting the failsafe archive is no longer supported on SPARC and x86 platforms. Whenever possible, use up-to-date backup BEs for recovery purposes. BEs are bootable instances of the Oracle Solaris image, plus any other application software packages that are installed into that image.
If the system does not boot from the active BE, select a backup BE from which to boot.
ok boot -L
Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a File and args: -L 1 Solaris11.3_SPARC 2 solaris11.2-backup Select environment to boot: [ 1 - 2 ]: 2
After you select the BE from which to boot, identify the on-screen boot path and type that information at the prompt.
To boot the selected entry, invoke: boot [<root-device>] -Z rpool/ROOT/solaris-backup Program terminated {0} ok boot -Z rpool/ROOT/solaris-backup
If the system does not boot, review the additional boot recovery steps in How to Boot a System For Recovery Purposes.
If the system does not boot from the backup BE, review the additional boot recovery steps in How to Boot a System For Recovery Purposes.
x86: Live Media – Boot from the installation media and use a GNOME terminal for the recovery procedure.
SPARC: Text installation – Boot from the install media or from the network, and select option 3 Shell from the text installation screen.
x86: Text installation – From the GRUB menu, select the Text Installer and command line boot entry, then select the option 3 Shell from the text installation screen.
SPARC: Automated installation – Use the following command to boot directly from an installation menu that allows you to exit to a shell.
ok boot net:dhcp
x86: Automated installation – Booting from an install server on the network requires a PXE boot. Select the Text Installer and command line entry from the GRUB menu. Then, select the option 3 Shell from the text installation screen.
For example, after the system is booted, select option 3 Shell.
1 Install Oracle Solaris 2 Install Additional Drivers 3 Shell 4 Terminal type (currently xterm) 5 Reboot Please enter a number [1]: 3 To return to the main menu, exit the shell #
Resolve a bad root shell by booting the system to single-user mode and correcting the shell entry in the /etc/passwd file.
On an x86 based system, edit the selected boot entry in the GRUB menu, then add the –s kernel argument to the end of the $kernel line.
On a SPARC based system, shut down the system and boot to single-user mode. After you log in as the root user, edit the /etc/passwd file, and fix the root shell entry.
# init 0 ok boot -s Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a ... SunOS Release 5.11 Version 11.3 64-bit Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved. Booting to milestone "milestone/single-user:default". Hostname: systema.domain Requesting System Maintenance Mode SINGLE USER MODE Enter user name for system maintenance (control-d to bypass): root Enter root password (control-d to bypass): xxxxxxx single-user privilege assigned to root on /dev/console. Entering System Maintenance Mode Aug 3 15:46:21 su: 'su root' succeeded for root on /dev/console Oracle Corporation SunOS 5.11 11.3 July 2013 su: No shell /usr/bin/mybash. Trying fallback shell /sbin/sh. root@systema.domain:~# TERM =vt100; export TERM root@systema.domain:~# vi /etc/passwd root@systema.domian:~# <Press control-d> logout svc.startd: Returning to milestone all.
Resolve a corrupt boot loader problem.
First, boot from media or the network by using one of the boot methods that are listed in Step 1. Then, import the root pool.
# zpool import -f rpool
Then, reinstall the boot loader as follows:
# bootadm install-bootloader -f -P rpool
Where –f forces the installation of the boot loader and bypasses any checks related to not downgrading the version of the boot loader on the system. The –P option specifies the root pool.
Exit and reboot the system.
# exit 1 Install Oracle Solaris 2 Install Additional Drivers 3 Shell 4 Terminal type (currently sun-color) 5 Reboot Please enter a number [1]: 5
Confirm that the system boots successfully.
Resolve an unknown root password that prevents you from logging into the system.
First, you must boot from media or the network by using one of the boot methods that are listed in Step 1. Then, import the root pool (rpool) and mount the BE to remove the root password entry. This process is identical on SPARC and x86 platforms.
# zpool import -f rpool # beadm list be_find_current_be: failed to find current BE name be_find_current_be: failed to find current BE name BE Active Mountpoint Space Policy Created -- ------ ---------- ----- ------ ------- solaris - - 11.45M static 2011-10-22 00:30 solaris-2 R - 12.69G static 2011-10-21 21:04 # mkdir /a # beadm mount solaris-2 /a # TERM=vt100 # export TERM # cd /a/etc # vi shadow <Carefully remove the unknown password> # cd / # beadm umount solaris-2 # halt
This step assumes that you have removed an unknown root password in the previous step.
ok boot -s Boot device: /pci@780/pci@0/pci@9/scsi@0/disk@0,0:a File and args: -s SunOS Release 5.11 Version 11.3 64-bit Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved. Booting to milestone "milestone/single-user:default". Hostname: systema.domain Requesting System Maintenance Mode SINGLE USER MODE Enter user name for system maintenance (control-d to bypass): root Enter root password (control-d to bypass): <Press return> single-user privilege assigned to root on /dev/console. Entering System Maintenance Mode . . . root@sysadma.domain:~# passwd -r files root New Password: xxxxxx Re-enter new Password: xxxxxx passwd: password successfully changed for root root@systema.central:~# <Press control-d> logout svc.startd: Returning to milestone all.