Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 2004 10:16:26 -0500 (EST)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        joepok@ninestar.com (Joe Pokupec)
Cc:        Freebsd-Questions <freebsd-questions@freebsd.org>
Subject:   Re: SIngle User Mode Help
Message-ID:  <200403051516.i25FGQZ25312@clunix.cl.msu.edu>
In-Reply-To: <0HU3000VYHSO4G@mmp-3.gci.net> from "Joe Pokupec" at Mar 04, 2004 11:48:05 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Hey Guys,
> 
> I'm constantly botching up my fstab file and the system will fail to boot
> correctly. I've learned to create a working fstab and call is fstab.orig
> which I can overwrite the botched file if I end up in Single User Mode...

You're right to make a copy before tinkering.

> I can't find any info on Single User Mode to help me:
> 
> - I use mount -u / to mount the filesystem as read/write

That is correct, but, of course, it only gets the root (/) filesystem
mounted.   You may need stuff on other ones, especially /usr.

Try doing 
   fsck /usr
   mount /usr    or   mount /dev/d0s1f /usr   or whatever slice and
                                              partition you have /usr on

> - I cannot access any editors like vi or pico (my personal) favorite once in
> single user mode... Why?

Probably they are in the /usr file system.   I usually put a copy of vi
in /bin  which should stay in root and not be farmed out somewhere.
Then I can get at it when things are all bollixed up.

> - I can't use the locate command, because the /usr/libexec/locate.updatedb
> script is not accessible

Also, it is /usr which isn't mounted.

> - I can't su because this is not a recognized command

That is also in /usr, but you don't need it because in single user mode
you are already root.

> Can anyone shed any light on how I can actually edit (preferably using pico)
> my fstab file once I'm in "botch" mode?

Learn vi for use in such circumstances or maybe ee.  You don't want to
have to depend on having one of those bloatware editors working when
you have problems in single user.

Light's above,

////jerry

> 
> Thanks
> 
> Joe
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403051516.i25FGQZ25312>