System Administration Guide, Volume 1

IA: Booting a System

The following table describes the boot types covered in this chapter.

Table 11-1 IA: Boot Type Descriptions

Booting the System ... 

Is Usually Done ... 

See ... 

To run the Solaris Device Configuration Assistant 

After changing the hardware configuration of the system. This utility enables you to boot the Solaris system from a different boot device, configure new or misconfigured hardware, or perform other device- or boot-related tasks. 

"IA: How to Boot the Solaris Device Configuration Assistant"

To run level 3 (multiuser state) 

After shutting down the system or performing some system hardware maintenance task. This is the default boot level where all resources are available and users can log into the system. 

"IA: How to Boot a System to Run Level 3 (Multiuser State)"

To run level S (single-user state) 

After performing some system maintenance task such as backing up a file system. At this level only some file systems are mounted and users cannot log into the system. 

"IA: How to Boot a System to Run Level S (Single-User State)"

Interactively 

After making temporary changes to the system file or the kernel for testing purposes. This type of boot allows you to recover easily if there are problems with the system file or kernel by supplying an alternative pathname to these files when prompted. Use the default settings for the other system prompts. 

"IA: How to Boot a System Interactively"

Over the network 

To boot a system over the network. This procedure assumes the necessary setup has been completed on the boot server. 

"IA: How to Boot a System Over the Network"

From local CD-ROM or the network for recovery purposes 

To repair an important system file that is preventing the system from booting successfully. This type of boot is also used for installing (or upgrading) a new release of the operating system. 

"IA: How to Boot a System for Recovery Purposes"

To run the Solaris kernel debugger (kadb)

To troubleshooting system problems. 

"IA: How to Boot a System with the Kernel Debugger (kadb)"

To force a crash dump 

To troubleshoot system problems and saving core dumps of the operating system. 

"IA: How to Force a Crash Dump and Reboot the System"

The following procedures use the reset button to restart the system. If your system does not have a reset button, use the on/off switch to restart the system. You might be able to press the Control-Alt-Del keys to interrupt system operation, depending upon the state of the system.

IA: Booting the Solaris Device Configuration Assistant

The Solaris Device Configuration Assistant is a program that enables you to perform various hardware configuration and booting tasks. Two ways to access the Solaris Device Configuration Assistant are from the:

In the following sections you might be requested to insert the Solaris Device Configuration Assistant Boot Diskette to boot the Configuration Assistant. If your system's BIOS supports booting from the CD, you may, instead, insert the Solaris installation CD to boot the Configuration Assistant.

IA: How to Boot the Solaris Device Configuration Assistant

  1. Insert the Solaris Device Configuration Boot Diskette or the Solaris Installation CD in the appropriate drive.

  2. Press any key to reboot the system if the system displays the Type any key to reboot prompt. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power (on/off) switch.

  3. The first menu of the Configuration Assistant is displayed after a few minutes.

IA: How to Boot a System to Run Level 3 (Multiuser State)

  1. Press any key to reboot the system if the system displays the Type any key to reboot prompt. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power (on/off) switch.

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

  2. Type b to boot the system to run level 3. Press Enter.

    If you do not make a selection within five seconds, the system is automatically booted to run level 3.

  3. Verify the system boots to run level 3.

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


    hostname console login:

IA: Example--Booting a System to Run Level 3 (Multiuser State)


Type any key to reboot
           .
           .
           .
                     <<< Current Boot Parameters >>>
Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a
Boot args: 
Type    b [file-name] [boot-flags] <ENTER>      to boot with options
or      i <ENTER>                               to enter boot interpreter
or      <ENTER>                                 to boot with defaults

                  <<< timeout in 5 seconds >>>

Select (b)oot or (i)nterpreter: b
             .
             .
             .
venus console login:

IA: How to Boot a System to Run Level S (Single-User State)

  1. Press any key to reboot the system if the system displays the Type any key to reboot prompt. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power (on/off) switch.

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

  2. Type b -s to boot the system to run level S. Press Enter.

    If you do not make a selection within five seconds, the system is automatically booted to run level 3.

  3. Type the superuser password, if prompted.

  4. Verify the system is at run level S by using the who -r command.


    # who -r
       .       run-level S  Jul 19 14:37     S      0  3
  5. Perform the maintenance task that needed the run level change to S.

  6. Press Control-d to bring the system back to run level 3.

IA: Example--Booting a System to Run Level S (Single-User State)


Type any key to reboot
            .
            .
            .
 
                     <<< Current Boot Parameters >>>
Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a
Boot args: 
Type    b [file-name] [boot-flags] <ENTER>      to boot with options
or      i <ENTER>                               to enter boot interpreter
or      <ENTER>                                 to boot with defaults
 
 
                     <<< timeout in 5 seconds >>>

Select (b)oot or (i)nterpreter: b -s
              .
              .
              .
INIT: SINGLE USER MODE

Type Ctrl-d to proceed with normal startup,
(or give root password for system maintenance):  xxx
Entering System Maintenance Mode
              .
              .
              .
