From owner-freebsd-questions@FreeBSD.ORG Sat May 7 21:25:56 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7746106564A for ; Sat, 7 May 2011 21:25:56 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 49DAB8FC15 for ; Sat, 7 May 2011 21:25:55 +0000 (UTC) Received: by bwz12 with SMTP id 12so4761935bwz.13 for ; Sat, 07 May 2011 14:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=taWBTN6/W6bnGbI7s7QSxbMrkTSe/7NzwiHFWHPHQ0o=; b=eqs0wM2N6UDN0jGGZxMh2m3rnx0boTQhQynYb0NRh12rMrxV2s68xJy7tt4oeCCuJB DL3FL2RfaDYKV1acXBWMe/AWM5lDpoTt4b1nVltSOcbVeGeoxC+evsqBVBiguT5J1mC8 hoRTju9fYUI1U3LMKy8aePyx6d/UkmDaajJuE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=r/L3XmVd9jJahmWeDZ4cbIWBIdzhoFKu9H7z09NsSK7X51/8fY6gdbVjM3MAt0xUTw 451JVidoa0SSdrPDn2A4Mbp+k38nHLD2qlaJh6ZTQ+8bk945/il9hg5AeSTYDqMZx1kf +YCWvEfYo+zgxHbDNOVEuUcdYWrqJguQ9vZfE= MIME-Version: 1.0 Received: by 10.205.82.10 with SMTP id aa10mr2482720bkc.97.1304803555138; Sat, 07 May 2011 14:25:55 -0700 (PDT) Received: by 10.204.42.21 with HTTP; Sat, 7 May 2011 14:25:54 -0700 (PDT) Received: by 10.204.42.21 with HTTP; Sat, 7 May 2011 14:25:54 -0700 (PDT) In-Reply-To: <20110507033031.GD1222@procyon.xvoid.org> References: <20110507033031.GD1222@procyon.xvoid.org> Date: Sat, 7 May 2011 22:25:54 +0100 Message-ID: From: Chris Rees To: Yuri Pankov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Henry Olyer , FreeBSD Mailing List Subject: Re: i messed up, need to do fsck and also uncomment the /usr line if /etc/fstab X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 21:25:57 -0000 On 7 May 2011 04:31, "Yuri Pankov" wrote: > > On Fri, May 06, 2011 at 10:06:31PM -0400, Henry Olyer wrote: > > Woe is me. > > > > First, I simply messed up, happens to us all from time to time. I lost > > power on an laptop running 8.2. > > > > Restarted it but for some reason the fsck didn't run and I lost some /usr > > files. > > > > I tried to do an fsck manually but because it's mounted I got nowhere. So I > > put a comment ("#") in front of the /usr line for the /etc/fstab file. > > > > Now, I can't boot. > > > > I need what's on my disk -- of course! > > Boot to single user mode (4 in the boot menu), remount / read-write - > mount -u -o rw /, edit /etc/fstab (you'll probably need to mount /usr > manually if what's in /rescue doesn't work for you), reboot. > > You can run fsck from single user mode, as well. > > > HTH, > Yuri Easiest way in single user if vi complains about termcap and you don't understand ed... As Yuri suggested: # fsck / # mount -ie / Then you can just use sed in place; # sed -i.bak -e 's,#\(.*/usr\),\1,' /etc/fstab # fsck /usr # reboot Hope that helps! Chris