Solaris Handbook for SMCC Peripherals
  Suchtext Nur in diesem Buch
Dieses Buch im PDF-Format herunterladen

Before You Start

1

This chapter describes the requirements and procedures that you must perform to power off or shut down your system.
This chapter contains the following information:
Requirements you must performpage 2
Verifying which release of the SunOS you are currently runningpage 2
The init, shutdown, halt, and reboot commandspage 3
A closer look at the init commandpage 5
Shutting Down a Single-User System Using initpage 6
Shutting Down a Multiuser System Using shutdownpage 9

Requirements

Before you set up a peripheral device, you must:
  • Turn on the power to the system.
  • Install the Solaris software.

Imported image(504x53)

Verifying the System Environment

Verify the system environment that is installed on your system before you install a peripheral device.
* Type uname -rs and press Return. The operating system responds by displaying the following message:

  SunOS 5.x  

The screen should display the SunOS version of the operating system. The Solaris system environment, to which this manual refers, includes the SunOS operating system as well as compilers and other software.
Table 1-1 shows the SunOS releases shipped with the corresponding Solaris releases.
Table 1-1
If you are running the
following SunOS:
You are using the following
Solaris system environment:
SunOS 5.0Solaris 2.0
SunOS 5.1Solaris 2.1
SunOS 5.2Solaris 2.2
SunOS 5.3Solaris 2.3
SunOS 5.4Solaris 2.4
Table 1-1
If you are running the
following SunOS:
You are using the following
Solaris system environment:
SunOS 5.5Solaris 2.5
SunOS 5.5.1Solaris 2.5.1
SunOS 5.6Solaris 2.6

Imported image(504x53)

Shutting Down the System

Power off or shut down your system before you install a peripheral device.

Text Box(504x100)

These commands initiate shutdown procedures, kill all running processes, write data to disk, and shut down the system software to the appropriate run level.

Imported image(504x82)

Table 1-2 describes each of the shutdown commands. The sections that follow provide more details about the init and shutdown commands as they apply to the Solaris operating environment.
Table 1-2
CommandFunction
initUse the init command to shut down a single-user system or to change its run level. You can use init to place the system in power-down state (init 0) or into single-user state (init 1).
shutdownUse the shutdown command when shutting down a system with multiple users. The shutdown command sends a warning message to all users who are logged in, waits for 60 seconds (the default), and then shuts down the system to single-user state.
haltUse the halt command when the system must be stopped immediately and it is acceptable not to warn any current users. The halt command shuts down the system without any delay. It does not warn any other users on the system.
rebootUse the reboot command to shut down a single-user system and bring it into multiuser state. reboot does not warn other users on the system.

The init Command

Use the init command to shut down single-user systems and keep the system running correctly. In addition, use the init command to change init states. You can also specify the init state as an argument to the shutdown command with the -i option.

Text Box(504x43)

  • Power-down (run level 0)
  • Single-user (run levels 1 and s or S)
  • Multiuser (run levels 2 and 3)
  • Reboot (run levels 5 and 6)
Table 1-3 init
init StateRun LevelFunction
Power-down state0Shuts down the system so that it is safe to turn off the power.
System administrator state1Lets you perform administrative tasks on systems requiring only single user access. / and /usr are the only file systems mounted, and you can access only minimum kernel utilities. The terminal from which you issue this command becomes the console. No other users are logged in.
Multiuser state2Gives multiple users access to the system and the entire file system. All daemons run except the NFS server and syslog.
Remote resource-sharing state3Lets you perform normal operations with NFS resource-sharing available.
Alternative multiuser state4Provides no function at this time.
Table 1-3 init(Continued)
init StateRun LevelFunction
Interactive reboot state5Prompts you for a device other than the default boot devices. You can also change to this level by using the reboot -a command.
Reboot state6Shuts down the system to run level 0, and then reboots to multiuser level (the default level in the inittab file).
Single-user states or SRuns the system as a single user with all file systems mounted and accessible.
· Shutting Down a Single-User System Using init

Text Box(504x72)

Text Box(504x61)



Note - This task is optional; most device drivers are already part of the operating system. If a device driver is required, you would typically find a CD-ROM with the drive, as well as instructions on how to add the device driver. If you cannot find a CD-ROM or instructions on how to add a specific device driver, a new device driver is probably not needed. Therefore, you can skip this step.

  1. Ensure that the operating system checks for the presence of any newly installed peripheral devices when you power on or reboot your system.


  # touch /reconfigure  

Imported image(504x60)

  1. Change to the root directory.


  # cd /  

  1. Shut down the system.


  # init 0  

