live and learn

Mike McCarty Mike.McCarty at
Tue Jun 8 13:54:52 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. :-(

Hee hee! Aren't we having fun! Before starting in on something
like this, be sure your backup and recovery procedure works well.

So, join the explicitly non exclusive club of those who have
porked their systems. One time when I was building LFS using the
"alongside" hint, I decided to start over, and after exiting the
chroot environment, but with the chroot environment mounts still in
place, as root, I

# cd LFS/6.3
# rm -rf build

and deleted /dev from my host system! No discs, no printers, no
terminals, etc. I rebooted with a Knoppix disc, let it populate
/dev, and then mounted my hard drive, and copied (yes copied
using cp) /dev onto my hard drive. That got my system up enough
to find out how /dev got built on my distro from a helpful
distro e-mail support group, and get it back again. No udev on
this machine, so it was definitely a little adventure.

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

Yeah, deleting the link without changing your /etc/passwd entry
to point to a valid shell would do that.

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

That seems like the most obvious way to put the system back the
way it was. If you want to get the system more prepared for
the future, you could change the entry in /etc/passwd for your
login to point to /bin/dash or whatever for all users you actually
need to use, like root, yourself, and lfs or whoever. You could
then install /bin/bash and make the symlink point to that.

Another way would be to put in the symlink to /bin/dash, build
and install /bin/bash, and then repoint the symlink. Then try
logging out and back in, and see if you get some traction.

This can be done with another login still active, so you can
do some test, without porking your machine, having another
login to put things back.

> Any recommendations on a rescue disk?

I like Knoppix Vers 5.x So far, I'm not so impressed with Knoppix
Vers 6. Kanotix is another which is pretty good. I've also used
sysrescuecd, which has another set of tools. Almost anything which
can boot, recognize your disc, and make a symlink is enough. That'll
be any LiveCD version of Linux. You can have a look here

and find one which suits your fancy. I like Puppy Linux for some stuff.
Feather Linux is pretty good, though I don't like it as much. I
like DSL a lot, and it should be capable of doing what you want.
The small distros like that have the advantage of not taking so long
to download. I've run DSL on an AMD 586 (486 class machine) with
only 16Meg of RAM, and no capability to boot from a CD-ROM, by using
SMB (smart boot manager) on a floppy.

So, nearly anything can get DSL up and running. It's a nice lean system.

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

Hmm. LFS is not for newbies. It would be difficult to put in
explicit enough instructions for a newbie to follow, without
making the instructions somewhat distro dependent. It's not
my call, anyway, since I'm just another LFS booster, not on
the support team.

Besides, porking your main machine to the point where it won't
boot, and figuring out how to get it back is half the fun, isn't
it? :-)

Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!

More information about the lfs-support mailing list