summaryrefslogtreecommitdiff
path: root/static/freebsd/man8/rescue.8 3.html
blob: 898dc3a7ef6a0af71ef2af4f72b9184f988fb3bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<table class="head">
  <tr>
    <td class="head-ltitle">RESCUE(8)</td>
    <td class="head-vol">System Manager's Manual</td>
    <td class="head-rtitle">RESCUE(8)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">rescue</code> &#x2014; <span class="Nd">rescue
    utilities in <span class="Pa">/rescue</span></span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <span class="Pa">/rescue</span> directory contains a
    collection of common utilities intended for use in recovering a badly
    damaged system. With the transition to a dynamically-linked root beginning
    with <span class="Ux">FreeBSD 5.2</span>, there is a real possibility that
    the standard tools in <span class="Pa">/bin</span> and
    <span class="Pa">/sbin</span> may become non-functional due to a failed
    upgrade or a disk error. The tools in <span class="Pa">/rescue</span> are
    statically linked and should therefore be more resistant to damage. However,
    being statically linked, the tools in <span class="Pa">/rescue</span> are
    also less functional than the standard utilities. In particular, they do not
    have full use of the locale, <a class="Xr">pam(3)</a>, and nsswitch
    libraries.</p>
<p class="Pp">If your system fails to boot, and it shows a prompt similar
  to:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li">Enter full pathname of shell or
  RETURN for /bin/sh: </code></div>
<p class="Pp">the first thing to try running is the standard shell,
    <span class="Pa">/bin/sh</span>. If that fails, try running
    <span class="Pa">/rescue/sh</span>, which is the
    <code class="Nm">rescue</code> shell. To repair the system, the root
    partition must first be remounted read-write. This can be done with the
    following <a class="Xr">mount(8)</a> command:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li">/rescue/mount -uw /</code></div>
<p class="Pp">The next step is to double-check the contents of
    <span class="Pa">/bin</span>, <span class="Pa">/sbin</span>, and
    <span class="Pa">/usr/lib</span>, possibly mounting a
    <span class="Ux">FreeBSD</span> rescue or &#x201C;live file system&#x201D;
    CD-ROM and copying files from there. Once it is possible to successfully run
    <span class="Pa">/bin/sh</span>, <span class="Pa">/bin/ls</span>, and other
    standard utilities, try rebooting back into the standard system.</p>
<p class="Pp">The <span class="Pa">/rescue</span> tools are compiled using
    <a class="Xr">crunchgen(1)</a>, which makes them considerably more compact
    than the standard utilities. To build a <span class="Ux">FreeBSD</span>
    system where space is critical, <span class="Pa">/rescue</span> can be used
    as a replacement for the standard <span class="Pa">/bin</span> and
    <span class="Pa">/sbin</span> directories; simply change
    <span class="Pa">/bin</span> and <span class="Pa">/sbin</span> to be
    symbolic links pointing to <span class="Pa">/rescue</span>. Since
    <span class="Pa">/rescue</span> is statically linked, it should also be
    possible to dispense with much of <span class="Pa">/usr/lib</span> in such
    an environment.</p>
<p class="Pp">In contrast to its predecessor <span class="Pa">/stand</span>,
    <span class="Pa">/rescue</span> is updated during normal
    <span class="Ux">FreeBSD</span> source and binary upgrades.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag Bl-compact">
  <dt><span class="Pa">/rescue</span></dt>
  <dd>Root of the <code class="Nm">rescue</code> hierarchy.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">crunchgen(1)</a>, <a class="Xr">crash(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">rescue</code> utilities first appeared in
    <span class="Ux">FreeBSD 5.2</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The <code class="Nm">rescue</code> system was written by
    <span class="An">Tim Kientzle</span>
    &lt;<a class="Mt" href="mailto:kientzle@FreeBSD.org">kientzle@FreeBSD.org</a>&gt;,
    based on ideas taken from <span class="Ux">NetBSD</span>. This manual page
    was written by <span class="An">Simon L. Nielsen</span>
    &lt;<a class="Mt" href="mailto:simon@FreeBSD.org">simon@FreeBSD.org</a>&gt;,
    based on text by <span class="An">Tim Kientzle</span>
    &lt;<a class="Mt" href="mailto:kientzle@FreeBSD.org">kientzle@FreeBSD.org</a>&gt;.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">Most of the <code class="Nm">rescue</code> tools work even in a
    fairly crippled system. The most egregious exception is the
    <code class="Nm">rescue</code> version of <a class="Xr">vi(1)</a>, which
    currently requires that <span class="Pa">/usr</span> be mounted so that it
    can access the <a class="Xr">termcap(5)</a> files. Hopefully, a failsafe
    <a class="Xr">termcap(3)</a> entry will eventually be added into the
    <a class="Xr">ncurses(3)</a> library, so that
    <span class="Pa">/rescue/vi</span> can be used even in a system where
    <span class="Pa">/usr</span> cannot immediately be mounted. In the meantime,
    the <code class="Nm">rescue</code> version of the <a class="Xr">ed(1)</a>
    editor can be used from <span class="Pa">/rescue/ed</span> if you need to
    edit files, but cannot mount <span class="Pa">/usr</span>.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">June 30, 2022</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>