Booting bit-by-bit (rc.conf broken)

Jerry McAllister jerrymc at clunix.cl.msu.edu
Wed Sep 3 08:01:47 PDT 2003


> 
> My rc.conf file appears to be broken in some way, and this is preventing 
> my system from booting. It boots to a heavily resticted system, with only 
> the / file system mounted and the statically linked binaries available. 
> Problem is, I can't edit my rc.conf or remove it. Is their any way I can 
> either selectivly execute statements in the rc.conf during bootup (similar 
> to the old dos method), or a way I can force login, so I can remove the 
> damaged rc.conf.

First, please break your lines at around 72 characters.  It makes it much
easier for some of us to read ant to respond to.  If you can't figure out
how to set your Email client for that, just hit ENTER(RETURN) like people
used to have to do on a typewriter.

Second, you will have to boot in to single user, do a manual fsck,
remount the root file system and then the others if needed and then
[use vi to] edit your rc.conf file.   There is lots of stuff in the
documentation on booting single user, etc but briefly:

 - Force a boot
 - when you get the message, something like 'press space to stop or
   any other key to boot immediately'  then hit the spacebar.
 - type boot -s   and let it finish
 - when it asks for a shell hit ENTER and do the following.
 - fsck -p
 - mount -u /
 - mount -a
 - swapon -a
 - vi /etc/rc.conf   and write it out   'ESC:wq'  when you are done.
 - shutdown -r now    (or just CTRL-D  - I'm superstitious about boots)  
 
If that did it, you're fine.  If not, you may have to go back to single
user again and do some more editing.

////jerry

> 
> Thanks 
> 
> Colin.
> _______________________________________________


More information about the freebsd-questions mailing list