# who -r
   .       run-level S  Jul 19 14:37     S      0  3
(Perform some maintenance task)
# Press <Control-d>

IA: How to Boot a System Interactively

  1. Press any key to reboot the system if the system displays the Type any key to reboot prompt. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power (on/off) switch.

    The Primary Boot Subsystem menu is displayed after a few minutes.

  2. Select the Solaris partition (if not marked as active) from the list and press Enter. If you do not make a selection within 30 seconds, the active boot partition is selected automatically.

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

  3. Type b -a to boot the system interactively. Press Enter.

    If you do not make a selection within five seconds, the system is automatically booted to run level 3.

  4. Answer the system prompts as described in the following table.

    If the System Displays ... 

    Do the Following ... 

    Enter default directory for modules: [/platform/i86pc/kernel /kernel /usr/kernel]:

    Provide an alternate path for the modules directory and press Enter, or press Enter to use the default modules directory path.

    Name of system file [etc/system]:

    Provide the name of an alternate system file and press Enter, or press Enter to use the default /etc/system file. Type/dev/null if your /etc/system file has been damaged.

    root filesystem type [ufs]:

    Press Enter to use the default root file system type: UFS for local disk booting, or NFS for network booting. 

    Enter physical name of root device [physical_device_name]:

    Provide an alternate device name and press Enter, or press Enter to use the default physical name of the root device bootpath.

IA: Example--Booting a System Interactively

In the following example, the default choices (shown in square brackets []) are accepted.


Type any key to reboot
            .
            .
            .
 
                     <<< Current Boot Parameters >>>
Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a
Boot args: 
Type    b [file-name] [boot-flags] <ENTER>      to boot with options
or      i  <ENTER>                              to enter boot interpreter
or      <ENTER>                                 to boot with defaults
 
 
                     <<< timeout in 5 seconds >>>>
Select (b)oot or (i)nterpreter: b -a
Enter default directory for modules [/platform/i86pc/kernel /kernel /usr/kernel]: Enter
Name of system file [etc/system]:Enter
SunOS Release 5.8 Version Generic 32-bit
Copyright (c) 1983-2000 by Sun Microsystems, Inc.
root filesystem type [ufs]: Enter
Enter physical name of root device
[/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a]: Enter
configuring IPv4 interfaces: dnet0.
Hostname: venus
(fsck messages)
The system is coming up.  Please wait
(More messages)
venus console login:

IA: How to Boot a System Over the Network

Any system can boot over the network if there is a boot server available. You might want to boot a standalone system over the network temporarily if it cannot boot from the local disk.

The new menu, Set Network Configuration Strategy, on the Configuration Assistant's Boot Tasks Menu, enables you to select the appropriate boot strategy.

  1. Determine whether you want to boot over the network using the RARP/bootparams method or the DHCP method.

    There are two network configuration strategies to choose from, RARP (Reverse Address Resolution Protocol) or DHCP (Dynamic Host Configuration Protocol). The default network boot strategy is set to RARP. You can use either one depending on whether a RARP or DHCP boot server is available in your network.

  2. Insert the Configuration Assistant Boot Diskette or the Installation CD you wish to boot from.

  3. Press any key to reboot the system if the system displays the Type any key to reboot prompt. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power (on/off) switch.

  4. Press F2_Continue at the Solaris Device Configuration Assistant screen to scan for devices.

    Device identification is performed and a screen that displays the identified devices appears.

  5. Press F2_Continue at the Identified Devices screen to load drivers.

    Bootable drivers are loaded.

  6. Press F4_Boot Tasks from the Boot Solaris menu.

  7. Select Set Network Configuration Strategy and press F2_Continue.

  8. Select either RARP or DHCP and press F2_Continue.

    A screen that confirms your new network configuration strategy appears.

    Your network configuration strategy selection is saved as the default network boot method the next time this diskette is used for booting.

  9. Press F3_Back to return to the Boot Solaris menu.

  10. Select NET as the boot device from the Boot Solaris menu. Then press F2_Continue to boot the network device.

    The Solaris boot option screen is displayed.

IA: 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 a Solaris Installation CD or 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 devicename variable in the procedures below. If you need help identifying a system's device names, refer to Chapter 26, Accessing Devices (Overview).

