Download System Administration
Transcript
3.3 Shutting Down and Restarting UNIX 2. Rename the file acqpresent as follows: # cd /etc # mv acqpresent acqpresent.old 3. If you want to shut down immediately, enter: # /etc/shutdown -y -g0 -i0 If you want to shut down at the given time instead of immediately, set the number of seconds before shutdown using /etc/shutdown –y –gsec –i0, where sec is the number of seconds. For example, for 30 minutes to shutdown, enter the command /etc/shutdown –y –g300 -i0. For more information on shutdown, see Solaris documentation or enter man shutdown. At shutdown, the system forces any information on its way to the hard disk to be written out immediately, cleans up any processes that are running, and executes an orderly shutdown of the system. The process takes about 20 seconds. When the system has safely shut down, the prompt “>” or “OK” appears. 4. 5. It is now safe to turn off the system power. Turn off the power switches in this order: a. Hard disk(s) and tape drive(s) (if drives have separate power switches). b. CPU unit. c. Monitor. If your system is a SPARCstation 1+ or 1, you must turn off the differential box at this time. If your system is a system other than a SPARCstation 1+ or 1, turn off the differential box at this time only if necessary. (The UNITYINOVA, MERCURY-VX, MERCURY, and GEMINI 2000 do not have a differential box.) Shutting Down UNIX in an Emergency If no one can log on as root (e.g., the password is lost), and you absolutely must reboot or remove power from the UNIX system, it is necessary to run the risk of corrupting files and possibly losing data. The following procedure is not safe, but in an emergency it is marginally better than simply turning the power off. 1. Exit VNMR, and then exit the window manager, if possible. 2. Synchronize the disks by entering: > sync;sync;sync 3. Press Stop-a (hold down the Stop key and press the a key). On older keyboards, the Stop key is labeled L1, so press L1-a instead. The sync;sync;sync command attempts to ensure that all disk writes are completed but does not do it as thoroughly as the shutdown command. The L1-a key combination is a system reset that should be used only in an emergency when nothing else works. Files can be lost using the L1-a reset. Restarting UNIX Start with step 1 below if restarting (rebooting) UNIX after power has been removed from one or more system components. If no units are powered down, you can skip steps 1 and 2, and restart UNIX from the boot prompt “>” by typing the command b and following the instructions in steps 3 and 4 below. From the “ok” prompt, type boot. You do not need to perform step 4 in this procedure if you did not rename the acqpresent file when shutting down. 01-999166-00 C0503 System Administration 69