1*6cb10275Sriastradh.\" $NetBSD: rescue.8,v 1.9 2014/03/18 18:20:40 riastradh Exp $ 2d2056435Slukem.\" 3c99131c0Slukem.\" Copyright (c) 2003 Tim Kientzle <kientzle@acm.org> 4c99131c0Slukem.\" Copyright (c) 2003 Simon L. Nielsen <simon@FreeBSD.org> 5c99131c0Slukem.\" All rights reserved. 6c99131c0Slukem.\" 7c99131c0Slukem.\" Redistribution and use in source and binary forms, with or without 8c99131c0Slukem.\" modification, are permitted provided that the following conditions 9c99131c0Slukem.\" are met: 10c99131c0Slukem.\" 1. Redistributions of source code must retain the above copyright 11c99131c0Slukem.\" notice, this list of conditions and the following disclaimer. 12c99131c0Slukem.\" 2. Redistributions in binary form must reproduce the above copyright 13c99131c0Slukem.\" notice, this list of conditions and the following disclaimer in the 14c99131c0Slukem.\" documentation and/or other materials provided with the distribution. 15c99131c0Slukem.\" 16c99131c0Slukem.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 17c99131c0Slukem.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18c99131c0Slukem.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19c99131c0Slukem.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 20c99131c0Slukem.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21c99131c0Slukem.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22c99131c0Slukem.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23c99131c0Slukem.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24c99131c0Slukem.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25c99131c0Slukem.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26c99131c0Slukem.\" SUCH DAMAGE. 27c99131c0Slukem.\" 28d2056435Slukem.\" FreeBSD: src/share/man/man8/rescue.8,v 1.3 2005/11/10 15:42:51 kientzle Exp 29c99131c0Slukem.\" 30258cf0abSroy.Dd April 5, 2012 31c99131c0Slukem.Dt RESCUE 8 32997634feSjoerg.Os 33c99131c0Slukem.Sh NAME 34c99131c0Slukem.Nm rescue 35c99131c0Slukem.Nd rescue utilities in 36c99131c0Slukem.Pa /rescue 37c99131c0Slukem.Sh DESCRIPTION 38c99131c0SlukemThe 39c99131c0Slukem.Pa /rescue 40c99131c0Slukemdirectory contains a collection of common utilities intended for use 41c99131c0Slukemin recovering a badly damaged system. 42c99131c0SlukemWith the transition to a dynamically-linked root beginning with 43d2056435Slukem.Nx 2.0 , 44c99131c0Slukemthere is a real possibility that the standard tools in 45c99131c0Slukem.Pa /bin 46c99131c0Slukemand 47c99131c0Slukem.Pa /sbin 48c99131c0Slukemmay become non-functional due to a failed upgrade or a disk error. 49c99131c0SlukemThe tools in 50c99131c0Slukem.Pa /rescue 51c99131c0Slukemare statically linked and should therefore be more resistant to 52c99131c0Slukemdamage. 53c99131c0SlukemHowever, being statically linked, the tools in 54c99131c0Slukem.Pa /rescue 55c99131c0Slukemare also less functional than the standard utilities. 56c99131c0SlukemIn particular, they do not have full use of the locale, 57c99131c0Slukem.Xr pam 3 , 58c99131c0Slukemand nsswitch libraries. 59c99131c0Slukem.Pp 606cf20142SlukemIf your system fails to boot, and it shows an error message similar to: 616cf20142Slukem.Pp 626cf20142Slukem.Dl "init: not found" 636cf20142Slukem.Pp 646cf20142Slukemtry booting the system with the boot flag 656cf20142Slukem.Dq Fl a 666cf20142Slukemand supplying 676cf20142Slukem.Pa /rescue/init , 686cf20142Slukemwhich is the 696cf20142Slukem.Nm 706cf20142Slukem.Xr init 8 , 716cf20142Slukemas the init path. 726cf20142Slukem.Pp 73c99131c0SlukemIf your system fails to boot, and it shows a prompt similar to: 74c99131c0Slukem.Pp 75c99131c0Slukem.Dl "Enter full pathname of shell or RETURN for /bin/sh: " 76c99131c0Slukem.Pp 77c99131c0Slukemthe first thing to try running is the standard shell, 78c99131c0Slukem.Pa /bin/sh . 79c99131c0SlukemIf that fails, try running 80c99131c0Slukem.Pa /rescue/sh , 81c99131c0Slukemwhich is the 82c99131c0Slukem.Nm 83c99131c0Slukemshell. 84c99131c0SlukemTo repair the system, the root partition must first be remounted 85c99131c0Slukemread-write. 86c99131c0SlukemThis can be done with the following 87c99131c0Slukem.Xr mount 8 88c99131c0Slukemcommand: 89c99131c0Slukem.Pp 90c99131c0Slukem.Dl "/rescue/mount -uw /" 91c99131c0Slukem.Pp 92c99131c0SlukemThe next step is to double-check the contents of 93d2056435Slukem.Pa /bin , 94d2056435Slukem.Pa /lib , 95d2056435Slukem.Pa /libexec , 96c99131c0Slukemand 97d2056435Slukem.Pa /sbin , 98c99131c0Slukempossibly mounting a 99d2056435Slukem.Nx 100d2056435Slukeminstallation CD-ROM 101d2056435Slukemand copying files from there. 102c99131c0SlukemOnce it is possible to successfully run 103c99131c0Slukem.Pa /bin/sh , /bin/ls , 104c99131c0Slukemand other standard utilities, try rebooting back into the standard 105c99131c0Slukemsystem. 106c99131c0Slukem.Pp 107c99131c0SlukemThe 108c99131c0Slukem.Pa /rescue 109c99131c0Slukemtools are compiled using 110c99131c0Slukem.Xr crunchgen 1 , 111c99131c0Slukemwhich makes them considerably more compact than the standard 112c99131c0Slukemutilities. 113c99131c0Slukem.Sh FILES 114c99131c0Slukem.Bl -tag -width ".Pa /rescue" -compact 115c99131c0Slukem.It Pa /rescue 116c99131c0SlukemRoot of the 117c99131c0Slukem.Nm 118c99131c0Slukemhierarchy. 119c99131c0Slukem.El 120c99131c0Slukem.Sh SEE ALSO 1216299875aSlukem.Xr crunchgen 1 122c99131c0Slukem.Sh HISTORY 123c99131c0SlukemThe 124c99131c0Slukem.Nm 125c99131c0Slukemutilities first appeared in 126d2056435Slukem.Nx 2.0 . 127c99131c0Slukem.Sh AUTHORS 128c99131c0Slukem.An -nosplit 129c99131c0SlukemThe 130c99131c0Slukem.Nm 131c99131c0Slukemsystem was written by 132a5684d07Swiz.An Luke Mewburn Aq Mt lukem@NetBSD.org . 133c99131c0SlukemThis manual page was written by 134a5684d07Swiz.An Simon L. Nielsen Aq Mt simon@FreeBSD.org , 135c99131c0Slukembased on text by 136a5684d07Swiz.An Tim Kientzle Aq Mt kientzle@FreeBSD.org . 137