live and learn

Bruce Dubbs bruce.dubbs at gmail.com
Tue Jun 8 13:34:27 PDT 2010


piper.guy1 wrote:
> Hi,
> 
> Started reading and doing what the book says (6.6). Didn't take too
> long before I got myself into trouble. :-(
> 
> In " Host system Requirements", the instructions explicitly wants
> '/bin/sh' to be pointing to bash. Mine was pointing to dash. So I
> endeavoured to change it by deleting the symlink and then create
> another symlink to point to bash. However, being a naive newbie all
> hell broke loose when I deleted the symlink, and everything was
> misbehaving. So, before I realized what I had done I logged out
> rebooted and then couldn't log back in anymore.

Yes that's a problem.  It's an opportunity to learn.  The correct 
command is:

ln -sfv bash /bin/sh

The options are
-s symbolic link
-f remove existing destination file
-v verbose

> Sooo...before I do something else that I'm not suppose to do, I
> thought I'd get advise first. My thinking is that I need to get a
> Linux rescue or recovery CD, mount the file system on the hard drive,
> and then add a symlink to bash. Make sense or is there an easier way?
> 
> Any recommendations on a rescue disk?

Any disk that boots to Linux.  Mount the old partition and adjust the 
path in the ln command for the mount point.  For example:

# Your installed root partition is /dev/sda2
mount /dev/sda2 /mnt
ln -sfv bash /mnt/bin/sh
umount /mnt

> One more thing. Seeing that this is a very risky thing to be advising
> in LFS 6.6, can I suggest that the authour(s) add some caveats around
> this instruction?

LFS is not intended to teach basic Unix/Linux commands.

   -- bruce




More information about the lfs-support mailing list