From owner-freebsd-doc@FreeBSD.ORG Mon Jan 22 00:48:39 2007 Return-Path: X-Original-To: freebsd-doc@freebsd.org Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3348716A46C for ; Mon, 22 Jan 2007 00:48:39 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id D153613C43E for ; Mon, 22 Jan 2007 00:48:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 25595 invoked by uid 399); 22 Jan 2007 00:21:57 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 22 Jan 2007 00:21:57 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <45B4039E.2000100@FreeBSD.org> Date: Sun, 21 Jan 2007 16:21:50 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Steve Franks References: <539c60b90701211245s4941d626iefa9810403c87a96@mail.gmail.com> In-Reply-To: <539c60b90701211245s4941d626iefa9810403c87a96@mail.gmail.com> X-Enigmail-Version: 0.94.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-doc@freebsd.org, Giorgos Keramidas , FreeBSD Users Questions Subject: Re: newbie documentation (was: Re: Contributing to FreeBSD documentation (was: Re: no ath0 on new system with good card)) X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 00:48:39 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steve Franks wrote: > I have another section to add to my previous post: > > At some point in your dealings, you may introduce a typo into a > critical startup file, such as rc.conf, loader.conf, fstab, or > similar, and reach the following upon reboot: > > "...." > "Press enter for /bin/sh:" > > To recover: While it's always nice when someone takes an interest in improving our documentation, what you have below is missing some key ingredients. > 0. press enter > 1. cd /etc > 2. cat fstab (if you don't know the partitions & disks to mount already) It's very possible that cat won't be in your path when you do this, so you might have to say /bin/cat. Similarly throughout the rest of your post. More importantly, it's crucial to run at least 'fsck -p' before trying to mount anything. If the only things you'll be mounting are in fstab already, that's all you have to type. If you need to mount something that isn't in fstab, you'll have to specify it by device, such as 'fsck -p /dev/ad2s1e'. If the prune isn't enough, then you will have to do 'fsck -y /dev/' for anything that didn't come up clean. > 3. mount /dev/adXs1Y /usr (gives you the edit command) (find X and Y > in your fstab file) > 4. mount /dev/adXs1Z / (gives you write acess to /etc) (find X and Z > in your fstab) First, if the slices you're mounting are in your fstab, you don't have to specify the device name, just 'mount /' is enough. Second, you should always mount the / partition read/write before you try to mount anything else. Assuming that all your slices came up clean after fsck, it is probably simpler to do 'mount -a' (or 'mount -a -t nonfs' if you have NFS mounts in your fstab without the noauto flag) than to type them all out by hand. > 5. edit blah ( i.e. rc.conf) to fix the typo > 6. init 6 You're much better off to just type 'exit' when you're done fixing stuff. That will take you out of the subshell, and back into the normal rc startup process. Hope this helps, Doug - -- This .signature sanitized for your protection -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) iD8DBQFFtAOeyIakK9Wy8PsRAiiyAJ92/0/nYm7d952zEglKoDF0KOvcQQCfTS51 TwAQySkJy3SPd6vIZMNSXI8= =Ye1F -----END PGP SIGNATURE-----