/bin/sh -> /usr/local/bin/bash won't boot

/bin/sh -> /usr/local/bin/bash won't boot

Post by Phil Crow » Mon, 14 Apr 1997 04:00:00



I installed bash2 from the ports collection, then made a symbolic link
like

ln -s /bin/sh /usr/local/bin/sh

Now the computer won't boot.

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

mount -t <fstype> /dev/wd0

I am not sure of the <fstype>, I could look in /etc/fstab, but I have to
be mounted first to do that! :-)

--

 
 
 

/bin/sh -> /usr/local/bin/bash won't boot

Post by Brian Some » Tue, 15 Apr 1997 04:00:00




Quote:> I installed bash2 from the ports collection, then made a symbolic link
> like

> ln -s /bin/sh /usr/local/bin/sh

Do you mean "ln -s /usr/local/bin/bash /bin/sh" ?

Quote:> Now the computer won't boot.

;O

Quote:> My questions is, how do I mount the root file system after
> booting up the boot floppy?
.
> mount -t <fstype> /dev/wd0

> I am not sure of the <fstype>, I could look in /etc/fstab, but I have to
> be mounted first to do that! :-)

"mount /dev/wd0a /mnt".

You don't need to do this.  Just type "-s" at the boot prompt, and when
it asks you for your shell, type "/bin/csh".

At the next prompt, do "mount -u /" and "mount /usr".  I hope you
didn't *remove* the shell :)

--

      <http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour !

 
 
 

/bin/sh -> /usr/local/bin/bash won't boot

Post by Jens Schweikhar » Tue, 15 Apr 1997 04:00:00





# > I installed bash2 from the ports collection, then made a symbolic link
# > like
# >
# > ln -s /bin/sh /usr/local/bin/sh
#
# Do you mean "ln -s /usr/local/bin/bash /bin/sh" ?

This is a *bad* idea, IMHO. /bin/sh is needed shortly after booting,
but before /usr or /usr/local may be mounted. You can shoot yourself
in the foot this way.

# > Now the computer won't boot.

Bang! :-)

Make sure you have a statically linked /bin/sh (because if
it's dynamically linked and /usr/lib/lib* ist not mounted
yet you also shoot your other foot) and boot again.

If you want another shell for root, add a new user with uid 0
and your favorite shell. Isn't user toor already intended for
this use?

        Jens
--
Jens Schweikhardt  http://www.uni-stuttgart.de/People/schweikhardt/home.html
SIGSIG -- signature too long (core dumped)

 
 
 

/bin/sh -> /usr/local/bin/bash won't boot

Post by Dan Odo » Tue, 15 Apr 1997 04:00:00



> I installed bash2 from the ports collection, then made a symbolic link
> like

> ln -s /bin/sh /usr/local/bin/sh

> Now the computer won't boot.

It sounds like your /usr partition isn't mounted when something wants
sh.  My advice is to let /bin/sh be and just use chsh to change your
personal shell to bash.

Quote:

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

> mount -t <fstype> /dev/wd0

> I am not sure of the <fstype>, I could look in /etc/fstab, but I have to
> be mounted first to do that! :-)

Just mount /dev/wd0 / should do it (I think).

> --


--
Daniel Odom | product designer | PGP key available via finger
"Without going out of your door, you can know the ways of the world.
Without peeping through your window, you can see the way of heaven.
The farther you go, the less you know." -- Tao Te Ching chapter 47
 
 
 

/bin/sh -> /usr/local/bin/bash won't boot

Post by Wilko Bul » Tue, 15 Apr 1997 04:00:00



>I installed bash2 from the ports collection, then made a symbolic link
>like
>ln -s /bin/sh /usr/local/bin/sh
>Now the computer won't boot.

Not surprising since there are shell scripts that need to be executed
by /bin/sh before /usr is mounted.

Quote:>My questions is, how do I mount the root file system after
>booting up the boot floppy?
>mount -t <fstype> /dev/wd0

Something like

mount /dev/wd0a /mnt

should mount the root of the harddisk. Assuming it's really wd0 etc

Wilko

--
Wilko
_     ____________________________________________________________________

 |/|/ / / /( (_)        Do, or do not. There is no 'try' - Yoda

 
 
 

/bin/sh -> /usr/local/bin/bash won't boot

Post by J Wuns » Tue, 15 Apr 1997 04:00:00



> 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.

Quote:> Now the computer won't boot.

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

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

You don't need a boot floppy. :)

Quote:> 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


Never trust an operating system you don't have sources for. ;-)

 
 
 

/bin/sh -> /usr/local/bin/bash won't boot

Post by Phil Crow » Fri, 18 Apr 1997 04:00:00



> > I installed bash2 from the ports collection, then made a symbolic link
> > like

> > ln -s /bin/sh /usr/local/bin/sh

> Do you mean "ln -s /usr/local/bin/bash /bin/sh" ?

yes, thanks... :-)

Quote:

> > Now the computer won't boot.

> ;O

> > My questions is, how do I mount the root file system after
> > booting up the boot floppy?
> .
> > mount -t <fstype> /dev/wd0

> > I am not sure of the <fstype>, I could look in /etc/fstab, but I have to
> > be mounted first to do that! :-)

> "mount /dev/wd0a /mnt".

> You don't need to do this.  Just type "-s" at the boot prompt, and when
> it asks you for your shell, type "/bin/csh".

> At the next prompt, do "mount -u /" and "mount /usr".  I hope you
> didn't *remove* the shell :)

ok, its fixed now, the biggest problem is that the computer is 1200
miles away, so I was not sure who/how it would actually get fixed.

It apparently was sitting at the boot prompt and was able to mount the
root file system and fortunately I did "mv /bin/sh /bin/sh.orig" first.
:-)

--