Subject: Re: Slight Problem
To: None <netbsd-help@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 10/24/2003 12:56:02
On Fri, 24 Oct 2003 14:43:41 +0100 (BST), Richard Ibbotson
<richard@sheflug.co.uk> wrote:
> /etc/rc: WARNING: /etc/ipf.conf not readable; ipfilter start aborted.
> ERROR: ABORTING BOOT (sending SIGTERM to parent)!
> inti: /bin/sh on /etc/rc terminated abnormally, going to single user 
> mode.
> Enter pathname of shell or RETURN for sh: 
> 
> Typed in /bin/ksh and then found that I couldn't use vi to edit the 
> /etc/rconf to comment out the bit about starting ipf.  Can anyone 
> tell me how to get into vi so that I can start the machine normally ?

http://www.netbsd.org/Documentation/misc/#why-single-user

BTW, I think "touch /etc/ipf.conf" would have done the trick.  Certainly, 

	$ printf "pass in all\npass out all\n"  \
		> /etc/ipf.conf

would have worked.  

Just to unpack Richard's answer:

	$ command -v vi
	/usr/bin/vi
	$ grep usr /etc/fstab 
	/dev/wd0e /usr ffs rw 1 2

vi is in /usr/bin, and /usr isn't mounted in single-user mode.  That's why
you have to "mount -a" (or -va).  

In my asbestos-clad opinion, this is a usability deficiency in NetBSD.  A
statically linked vi is about 1 MB.  These days, practically every machine
has that much room in the root partition.  We should put a vi in the root
partition, and let people who don't have the room remove it.  

(For that matter, the default disklabel should probably be one big
partition, mooting the point.)

Similarly, the root shell should define TERM.  It might be wrong in some
cases, but it will be very often right, certainly more often than it is
now.  

Meanwhile, at least we have the FAQ.  :-)

--jkl