Front | Info | Lists | Newsfeeds | Study Guide | What is BSD? |
|
This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/Halt__44___reboot__44___or_bring_the_system_to_single-user_mode.html. Halt, reboot, or bring the system to single-user modeConceptUnderstand the ramifications associated with halting, rebooting, or bringing a system to single-user mode, recognize when it may be necessary to do so and how to minimize the impact on a server system. IntroductionEarly computers were large, expensive machines, and companies and educational institutions that owned them were somewhat dismayed by the long lines of users in their hallways, waiting anxiously with "baited breath" and a stack of punchcards for a few minutes of computer time. Later operating systems were developed so that multiple users could access the system from a network of terminals so that the universities and businesses that owned computers wouldn't have to pay people for standing around waiting for terminal access. The BSDs have deep roots in this tradition, and are also "multi-user" operating systems. The advent of the PC ("personal computer") made it possible for each user in some organizations to have their own machine, but many BSD machines are still used by more than one user; in fact, most system "daemons" (servers) are classed as "users" as well. So are "client" computers that are connecting to your machine's mail, web, or other services. Rebooting while a program is performing an operation can cause problems. Also, it might be considered downright rude to halt a system while a user is still working on an important project. For this reason, it is important to consider the issue of halting or rebooting a system. Doing things the Right Way(tm) can benefit you greatly in the long run. System StatesFrom a purely logical point of view, the computer system has two states: OFF and ON. However, in reality, there are more possibilities: the system could be booting (going from OFF to ON), or powering-down (going from ON to OFF), or "rebooting" (going from ON to OFF to ON again). In addition, when a BSD system is ON, it can be in either single-user or multi-user mode. Single-user and Multi-user modesDuring a "normal" boot process, In single-user mode, there are no ttys available, the network is not brought up, etc. The only possible "login" is as Shutdown(8)
Shutdown flags and arguments
The time parameter is one of: "now", a (positive) integer for "minutes", or an absolute datetime of "yymmddhhmm" (2-digit year, month, date, hour, minute). ExamplesWhen called with no flags, shutdown will bring the system from multi-user down to single-user mode:
Turn the system off immediately (dependent on hardware support); if the system cannot be powered off automatically, halt the operating system (equivalent to
Reboot the system in 45 minutes (see
Power down one second prior to New Year's Day, 2010:
"Kick" mode (kick off all users except root and disable non-root logins, but leave the system in multi-user mode):
Practice Exercises
More information
|