Follow the instructions below to boot from the Solaris installation CD or the network.

  1. Boot from the Solaris installation CD (or the network) to single-user mode.

    1. Insert the Configuration Assistant Boot Diskette or the Installation CD you wish to boot from.

    2. Press any key to reboot the system if the system displays the Type any key to reboot prompt. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power (on/off) switch.

    3. Press the F2 key (F2_Continue) at the Solaris Device Configuration Assistant screen.

      Device identification is performed and a screen that displays the identified devices appears.

    4. Press the F2 key (F2_Continue) at the Identified Devices screen.

      Bootable drivers are loaded.

    5. Press the F2 key (F2_Continue) at the Solaris Device Configuration Assistant screen.

      Device identification is performed and a screen that displays the identified devices appears.

    6. Press the F2 key (F2_Continue) at the Identified Devices screen.

      Bootable drivers are loaded.

    7. Select the CD-ROM drive or network device from the Boot Solaris menu. Then press the F2 key (F2_Continue).

      The Current Boot Parameters menu is displayed.

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

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

  2. Mount the root (/) file system that has the invalid passwd file.


    # mount /dev/dsk/devicename /a
    
  3. Change to the newly mounted etc directory.


    # cd /a/etc
    
  4. Make the necessary change to the passwd file using an editor.


    # vi passwd
    
  5. Change to the root (/) directory.


    # cd /
    
  6. Unmount the /a directory.


    # umount /a
    
  7. Reboot the system.


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

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


    hostname console login:

IA: Example--Booting a System for Recovery Purposes


Type any key to reboot

SunOS Secondary Boot version 3.00


Solaris Intel Platform Edition Booting System

Running Configuration Assistant...
Autobooting from Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a

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.
      .
      .
      .
Boot Solaris

Select one of the identified devices to boot the Solaris kernel and
choose Continue.

To perform optional features, such as modifying the autoboot and property
settings, choose Boot Tasks.

An asterisk (*) indicates the current default boot device.

> To make a selection use the arrow keys, and press Enter to mark it [X].

[ ]  NET : DEC 21142/21143 Fast Ethernet
on Board PCI at Dev 3                                                
[ ]  DISK: (*) Target 0, QUANTUM  FIREBALL1280A
on Bus Mastering IDE controller on Board PCI at Dev 7, Func 1
[ ]  DISK: Target 1:ST5660A
on Bus Mastering IDE controller on Board PCI at Dev 7, Func 1
[ ]  DISK: Target 0:Maxtor 9 0680D4
on Bus Mastering IDE controller on Board PCI at Dev 7, Func 1
[ ]  CD  : Target 1:TOSHIBA  CD-ROM XM-5602B  1546
on Bus Mastering IDE controller on Board PCI at Dev 7, Func 1

F2_Continue   F3_Back   F4_Boot Tasks   F6_Help
      .
      .
      .
               <<< Current Boot Parameters >>>
Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a
Boot args: kernel/unix -r

Select the type of installation you want to perform:

1 Solaris Interactive
2 Custom JumpStart
3 Solaris Web Start
 
Enter the number of your choice followed by <ENTER> the key.
 
If you enter anything else, or if you wait for 30 seconds,
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

IA: How to Stop the System for Recovery Purposes

If possible, stop the system by using one of the following commands:

If the system doesn't respond to any input from the mouse or keyboard, press the reset key, if it exists, to reboot the system. Or you can use the power (on/off) switch to reboot the system.

IA: How to Boot a System with the Kernel Debugger (kadb)

  1. Press any key to reboot the system if the system displays the Type any key to reboot prompt. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power (on/off) switch.

  2. Type b kadb to boot the kernel debugger. Press Enter.

    If you do not make a selection within five seconds, the system is automatically booted to run level 3.

  3. Verify the system boots to run level 3.

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


    hostname console login:
  4. Verify that you can access the kernel debugger by pressing F1-a.

    The kadb[0]: prompt is displayed when you enter the kernel debugger.

IA: Example--Booting a System with the Kernel Debugger (kadb)


Type any key to reboot
        .
        .
        .
            <<< Current Boot Parameters >>>
Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a
Boot args:
Type    b [file-name] [boot-flags] <ENTER>     to boot with options
or      i <ENTER>                              to enter boot interpreter
or      <ENTER>                                to boot with defaults

            <<< timeout in 5 seconds >>>

Select (b)oot or (i)nterpreter: b kadb
        .
        .
        .
naboo console login: (Enter login and password)
(Press F1-a to verify you can access the kernel debugger)

IA: Forcing a Crash Dump and Rebooting the System

Saving core dumps of the operating system is sometimes necessary for troubleshooting purposes. The savecore feature and how it is set up is described in "Managing System Crash Information" in System Administration Guide, Volume 2. This section only describes how to reboot the system when the savecore feature is enabled.

IA: How to Force a Crash Dump and Reboot the System

The system must be booted with the kernel debugger option, kadb, to get to the kadb[0]: prompt and to enable forcing the crash dump.


Note -

You must be in text mode to enter the kernel debugger (kadb), so exit any window system (CDE or Open Windows) first.


  1. Press F1-a.


    kadb[0]:

    The kadb[0]: prompt is displayed.

  2. Type the following commands at the kadb[0]: prompt.


    Press <F1-a>
    kadb[0]: vfs_syncall/W ffffffff
    kadb[0]: 0>eip
    kadb[0]: :c
    kadb[0]: :c
    kadb[0]: :c
    

    After the first :c is typed, the system panics, so you need to type :c again. The system panics again, so type :c a third time to force the crash dump and reboot the system.

    After the crash dump is written to disk, the system continues to reboot.

  3. Verify that the system has rebooted by logging in at the console login prompt.