Rebooting & Shutting Down

Rebooting & Shutting Down

Rebooting & Shutting Down The UNIX file system buffers changes in memory and writes them back to disk only sporadically. This scheme makes disk I/O faster, but it also makes the file system more susceptible to data loss when the system is rudely halted. Traditional UNIX machines were very touchy about how they were shut down. Recent systems have become less sensitive, but it is always a good idea to shut down the machine nicely. On non-UNIX operating systems, rebooting the operating system is an appropriate first course of treatment for almost any problem. On a UNIX system, it is better to think first and reboot second. UNIX problems tend to be subtler and more complex so blindly rebooting is effective in a much smaller percentage of cases. UNIX systems also take a long time to boot, and multiple users may be inconvenienced. Unlike bootstrapping, which can be done in essentially only one ways, there are a number of ways to shut down or reboot a UNIX system. They are: Turning off the power Using the shutdown command Using the halt and reboot commands Sending init a TERM signal Using telinit to change init’s run level Killing init Turning off the Power Even on small UNIX systems, turning off the power is not a good way to shut down a system. You can potentially lose data and leave the system’s files in an inconsistent state. shutdown shutdown is the safest, most considerate, and most thorough way to initiate a halt, reboot, or to return to single user mode. You can ask shutdown to wait a while before bringing down the system. During the waiting period, shutdown sends a message via wall to all logged-in users at progressively shorter intervals, warning them of the impending downtime. By default, the warnings simply say that the system is being shut down and gives the time remaining until the machine is halted. On most systems, users cannot log in when a shutdown is imminent. On Solaris systems use the command # /usr/sbin/shutdown –g<secs> -i<6|0|S> where <secs> is the number of seconds before the system is halted, run level 6 is a reboot, run level 0 is a halt and run level S is halt multiuser mode and enter single user mode. halt The halt command performs the essential duties required to bring the system down. It is called by shutdown –i0, but it can also be used by itself. halt logs the shutdown, kills nonessential processes, executes the sync system call, waits for the file system writes to complete, and then halts the kernel. reboot reboot is almost identical to halt, but it causes the machine to reboot from scratch rather than halting. reboot is called by shutdown –i6. Killing init init is so important to the operation of the system, that if it is killed with kill –KILL or kill -9, most computers will reboot automatically, some kernels just panic. .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us