i messed up,
need to do fsck and also uncomment the /usr line if /etc/fstab
Chris Rees
utisoft at gmail.com
Sat May 7 21:25:57 UTC 2011
On 7 May 2011 04:31, "Yuri Pankov" <yuri.pankov at 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
More information about the freebsd-questions
mailing list