Subject: Re: File "/etc/[" erased
To: Jaume Samperiz <bamokato@intercom.es>
From: Peter Seebach <seebs@plethora.net>
List: netbsd-help
Date: 05/16/2000 14:41:52
In message <4.3.2.3.0.20000516210847.00a713c0@intercom.es>, Jaume Samperiz writ
es:
>I have NetBsd/i386 1.4.2 installed but I have erased a file
>with a strange name:  " /etc/[  "(an square bracket)  or something like 
>this. After this during the boot I'm asked for the shell path. After this, 
>the system
>doesn't mount the main partition but mounts the small partition with W95.
>What is the task of this file?. Can I fix this error without reinstalling 
>all the system?.

It was /bin/[, and you were *WRONG*.

NEVER remove a file you are not *TOTALLY* sure you understand!  If you
don't know why it's there, *FIND OUT FIRST*.

The problem is that '[' is the way that shell scripts test for conditionals;
without it, all conditionals are presumed false.

Anyway, you may recover with
	# fsck -p
	# mount -u /dev/wd0a /
	# cd /bin
	# ln test \[
	# reboot

>Another question, I'm trying to mount the CDROM (detected in cd0). I use:
>
>mount -t cd9660 /dev/cd0  /cdrom but it doesn't work.
>
>mount -t cd9660 /dev/cd0a  /cdrom    &
>mount -t cd9660 /dev/cd0d -cdrom          halts the system
>
>How can I mount it during the boot?.

Look at the sample entry in /etc/fstab, if one is present, and remove
"noauto".  Get the system booting normally, then try mount commands until
you get one to work.  :)

-s