This command writes data to the disk, kills all active processes, brings the system down to power-down state, and displays the ok prompt.
  1. If you are asked for confirmation, type y.


  ok Do you want to continue? (y or n): y  


Note - Be sure that you turned on all SCSI devices, such as disk and tape drives, before you attempt to use the probe-scsi or probe-scsi-all commands. The operating system can detect connected SCSI devices only if you turned them on.

  1. Reset the SCSI bus and kill all running processes by typing:


  ok reset  
  Immediately press <Stop-a>  


Note - This interrupts the reboot process and clears all SCSI bus activity to ensure an effective probe-scsi or probe-scsi-all search.

  1. List the SCSI target IDs that are currently being used on the Host SCSI bus by typing:


  ok probe-scsi  

If you have more than one host bus on your system, use the probe-scsi-all command because it probes for all SCSI devices on every SCSI bus including the host bus.

Text Box(504x43)

  1. After the ok prompt is displayed, turn off the power to the system and then to all external peripheral devices.

    You are now ready to install the peripheral device. Refer to the documentation that accompanies your hardware, and the appropriate section in this manual:

Adding a Disk Drivepage 17
Adding a Tape Drivepage 32
Adding a CD-ROM Drivepage 47
Adding an Additional CD-ROM Drivepage 48
Adding a Diskette Drivepage 49

The shutdown Command

Use the shutdown command to shut down servers when users must be notified of the impending shut down.
· Shutting Down a Multiuser System Using shutdown

Text Box(504x61)

  1. To find out if users are logged into the system, type:


  # who  

A list of all logged-in users is displayed. You can send mail or broadcast a message to let users know that the system is being shut down.
  1. Add a device driver, if necessary.

Text Box(504x71)


Note - This task is optional; most device drivers are already part of the operating system. If a device driver is required, you would typically find a CD-ROM with the drive as well as instructions on how to add the device driver. If you cannot find a CD-ROM or instructions on how to add a specific device driver, a new device driver is probably not needed. Therefore, you can skip this step.

  1. Ensure that the operating system checks for newly installed peripheral devices when you power on or reboot your system, type:


  # touch /reconfigure  

Imported image(504x60)

  1. Change to the root directory, by typing:


  # cd /  

  1. Shut down the system, by typing:


  # shutdown -y -g30 -i0  

In this command,
shutdownBrings a system to run level s (single-user mode) by default. A message is broadcast to all users. After a 60-second wait (default), you are asked to confirm that you want to shut down the system.
-yContinues to shut down the system without intervention; otherwise, you are prompted to continue the shutdown process.
-g grace-periodIndicates a time (in seconds) before the system is shut down. The default is 60 seconds.
-i init-stateAllows you to bring the system to an init state that is different from the default of 2. (Refer to Table 1-3 on page 5 for init state information.)
In the following example, the system will be brought to run level 0 in 3 minutes without requiring additional confirmation.

  # shutdown -y -g180 -i0  
  Shutdown started.    Fri Nov 4 11:07:33 MST 1994  
  Broadcast Message from root (console) on pluto Fri Nov 4 11:07:34  
  The system will be shut down in 3 minutes  
                      .  
                      .  
                      .  
  INIT: New run level: 0  
  The system is coming down. Please wait.  
                      .  
                      .  
                      .  
  The system is down.  
  syncing file systems... [11] [9] [5] done  
  Program terminated  
  Type help for more information  
  ok  

  1. If you are asked for confirmation, type y.


  ok Do you want to continue? (y or n): y  


Note - Be sure that you turned on all SCSI devices, such as disk and tape drives, before you attempt to use the probe-scsi or probe-scsi-all commands. The operating system can detect connected SCSI devices only if you turned them on.

  1. Reset the SCSI bus and kill all running processes, by typing:


  ok reset  
  Immediately press <Stop-a>  


Note - This interrupts the reboot process and clears all SCSI bus activity to ensure an effective probe-scsi or probe-scsi-all search.

  1. List the SCSI target IDs that are currently being used by typing:


  ok probe-scsi  

If you have more than one host bus on your system, use the probe-scsi-all command because it probes for all SCSI devices on every SCSI bus including the host bus

Note - probe-scsi-all will not see devices connected with a Soc/S adapter board, such as a SPARCstorage Array.

Text Box(504x51)

  1. Turn off the power to the system and then to all external peripheral devices after the ok prompt is displayed.

    You are now ready to install your peripheral device. Refer to the documentation that accompanies your hardware, and the appropriate section in this manual:

Adding a Disk Drivepage 17
Adding a Tape Drivepage 32
Adding a CD-ROM Drivepage 47
Adding an Additional CD-ROM Drivepage 48
Adding a Diskette Drivepage 49