Tuesday, October 14, 2008

Going to Recovery (Single-User) Mode

The following steps describe a method of manually bringing the system down to recovery mode—the point where it is safe to turn the power off. Make sure you give other users enough warning before switching to recovery mode; otherwise they may lose the data they are working on. Because going from multiuser to recovery mode can affect other users, you must work with root privileges to perform all of these tasks except the first.


1. Use wall to warn everyone who is using the system to log out.

2.

If you are sharing files via NFS, use exportfs –ua to disable network access to the shared filesystems. (Use exportfs without an argument to see which filesystems are being shared.)

3.
Confirm no critical processes are running in the background (e.g., an unattended compile).

4.

Give the command telinit 1 (page 510) to bring the system down to recovery mode. The system displays messages about the services it is shutting down followed by a root shell prompt (#). In runlevel 1, the system kills many system services and then brings the system to runlevel S. The runlevel utility confirms the system was at runlevel 1 and is now at runlevel S.

$ sudo telinit 1
...
# runlevel
1 S


5.
Use umount –a to unmount all mounted devices that are not in use. Use mount without an argument to make sure that no devices other than root (/) are mounted before continuing.

No comments:

Post a Comment