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.\" 28*7963c02cSMateusz Piotrowski.Dd June 30, 2022 2961860dd7SSimon L. B. Nielsen.Dt RESCUE 8 30aa12cea2SUlrich Spörlein.Os 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" 85*7963c02cSMateusz PiotrowskiCD-ROM and copying files from there. 8661860dd7SSimon L. B. NielsenOnce it is possible to successfully run 8761860dd7SSimon L. B. Nielsen.Pa /bin/sh , /bin/ls , 8861860dd7SSimon L. B. Nielsenand other standard utilities, try rebooting back into the standard 8961860dd7SSimon L. B. Nielsensystem. 9061860dd7SSimon L. B. Nielsen.Pp 9161860dd7SSimon L. B. NielsenThe 9261860dd7SSimon L. B. Nielsen.Pa /rescue 9361860dd7SSimon L. B. Nielsentools are compiled using 9461860dd7SSimon L. B. Nielsen.Xr crunchgen 1 , 9561860dd7SSimon L. B. Nielsenwhich makes them considerably more compact than the standard 9661860dd7SSimon L. B. Nielsenutilities. 9761860dd7SSimon L. B. NielsenTo build a 9861860dd7SSimon L. B. Nielsen.Fx 9961860dd7SSimon L. B. Nielsensystem where space is critical, 10061860dd7SSimon L. B. Nielsen.Pa /rescue 10161860dd7SSimon L. B. Nielsencan be used as a replacement for the standard 10261860dd7SSimon L. B. Nielsen.Pa /bin 10361860dd7SSimon L. B. Nielsenand 10461860dd7SSimon L. B. Nielsen.Pa /sbin 10561860dd7SSimon L. B. Nielsendirectories; simply change 10661860dd7SSimon L. B. Nielsen.Pa /bin 10761860dd7SSimon L. B. Nielsenand 10861860dd7SSimon L. B. Nielsen.Pa /sbin 10961860dd7SSimon L. B. Nielsento be symbolic links pointing to 11061860dd7SSimon L. B. Nielsen.Pa /rescue . 11161860dd7SSimon L. B. NielsenSince 11261860dd7SSimon L. B. Nielsen.Pa /rescue 11361860dd7SSimon L. B. Nielsenis statically linked, it should also be possible to dispense with much 11461860dd7SSimon L. B. Nielsenof 11561860dd7SSimon L. B. Nielsen.Pa /usr/lib 11661860dd7SSimon L. B. Nielsenin such an environment. 11761860dd7SSimon L. B. Nielsen.Pp 11861860dd7SSimon L. B. NielsenIn contrast to its predecessor 11961860dd7SSimon L. B. Nielsen.Pa /stand , 12061860dd7SSimon L. B. Nielsen.Pa /rescue 12161860dd7SSimon L. B. Nielsenis updated during normal 12261860dd7SSimon L. B. Nielsen.Fx 12361860dd7SSimon L. B. Nielsensource and binary upgrades. 12461860dd7SSimon L. B. Nielsen.Sh FILES 12561860dd7SSimon L. B. Nielsen.Bl -tag -width ".Pa /rescue" -compact 12661860dd7SSimon L. B. Nielsen.It Pa /rescue 12761860dd7SSimon L. B. NielsenRoot of the 12861860dd7SSimon L. B. Nielsen.Nm 12961860dd7SSimon L. B. Nielsenhierarchy. 13061860dd7SSimon L. B. Nielsen.El 13161860dd7SSimon L. B. Nielsen.Sh SEE ALSO 13261860dd7SSimon L. B. Nielsen.Xr crunchgen 1 , 13361860dd7SSimon L. B. Nielsen.Xr crash 8 13461860dd7SSimon L. B. Nielsen.Sh HISTORY 13561860dd7SSimon L. B. NielsenThe 13661860dd7SSimon L. B. Nielsen.Nm 13761860dd7SSimon L. B. Nielsenutilities first appeared in 13861860dd7SSimon L. B. Nielsen.Fx 5.2 . 13961860dd7SSimon L. B. Nielsen.Sh AUTHORS 14061860dd7SSimon L. B. Nielsen.An -nosplit 14161860dd7SSimon L. B. NielsenThe 14261860dd7SSimon L. B. Nielsen.Nm 14361860dd7SSimon L. B. Nielsensystem was written by 144a63d6c94SBaptiste Daroussin.An Tim Kientzle Aq Mt kientzle@FreeBSD.org , 1454a483830STim Kientzlebased on ideas taken from 1464a483830STim Kientzle.Nx . 14761860dd7SSimon L. B. NielsenThis manual page was written by 148a63d6c94SBaptiste Daroussin.An Simon L. Nielsen Aq Mt simon@FreeBSD.org , 14961860dd7SSimon L. B. Nielsenbased on text by 150a63d6c94SBaptiste Daroussin.An Tim Kientzle Aq Mt kientzle@FreeBSD.org . 15161860dd7SSimon L. B. Nielsen.Sh BUGS 15261860dd7SSimon L. B. NielsenMost of the 15361860dd7SSimon L. B. Nielsen.Nm 15461860dd7SSimon L. B. Nielsentools work even in a fairly crippled system. 15561860dd7SSimon L. B. NielsenThe most egregious exception is the 15661860dd7SSimon L. B. Nielsen.Nm 15761860dd7SSimon L. B. Nielsenversion of 15861860dd7SSimon L. B. Nielsen.Xr vi 1 , 15961860dd7SSimon L. B. Nielsenwhich currently requires that 16061860dd7SSimon L. B. Nielsen.Pa /usr 16161860dd7SSimon L. B. Nielsenbe mounted so that it can access the 16261860dd7SSimon L. B. Nielsen.Xr termcap 5 16361860dd7SSimon L. B. Nielsenfiles. 16461860dd7SSimon L. B. NielsenHopefully, a failsafe 16561860dd7SSimon L. B. Nielsen.Xr termcap 3 16661860dd7SSimon L. B. Nielsenentry will eventually be added into the 16761860dd7SSimon L. B. Nielsen.Xr ncurses 3 16861860dd7SSimon L. B. Nielsenlibrary, so that 16961860dd7SSimon L. B. Nielsen.Pa /rescue/vi 17061860dd7SSimon L. B. Nielsencan be used even in a system where 17161860dd7SSimon L. B. Nielsen.Pa /usr 17261860dd7SSimon L. B. Nielsencannot immediately be mounted. 17361860dd7SSimon L. B. NielsenIn the meantime, the 17461860dd7SSimon L. B. Nielsen.Nm 17561860dd7SSimon L. B. Nielsenversion of the 17661860dd7SSimon L. B. Nielsen.Xr ed 1 17761860dd7SSimon L. B. Nielseneditor can be used from 17861860dd7SSimon L. B. Nielsen.Pa /rescue/ed 17961860dd7SSimon L. B. Nielsenif you need to edit files, but cannot mount 18061860dd7SSimon L. B. Nielsen.Pa /usr . 181