System Administration Guide, Volume I

SPARC: How to Boot a System for Recovery Purposes

This procedure is needed when an important file, such as /etc/passwd, has an invalid entry and is causing the boot process to fail.

If you need help identifying a system's device names, refer to Chapter 20, Accessing Devices (Overview).

  1. Follow the instructions below depending on whether you are booting from the Solaris installation CD or the network.

    If You Are Booting From ... 

    Then ... 

    Solaris installation CD 

    1. Insert the Solaris installation CD into the CD caddy. 

    2. Insert the CD caddy into the CD-ROM drive. 

    3. Boot from the installation CD in single-user mode: 

    ok boot cdrom -s

    The network and an installation server or remote CD drive are available 

    Use the following command: 

    ok boot net -s

  2. Mount the file system that has the file with an invalid entry.


    # mount /dev/dsk/device-name /a
    
  3. Change to the newly mounted directory.


    # cd /a/directory
    
  4. Set the terminal type.


    # TERM=sun
    # export TERM
    
  5. Remove the invalid entry from the file using an editor.


    # vi filename
    
  6. Change to the root (/) directory.


    # cd /
    
  7. Unmount the /a directory.


    # umount /a
    
  8. Reboot the system.


    # init 6
    
  9. Verify the system boots to run level 3.

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


    hostname console login:

SPARC: Example--Booting a System for Recovery Purposes

The following example shows how to repair an important system file (in this case, /etc/passwd) after booting from a local CD-ROM.


ok boot cdrom -s
# mount /dev/dsk/c0t3d0s0 /a
# cd /a/etc
# TERM=sun
# export TERM
# vi passwd
(Remove invalid entry)
# cd /
# umount /a
# init 6