Subject: Re: NoobQ: single user mode fubar
To: Keith Mastin <kmastin@beechtree.ca>
From: Chris Lloyd <strawberry@toth.org.uk>
List: netbsd-help
Date: 08/18/2002 21:30:55
On Sun, Aug 18, 2002 at 04:19:11PM -0400, Keith Mastin wrote:
> Hi.
loey :)
> Following the instructions at
> http://www.mclink.it/MG2508/nbsddeng/chap-boot.html, I edited
> /etc/rc.conf. I did this by "cp /etc/defaults/rc.conf /etc/rc.conf"...
> did not make a backup copy of /etc/rc.conf either... Mistake!!
Yup.
> After reboot, sysinit message: "WARNING: $rc_configured is not set
> properly /etc/rc.conf is not configured. Multiuser mode aborted."
>
> I tried to "vi /etc/rc.conf": "vi not found".
Yup, vi is in /usr/bin/vi and in single user mode, /usr isn't mounted. If
you just use 'mount /usr' then vi will work.
> Then I tried to "set -E" so I could edit files on the command line. "No
> entry for terminal type "dumb"; using dumb terminal settings. Then when I
> try to vi, "vi not found".
>
> Then I tried to "TERM=-vt220 ; export TERM", then tried "TERM=vt100 ;
> export TERM"... "No entry for terminal type "vt220" (or vt100); using dumb
> terminal settings."
export TERM=vt100
has worked for me in the past in the situation you're at
you'll need to issue that before vi will work too
> So I'm stuck here. I could do the easy way out and re-install, but I
> won't learn how to manipulate files in single user mode that way. I need a
> new copy of /etc/defaults/rc.conf and to know how to put it into place,
> also how to set the terminal type.
So you've destroyed /etc/defaults/rc.conf as well?
Well, you *can* extract it from the distribution sets, in the same way the
installer did it.
If you installed from CD, do
'mount -t cd9660 /dev/cd0a /mnt' to mount the CD
then stand in / and do
'tar zxvpf /mnt/path/to/etc.tgz ./etc/defaults/rc.conf ./etc/rc.conf'
Hope that helps.
- Chris
--
strawberry@toth.org.uk
http://www.toth.org.uk/~strawberry