]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man8/rescue.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man8 / rescue.8
1 .\" Copyright (c) 2003 Tim Kientzle <kientzle@acm.org>
2 .\" Copyright (c) 2003 Simon L. Nielsen <simon@FreeBSD.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd July 23, 2003
29 .Dt RESCUE 8
30 .Os
31 .Sh NAME
32 .Nm rescue
33 .Nd rescue utilities in
34 .Pa /rescue
35 .Sh DESCRIPTION
36 The
37 .Pa /rescue
38 directory contains a collection of common utilities intended for use
39 in recovering a badly damaged system.
40 With the transition to a dynamically-linked root beginning with
41 .Fx 5.2 ,
42 there is a real possibility that the standard tools in
43 .Pa /bin
44 and
45 .Pa /sbin
46 may become non-functional due to a failed upgrade or a disk error.
47 The tools in
48 .Pa /rescue
49 are statically linked and should therefore be more resistant to
50 damage.
51 However, being statically linked, the tools in
52 .Pa /rescue
53 are also less functional than the standard utilities.
54 In particular, they do not have full use of the locale,
55 .Xr pam 3 ,
56 and nsswitch libraries.
57 .Pp
58 If your system fails to boot, and it shows a prompt similar to:
59 .Pp
60 .Dl "Enter full pathname of shell or RETURN for /bin/sh: "
61 .Pp
62 the first thing to try running is the standard shell,
63 .Pa /bin/sh .
64 If that fails, try running
65 .Pa /rescue/sh ,
66 which is the
67 .Nm
68 shell.
69 To repair the system, the root partition must first be remounted
70 read-write.
71 This can be done with the following
72 .Xr mount 8
73 command:
74 .Pp
75 .Dl "/rescue/mount -uw /"
76 .Pp
77 The next step is to double-check the contents of
78 .Pa /bin , /sbin ,
79 and
80 .Pa /usr/lib ,
81 possibly mounting a
82 .Fx
83 rescue or
84 .Dq "live file system"
85 CD-ROM (e.g.,
86 .Li disc2
87 of the officially released
88 .Fx
89 ISO images) and copying files from there.
90 Once it is possible to successfully run
91 .Pa /bin/sh , /bin/ls ,
92 and other standard utilities, try rebooting back into the standard
93 system.
94 .Pp
95 The
96 .Pa /rescue
97 tools are compiled using
98 .Xr crunchgen 1 ,
99 which makes them considerably more compact than the standard
100 utilities.
101 To build a
102 .Fx
103 system where space is critical,
104 .Pa /rescue
105 can be used as a replacement for the standard
106 .Pa /bin
107 and
108 .Pa /sbin
109 directories; simply change
110 .Pa /bin
111 and
112 .Pa /sbin
113 to be symbolic links pointing to
114 .Pa /rescue .
115 Since
116 .Pa /rescue
117 is statically linked, it should also be possible to dispense with much
118 of
119 .Pa /usr/lib
120 in such an environment.
121 .Pp
122 In contrast to its predecessor
123 .Pa /stand ,
124 .Pa /rescue
125 is updated during normal
126 .Fx
127 source and binary upgrades.
128 .Sh FILES
129 .Bl -tag -width ".Pa /rescue" -compact
130 .It Pa /rescue
131 Root of the
132 .Nm
133 hierarchy.
134 .El
135 .Sh SEE ALSO
136 .Xr crunchgen 1 ,
137 .Xr crash 8
138 .Sh HISTORY
139 The
140 .Nm
141 utilities first appeared in
142 .Fx 5.2 .
143 .Sh AUTHORS
144 .An -nosplit
145 The
146 .Nm
147 system was written by
148 .An Tim Kientzle Aq kientzle@FreeBSD.org ,
149 based on ideas taken from
150 .Nx .
151 This manual page was written by
152 .An Simon L. Nielsen Aq simon@FreeBSD.org ,
153 based on text by
154 .An Tim Kientzle Aq kientzle@FreeBSD.org .
155 .Sh BUGS
156 Most of the
157 .Nm
158 tools work even in a fairly crippled system.
159 The most egregious exception is the
160 .Nm
161 version of
162 .Xr vi 1 ,
163 which currently requires that
164 .Pa /usr
165 be mounted so that it can access the
166 .Xr termcap 5
167 files.
168 Hopefully, a failsafe
169 .Xr termcap 3
170 entry will eventually be added into the
171 .Xr ncurses 3
172 library, so that
173 .Pa /rescue/vi
174 can be used even in a system where
175 .Pa /usr
176 cannot immediately be mounted.
177 In the meantime, the
178 .Nm
179 version of the
180 .Xr ed 1
181 editor can be used from
182 .Pa /rescue/ed
183 if you need to edit files, but cannot mount
184 .Pa /usr .