Date: Sat, 7 May 2011 22:25:54 +0100 From: Chris Rees <utisoft@gmail.com> To: Yuri Pankov <yuri.pankov@gmail.com> Cc: Henry Olyer <henry.olyer@gmail.com>, FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: i messed up, need to do fsck and also uncomment the /usr line if /etc/fstab Message-ID: <BANLkTimLmfuLM9a%2BMd=Bn922VAn_OXkH6w@mail.gmail.com> In-Reply-To: <20110507033031.GD1222@procyon.xvoid.org> References: <BANLkTi=97m3HH64=7zCejCnOcUQ_Tv4A3Q@mail.gmail.com> <20110507033031.GD1222@procyon.xvoid.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7 May 2011 04:31, "Yuri Pankov" <yuri.pankov@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTimLmfuLM9a%2BMd=Bn922VAn_OXkH6w>
