161860dd7SSimon L. B. Nielsen.\" Copyright (c) 2003 Tim Kientzle <kientzle@acm.org> 261860dd7SSimon L. B. Nielsen.\" Copyright (c) 2003 Simon L. Nielsen <simon@FreeBSD.org> 361860dd7SSimon L. B. Nielsen.\" All rights reserved. 461860dd7SSimon L. B. Nielsen.\" 561860dd7SSimon L. B. Nielsen.\" Redistribution and use in source and binary forms, with or without 661860dd7SSimon L. B. Nielsen.\" modification, are permitted provided that the following conditions 761860dd7SSimon L. B. Nielsen.\" are met: 861860dd7SSimon L. B. Nielsen.\" 1. Redistributions of source code must retain the above copyright 961860dd7SSimon L. B. Nielsen.\" notice, this list of conditions and the following disclaimer. 1061860dd7SSimon L. B. Nielsen.\" 2. Redistributions in binary form must reproduce the above copyright 1161860dd7SSimon L. B. Nielsen.\" notice, this list of conditions and the following disclaimer in the 1261860dd7SSimon L. B. Nielsen.\" documentation and/or other materials provided with the distribution. 1361860dd7SSimon L. B. Nielsen.\" 1461860dd7SSimon L. B. Nielsen.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 1561860dd7SSimon L. B. Nielsen.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1661860dd7SSimon L. B. Nielsen.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1761860dd7SSimon L. B. Nielsen.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 1861860dd7SSimon L. B. Nielsen.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1961860dd7SSimon L. B. Nielsen.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2061860dd7SSimon L. B. Nielsen.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2161860dd7SSimon L. B. Nielsen.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2261860dd7SSimon L. B. Nielsen.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2361860dd7SSimon L. B. Nielsen.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2461860dd7SSimon L. B. Nielsen.\" SUCH DAMAGE. 2561860dd7SSimon L. B. Nielsen.\" 2661860dd7SSimon L. B. Nielsen.\" $FreeBSD$ 2761860dd7SSimon L. B. Nielsen.\" 2861860dd7SSimon L. B. Nielsen.Dd July 23, 2003 2961860dd7SSimon L. B. Nielsen.Os 3061860dd7SSimon L. B. Nielsen.Dt RESCUE 8 3161860dd7SSimon L. B. Nielsen.Sh NAME 3261860dd7SSimon L. B. Nielsen.Nm rescue 3361860dd7SSimon L. B. Nielsen.Nd rescue utilities in 3461860dd7SSimon L. B. Nielsen.Pa /rescue 3561860dd7SSimon L. B. Nielsen.Sh DESCRIPTION 3661860dd7SSimon L. B. NielsenThe 3761860dd7SSimon L. B. Nielsen.Pa /rescue 3861860dd7SSimon L. B. Nielsendirectory contains a collection of common utilities intended for use 3961860dd7SSimon L. B. Nielsenin recovering a badly damaged system. 4061860dd7SSimon L. B. NielsenWith the transition to a dynamically-linked root beginning with 4161860dd7SSimon L. B. Nielsen.Fx 5.2 , 4261860dd7SSimon L. B. Nielsenthere is a real possibility that the standard tools in 4361860dd7SSimon L. B. Nielsen.Pa /bin 4461860dd7SSimon L. B. Nielsenand 4561860dd7SSimon L. B. Nielsen.Pa /sbin 4661860dd7SSimon L. B. Nielsenmay become non-functional due to a failed upgrade or a disk error. 4761860dd7SSimon L. B. NielsenThe tools in 4861860dd7SSimon L. B. Nielsen.Pa /rescue 4961860dd7SSimon L. B. Nielsenare statically linked and should therefore be more resistant to 5061860dd7SSimon L. B. Nielsendamage. 5161860dd7SSimon L. B. NielsenHowever, being statically linked, the tools in 5261860dd7SSimon L. B. Nielsen.Pa /rescue 5361860dd7SSimon L. B. Nielsenare also less functional than the standard utilities. 5461860dd7SSimon L. B. NielsenIn particular, they do not have full use of the locale, 5561860dd7SSimon L. B. Nielsen.Xr pam 3 , 5661860dd7SSimon L. B. Nielsenand nsswitch libraries. 5761860dd7SSimon L. B. Nielsen.Pp 5861860dd7SSimon L. B. NielsenIf your system fails to boot, and it shows a prompt similar to: 5961860dd7SSimon L. B. Nielsen.Pp 6061860dd7SSimon L. B. Nielsen.Dl "Enter full pathname of shell or RETURN for /bin/sh: " 6161860dd7SSimon L. B. Nielsen.Pp 6261860dd7SSimon L. B. Nielsenthe first thing to try running is the standard shell, 6361860dd7SSimon L. B. Nielsen.Pa /bin/sh . 6461860dd7SSimon L. B. NielsenIf that fails, try running 6561860dd7SSimon L. B. Nielsen.Pa /rescue/sh , 6661860dd7SSimon L. B. Nielsenwhich is the 6761860dd7SSimon L. B. Nielsen.Nm 6861860dd7SSimon L. B. Nielsenshell. 6961860dd7SSimon L. B. NielsenTo repair the system, the root partition must first be remounted 7061860dd7SSimon L. B. Nielsenread-write. 7161860dd7SSimon L. B. NielsenThis can be done with the following 7261860dd7SSimon L. B. Nielsen.Xr mount 8 7361860dd7SSimon L. B. Nielsencommand: 7461860dd7SSimon L. B. Nielsen.Pp 7561860dd7SSimon L. B. Nielsen.Dl "/rescue/mount -uw /" 7661860dd7SSimon L. B. Nielsen.Pp 7761860dd7SSimon L. B. NielsenThe next step is to double-check the contents of 7861860dd7SSimon L. B. Nielsen.Pa /bin , /sbin , 7961860dd7SSimon L. B. Nielsenand 8061860dd7SSimon L. B. Nielsen.Pa /usr/lib , 8161860dd7SSimon L. B. Nielsenpossibly mounting a 8261860dd7SSimon L. B. Nielsen.Fx 8361860dd7SSimon L. B. Nielsenrescue or 8461860dd7SSimon L. B. Nielsen.Dq "live file system" 8561860dd7SSimon L. B. NielsenCD-ROM (e.g., 8661860dd7SSimon L. B. Nielsen.Li disc2 8761860dd7SSimon L. B. Nielsenof the officially released 8861860dd7SSimon L. B. Nielsen.Fx 8961860dd7SSimon L. B. NielsenISO images) and copying files from there. 9061860dd7SSimon L. B. NielsenOnce it is possible to successfully run 9161860dd7SSimon L. B. Nielsen.Pa /bin/sh , /bin/ls , 9261860dd7SSimon L. B. Nielsenand other standard utilities, try rebooting back into the standard 9361860dd7SSimon L. B. Nielsensystem. 9461860dd7SSimon L. B. Nielsen.Pp 9561860dd7SSimon L. B. NielsenThe 9661860dd7SSimon L. B. Nielsen.Pa /rescue 9761860dd7SSimon L. B. Nielsentools are compiled using 9861860dd7SSimon L. B. Nielsen.Xr crunchgen 1 , 9961860dd7SSimon L. B. Nielsenwhich makes them considerably more compact than the standard 10061860dd7SSimon L. B. Nielsenutilities. 10161860dd7SSimon L. B. NielsenTo build a 10261860dd7SSimon L. B. Nielsen.Fx 10361860dd7SSimon L. B. Nielsensystem where space is critical, 10461860dd7SSimon L. B. Nielsen.Pa /rescue 10561860dd7SSimon L. B. Nielsencan be used as a replacement for the standard 10661860dd7SSimon L. B. Nielsen.Pa /bin 10761860dd7SSimon L. B. Nielsenand 10861860dd7SSimon L. B. Nielsen.Pa /sbin 10961860dd7SSimon L. B. Nielsendirectories; simply change 11061860dd7SSimon L. B. Nielsen.Pa /bin 11161860dd7SSimon L. B. Nielsenand 11261860dd7SSimon L. B. Nielsen.Pa /sbin 11361860dd7SSimon L. B. Nielsento be symbolic links pointing to 11461860dd7SSimon L. B. Nielsen.Pa /rescue . 11561860dd7SSimon L. B. NielsenSince 11661860dd7SSimon L. B. Nielsen.Pa /rescue 11761860dd7SSimon L. B. Nielsenis statically linked, it should also be possible to dispense with much 11861860dd7SSimon L. B. Nielsenof 11961860dd7SSimon L. B. Nielsen.Pa /usr/lib 12061860dd7SSimon L. B. Nielsenin such an environment. 12161860dd7SSimon L. B. Nielsen.Pp 12261860dd7SSimon L. B. NielsenIn contrast to its predecessor 12361860dd7SSimon L. B. Nielsen.Pa /stand , 12461860dd7SSimon L. B. Nielsen.Pa /rescue 12561860dd7SSimon L. B. Nielsenis updated during normal 12661860dd7SSimon L. B. Nielsen.Fx 12761860dd7SSimon L. B. Nielsensource and binary upgrades. 12861860dd7SSimon L. B. Nielsen.Sh FILES 12961860dd7SSimon L. B. Nielsen.Bl -tag -width ".Pa /rescue" -compact 13061860dd7SSimon L. B. Nielsen.It Pa /rescue 13161860dd7SSimon L. B. NielsenRoot of the 13261860dd7SSimon L. B. Nielsen.Nm 13361860dd7SSimon L. B. Nielsenhierarchy. 13461860dd7SSimon L. B. Nielsen.El 13561860dd7SSimon L. B. Nielsen.Sh SEE ALSO 13661860dd7SSimon L. B. Nielsen.Xr crunchgen 1 , 13761860dd7SSimon L. B. Nielsen.Xr crash 8 13861860dd7SSimon L. B. Nielsen.Sh HISTORY 13961860dd7SSimon L. B. NielsenThe 14061860dd7SSimon L. B. Nielsen.Nm 14161860dd7SSimon L. B. Nielsenutilities first appeared in 14261860dd7SSimon L. B. Nielsen.Fx 5.2 . 14361860dd7SSimon L. B. Nielsen.Sh AUTHORS 14461860dd7SSimon L. B. Nielsen.An -nosplit 14561860dd7SSimon L. B. NielsenThe 14661860dd7SSimon L. B. Nielsen.Nm 14761860dd7SSimon L. B. Nielsensystem was written by 14861860dd7SSimon L. B. Nielsen.An Tim Kientzle Aq kientzle@acm.org . 14961860dd7SSimon L. B. NielsenThis manual page was written by 15061860dd7SSimon L. B. Nielsen.An Simon L. Nielsen Aq simon@FreeBSD.org , 15161860dd7SSimon L. B. Nielsenbased on text by 15261860dd7SSimon L. B. Nielsen.An Tim Kientzle Aq kientzle@acm.org . 15361860dd7SSimon L. B. Nielsen.Sh BUGS 15461860dd7SSimon L. B. NielsenMost of the 15561860dd7SSimon L. B. Nielsen.Nm 15661860dd7SSimon L. B. Nielsentools work even in a fairly crippled system. 15761860dd7SSimon L. B. NielsenThe most egregious exception is the 15861860dd7SSimon L. B. Nielsen.Nm 15961860dd7SSimon L. B. Nielsenversion of 16061860dd7SSimon L. B. Nielsen.Xr vi 1 , 16161860dd7SSimon L. B. Nielsenwhich currently requires that 16261860dd7SSimon L. B. Nielsen.Pa /usr 16361860dd7SSimon L. B. Nielsenbe mounted so that it can access the 16461860dd7SSimon L. B. Nielsen.Xr termcap 5 16561860dd7SSimon L. B. Nielsenfiles. 16661860dd7SSimon L. B. NielsenHopefully, a failsafe 16761860dd7SSimon L. B. Nielsen.Xr termcap 3 16861860dd7SSimon L. B. Nielsenentry will eventually be added into the 16961860dd7SSimon L. B. Nielsen.Xr ncurses 3 17061860dd7SSimon L. B. Nielsenlibrary, so that 17161860dd7SSimon L. B. Nielsen.Pa /rescue/vi 17261860dd7SSimon L. B. Nielsencan be used even in a system where 17361860dd7SSimon L. B. Nielsen.Pa /usr 17461860dd7SSimon L. B. Nielsencannot immediately be mounted. 17561860dd7SSimon L. B. NielsenIn the meantime, the 17661860dd7SSimon L. B. Nielsen.Nm 17761860dd7SSimon L. B. Nielsenversion of the 17861860dd7SSimon L. B. Nielsen.Xr ed 1 17961860dd7SSimon L. B. Nielseneditor can be used from 18061860dd7SSimon L. B. Nielsen.Pa /rescue/ed 18161860dd7SSimon L. B. Nielsenif you need to edit files, but cannot mount 18261860dd7SSimon L. B. Nielsen.Pa /usr . 183