System Administration Guide: Basic Administration

Procedurex86: How to Boot a System for Recovery Purposes

Follow these steps to boot the system to repair a critical system resource. The example shows you how to boot from an Oracle Solaris Software CD, DVD, or from the network, mount the root (/) file system on the disk, and repair the /etc/passwd file.

Substitute the device name of the file system to be repaired for the device-name variable. If you need help identifying a system's device names, refer to Displaying Device Configuration Information in System Administration Guide: Devices and File Systems.

  1. Stop the system by using the system's Stop key sequence.

    Use the Stop key sequence for your system if you don't know the root password, or if you can't log in to the system. For more information, see x86: How to Stop a System for Recovery Purposes.

  2. Boot the system from the Oracle Solaris Software CD, DVD, or from the network, to single-user mode.

    1. Insert the Device Configuration Assistant boot diskette or the Oracle Solaris Software CD or DVD that you want to boot from.


      Note –

      If you are using the boot diskette the Device Configuration Assistant menu is displayed. If you are using the Oracle Solaris Software CD or DVD, the system boots automatically. To enter the Device Configuration Assistant menu, press ESC to interrupt the boot process, when prompted by the system.


    2. If the system displays the Press any key to reboot prompt, press any key to reboot the system.

      You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch.

  3. The Current Boot Parameters menu is displayed after a few minutes.

  4. Type b -s at the prompt. Press Enter.

    After a few minutes, the single-user mode # prompt is displayed.

  5. Mount the root (/) file system that contains the invalid passwd file.

  6. Change to the newly mounted etc directory.

  7. Make the necessary change to the file by using an editor.

  8. Change to the root (/) directory.

  9. Unmount the /a directory.

  10. Reboot the system. Verify that the system has booted to run level 3.

    The login prompt is displayed when the boot process has finished successfully.


    host-name console login:

Example 16–6 x86: Solaris 10: Booting a System for Recovery Purposes

The following example shows how to repair the /etc/passwd file after booting the system automatically from a local CD-ROM in Oracle Solaris 10. GRUB based booting was introduced in the Solaris 10 1/06 release. For information about booting a system for recovery purposes in a GRUB based boot environment, see How to Boot an x86 Based System in Failsafe Mode.


SunOS Secondary Boot version 3.00



                              Solaris Booting System



Running Configuration Assistant...





If the system hardware has changed, or to boot from a different
device, interrupt the autoboot process by pressing ESC.

Press ESCape to interrupt autoboot in 5 seconds.





Initializing system
Please wait...


                         <<< Current Boot Parameters >>>
Boot path: /pci@0,0/pci-ide@7,1/ide@1/sd@0,0:a
Boot args:


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)
Enter the number of your choice followed by the <ENTER> key.
Alternatively, enter custom boot arguments directly.

If you wait for 30 seconds without typing anything,
an interactive installation will be started.

Select type of installation: b -s
      .
      .
      .
# mount /dev/dsk/c0t0d0s0 /a
      .
      .
      .
# cd /a/etc
# vi passwd
(Remove invalid entry)
# cd /
# umount /a
# init 6