*BSD News Article 93654


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news.apfel.de!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: /bin/sh -> /usr/local/bin/bash won't boot
Date: 14 Apr 1997 21:25:16 GMT
Organization: Private BSD site, Dresden
Lines: 57
Message-ID: <5iu7bs$26m@uriah.heep.sax.de>
References: <3350EBA5.26EB8E3B@airmail.net>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39138


Phil Crown <pcrown@airmail.net> wrote:

> I installed bash2 from the ports collection, then made a symbolic link
> like
> 
> ln -s /bin/sh /usr/local/bin/sh

You shouldn't do _this_. :)  The default /bin/sh is good enough for
the daily jobs of a shell anyway (including a commandline editor,
and most of the Posix features), and much less bloated.  Remember,
each system(3) library call will create an instance of this shell.

If at all, build a statically compiled version of bash, and install
this one.

> Now the computer won't boot.

Sure.  /sbin/init wants to run ``sh -c /etc/rc''.  But there's no
/usr yet...

> My questions is, how do I mount the root file system after
> booting up the boot floppy?

You don't need a boot floppy. :)

> mount -t <fstype> /dev/wd0
> 
> I am not sure of the <fstype>, ...

...nor do you need the fstype at all (it's "ufs", for the curious).
But, you need to remember the -u option to mount(8) (update).

So now, boot your machine single-user, that's the -s option at the
boot: prompt.  Once /sbin/init has been loaded, it will ask you for
the single-user shell, defaulting to /bin/sh.  Since you don't have
this one, pick /bin/csh. ;-)  Then, check your filesystems, and mount
them read/write:

	fsck -p
	mount -a -t local

If your only concern would have been to mount the root f/s read/write,
this is:

	mount -u /

Btw., there's another instance of a /bin/sh available as /stand/sh.
But, _don't_ copy this one into /bin, instead make it a link.  It's
the huge merged sysinstall binary, a megabyte-heavy thing.  You don't
want multiple copies of it.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)