Subject: Re: power failure during make build
To: None <netbsd-help@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-help
Date: 06/11/2001 01:02:13
In article <Pine.LNX.4.33.0106110026490.14454-100000@lgserv3.stud.cs.uit.no>,
Audun Arnesen Nordal <audun@stud.cs.uit.no> wrote:
>
>I attempted to upgrade my laptop from 1.5.1b2 to -current, and after
>having started the final make build I left the laptop alone. When I six
>hours checked back on it, I realized that due to utter clumsyness I'd
>forgot to connect the power-cable before starting the compilation, and now
>the inevitable had happened that it had been shut down ungracefully,
>probably while it still was compiling. So now the system is in some
>indeterminable state saying "init: can't exec /bin/sh for /etc/rc: Exec
>format error" upon boot.

See if you can boot single user and fork another shell /bin/ksh or /bin/csh.
If you can run ksh, you might succeed booting by removing the broken /bin/sh
and linking ksh to it. If you can run csh or ksh and you can ftp a binary
for the shell from somewhere, boot into single user, setup the network and
ftp /bin/sh from somewhere.

christos