Re: live and learn

2010-06-12 Thread Bruce Dubbs
Simon Geard wrote:
 On Fri, 2010-06-11 at 13:16 -0500, Mike McCarty wrote:
 Use a red colored prompt when running with root authorization.
 
 Oh yes, I can't agree with that one enough. Not that you want to
 accidentally run rm -rf ~ as *any* user,

I run 'rm *~'  often enough.   I am always careful not to get a space 
between the * and the ~.

I suppose I ought to disable backups in vim because I never recall using 
one.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-11 Thread Simon Geard
On Thu, 2010-06-10 at 03:55 -0500, Mike McCarty wrote:
 Simon Geard wrote:
  I quite like an idea Fedora are working on - if installed to a btrfs
  partition, use it's snapshot support to provide an easy rollback option
  when installing updates.
  
  I've been meaning to try that approach myself, since I've trashed more
  than a few systems while trying to update them.
 
 Hey, if you find out more, please do post information here!
 That sounds like a very attractive possibility.

The concept is simple enough - create a snapshot before doing anything
hazardous, and provide a mechanism for mounting a specific snapshot at
boot time. Here's a link to the Fedora proposal...

https://fedoraproject.org/wiki/Features/SystemRollbackWithBtrfs

It seems this feature is partially implemented in F13 - the automatic
snapshots are enabled, though the UI is missing.

On an LFS, there's no automatic update process, so I figure I'd just
create periodic snapshots, say a weekly cron job, or maybe just
manually. And then configure an entry in grub to boot from the previous
snapshot. The concept is simple enough, I just haven't had a good chance
to try it out...

Simon.


signature.asc
Description: This is a digitally signed message part
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-11 Thread piper.guy1
Thanks for all your tips, advice, lectures, opinions, etc. Very
positive community. I think I'm going to enjoy my LFS experience. I
can definitely say that despite the obvious lesson for me here (think
before [Enter]), mistakes aren't necessarily a completely negative
thing, as you can learn a great deal in response to your mistakes.
This thread proves it.

Now if one makes the same mistake more than once then that's a
differnt story. :-)

So until my next learning experience, Ciao for now.
/carl h.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-11 Thread Mike McCarty
piper.guy1 wrote:
 Thanks for all your tips, advice, lectures, opinions, etc. Very
 positive community. I think I'm going to enjoy my LFS experience. I

That's one thing I really like here, unlike the user support lists
for standard distros, which are full of bickering and posturing.

[...]

 Now if one makes the same mistake more than once then that's a
 differnt story. :-)

Depends on how long between same mistakes. Be sure to do
as few activities as you can with root authorization. Don't
log in as root. Use sudo or su - to change to root temporarily,
and then immediately exit back. Use a red colored prompt
when running with root authorization.

 So until my next learning experience, Ciao for now.
 /carl h.

Hope you keep learning for a long time.

Mike
-- 
p=p=%c%s%c;main(){printf(p,34,p,34);};main(){printf(p,34,p,34);}
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!
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-11 Thread Neal Murphy
On Friday 11 June 2010 14:16:24 Mike McCarty wrote:
 Hope you keep learning for a long time.

 Mike

To misquote a fictional character, Learn long and prosper. Same thing, 
really. :)
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-11 Thread Aleksandar Kuktin
On Fri, 11 Jun 2010 13:16:24 -0500
Mike McCarty mike.mcca...@sbcglobal.net wrote:

 Use a red colored prompt when running with root authorization.
 
 Hope you keep learning for a long time.
 
 Mike

See, this is a good point. :)

I should fix this on my system.

-AKuktin
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-11 Thread Bruce Dubbs
Aleksandar Kuktin wrote:
 On Fri, 11 Jun 2010 13:16:24 -0500
 Mike McCarty mike.mcca...@sbcglobal.net wrote:

 Use a red colored prompt when running with root authorization.

 Hope you keep learning for a long time.

 Mike
 
 See, this is a good point. :)
 
 I should fix this on my system.

You might try this:

Put this in /etc/profile and ~/.bashrc

if [ -f /etc/bashrc ]; then
 . /etc/bashrc
fi

And this in /etc/bashrc

NORMAL=\[\e[0m\]
RED=\[\e[1;31m\]
GREEN=\[\e[1;32m\]
if [[ $EUID == 0 ]] ; then
   PS1=$red\u$nor...@$hostname$red [ $NORMAL\w$RED ]# $NORMAL
else
   PS1=\u$gr...@$hostname$green [ $NORMAL\w$GREEN ]\$ $NORMAL
fi

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-11 Thread Simon Geard
On Fri, 2010-06-11 at 13:16 -0500, Mike McCarty wrote:
 Use a red colored prompt when running with root authorization.

Oh yes, I can't agree with that one enough. Not that you want to
accidentally run rm -rf ~ as *any* user, but the red root prompt is a
useful reminder that you're playing with a loaded gun.

Simon.


signature.asc
Description: This is a digitally signed message part
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-10 Thread Simon Geard
On Wed, 2010-06-09 at 12:00 -0400, linux fan wrote:
 Speaking of backups and rescue disks, I am using an rsync snapshots
 style of backup. It does not compress, yet it can save multiple
 copies of a system at different points in time using remarkable
 little disk space. Any copy can be rsynced to any mount point and so
 I can recover or load up any system copy in around 20 minutes.

I quite like an idea Fedora are working on - if installed to a btrfs
partition, use it's snapshot support to provide an easy rollback option
when installing updates.

I've been meaning to try that approach myself, since I've trashed more
than a few systems while trying to update them.

Simon.


signature.asc
Description: This is a digitally signed message part
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-10 Thread Mike McCarty
Simon Geard wrote:
 I quite like an idea Fedora are working on - if installed to a btrfs
 partition, use it's snapshot support to provide an easy rollback option
 when installing updates.
 
 I've been meaning to try that approach myself, since I've trashed more
 than a few systems while trying to update them.

Hey, if you find out more, please do post information here!
That sounds like a very attractive possibility.

Mike
-- 
p=p=%c%s%c;main(){printf(p,34,p,34);};main(){printf(p,34,p,34);}
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!
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-09 Thread Mike McCarty
Andrew Benton wrote:
 On 08/06/10 21:54, Mike McCarty wrote:
 piper.guy1 wrote:
 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.
 
 Safer than editing /etc/passwd by hand is to use the command usermod 
 (read man usermod). Eg (as root)
 usermod -s /bin/bash $USERNAME

Yes, that's the recommended procedure. I wasn't intending to suggest
using an editor.

Mike
-- 
p=p=%c%s%c;main(){printf(p,34,p,34);};main(){printf(p,34,p,34);}
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!
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-09 Thread Mike McCarty
Bruce Dubbs wrote:
 Mike McCarty wrote:
 
 Yeah, deleting the link without changing your /etc/passwd entry
 to point to a valid shell would do that.
 
 Changing the /etc/password file won't do much.  The bootscripts need 
 /bin/sh.

I'm talking about his host, not LFS. I have no idea what his
boot scripts need on his host machine.

Mike
-- 
p=p=%c%s%c;main(){printf(p,34,p,34);};main(){printf(p,34,p,34);}
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!
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-09 Thread Mike McCarty
Neal Murphy wrote:

[...]

 mid-nineties. And just a couple weeks ago, I overwrote a disk that contained 
 half of a couple striped MD filesystems. Lost nearly 10 years of pics and 
 history. Another time, while redesigning the Smoothwall build system, I 

Of course, you've got it all on backup.

[...]

 So if all you did was wipe out a link to a shell, you haven't tried hard 
 enough. :) Almost any Linux distro that has a rescue mode (even Debian's 

I agree with this assessment. One of the reasons I _never_ log in as
root, and my normal user has no special priviledges at all.

[...]

 And, yes, I have done 'rm -rf *' when in the root directory on my old ATT 
 UNIXPC. I've since learned to be more careful. But, clearly, not careful 
 enough. :) 

I recall an old DEC system which ran Mt.Xinu (which is Unix tm
backwards). The sysadmin for that machine was absolutely clueless
about hierarchical file systems, and system integrity and security,
and put all the directories in /, and all users were just aliases
for user number 0 (root). About once a month they had to rebuild
the system from scratch because someone would fat finger an rm,
like

# rm -rf /fred

typed as

# rm -rf / fred

which would run for quite a while, then say it couldn't
find fred, after which ls wouldn't work, etc.

[...]

 As Mike says, LFS is not for newbies. Though I might allow that it is not for 
 newbies who have only one computer. Keep a computer, any computer, handy for 
 internet access to search for the mistakes you make and how others have 
 recovered. At least technically, we humans learn from our mistakes and are 

I recommend that the build be done on the spare and the main machine
not be poked around with. If you absolutely only have one machine,
then put an empty disc in it. Until you have a good amount of experience
doing builds, anyway. I've worked as a professional programmer since
1982, and been doing systems support building various kernels (even
wrote a few RTOS kernels) since about 1984 or so, and I've porked
my main system once.

[...]

 A possible future enhancement to 'the book' might be to incorporate 
 checkboxes 
 that a newbie would check off as she performs each step. Extra work? Yes. But 
 worth it to make each step clearer? Yes again.

Possibly. However, who prints the book? Mostly, I was cut'n'pasting
the commands.

Mike
-- 
p=p=%c%s%c;main(){printf(p,34,p,34);};main(){printf(p,34,p,34);}
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!
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-09 Thread Mike McCarty
Neal Murphy wrote:

[...]

 But you are right. I had no backups and no excuses. I have an empty 400GB 
 drive that would have held most of that data. And there's no reason I could 
 not have saved all the pics to DVDs. I didn't. I lost. Oh, well. No one died, 
 and no critters or humans were harmed, so no foul. :) Too bad I didn't wipe 
 out my ripped CDs. I could've re-ripped them. Sigh.

My backups are stored about 13 miles from my machine so I can have
a fire burn it up and destroy the discs, and not lose much. BTW, making
a good backup which is consistent is not as easy as it sounds. I
always drop to single user mode, unmount everything, run fscks on
it all, then remount read only, and then do the backup.

Mike
-- 
p=p=%c%s%c;main(){printf(p,34,p,34);};main(){printf(p,34,p,34);}
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!
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-09 Thread Theron Stanford
On Tue, Jun 8, 2010 at 11:45 PM, Mike McCarty
mike.mcca...@sbcglobal.net wrote:
 Neal Murphy wrote:

 A possible future enhancement to 'the book' might be to incorporate 
 checkboxes
 that a newbie would check off as she performs each step. Extra work? Yes. But
 worth it to make each step clearer? Yes again.

 Possibly. However, who prints the book? Mostly, I was cut'n'pasting
 the commands.

I print the book.  However, I print it 9-up to save paper.  I like
having the hard copy to read on the train.

Unfortunately, this sometimes has the side-effect of making 1 (one)
and l (ell) difficult to distinguish, though I've built enough times
that I usually guess right.  (I recall once spending quite some time
trying to figure out why GRUB couldn't find menu.1st.)  And during my
last build I couldn't figure out why

cp -sv libbz2.so* /lib

wouldn't work.  (The options are -av, of course.)

Theron
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-09 Thread linux fan
On 6/8/10, Neal Murphy neal.p.mur...@alum.wpi.edu wrote:

 ... You'll learn to pause before hitting ENTER.


I learned that lesson very quickly. It is extremely important.

My system wouldn't last long without backups.
Speaking of backups and rescue disks, I am using an rsync snapshots
style of backup. It does not compress, yet it can save multiple
copies of a system at different points in time using remarkable
little disk space. Any copy can be rsynced to any mount point and so
I can recover or load up any system copy in around 20 minutes.  I
have several LFS builds (2 are 6.6), a few Fedoras, and miscellaneous
others. I loaded and ran FC4 the other day. I made a snapshot of my
current system yesterday, before installing some experimental stuff.

The backup might have looked something like this:
mount LABEL=BACK_UPS /back_up
back_up snapdir=/back_ups/LFS-6-2

My last restoration might have looked something like this:
mount LABEL=BACK_UPS /back_ups
mount /dev/[bla-bla] /mnt
cd /mnt
R-M-minus-R-star (you never write that in a post)
rsync -aH --numeric-ids /back_ups/LFS-6-2/root_fs/back_up.0/. /mnt/

More info on these rsync snapshots in case anyone is curious is here
http://linux-fan-alfs.blogspot.com/2008/03/system-backups.html

Disk size has increased and disk cost has decreased to the point that
I have much more available disk space than I need (it's hard to find a
tiny 20GB disk any more.) Actually I have 4 various sized disks
including 2 500GB drives and a few old spare drives lying aroung. Each
one of the disks ha one partition that is the logical type that is
reported by fdisk as f  W95 Ext'd (LBA). The logical partition can
contain partitions 5-15. More than one of the disks has a partition
dedicated to back ups. I'm lazy and don't regularly delete old copies.

Most of the systems in the scheme are bootable, so I automatically
have numerous rescue systems. I also have grub boot cd and lfs
livecd. I've learned to expect that I'll occasionally (or regularly as
the case may be) break something. Many times, one of the rescue
systems has been called upon to save the day, even if only for 1 file.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Bruce Dubbs
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

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Ken Moffat
On 8 June 2010 21:08, piper.guy1 piper.g...@gmail.com wrote:

 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?

 If you have your install CD, or probably any 'Live' CD, that
should be adequate to do this.  If not, I like systemrescuecd
[ http://www.sysresccd.org/ for details ] - download from
http://sourceforge.net/projects/systemrescuecd/

 I don't see any obvious alternative way of fixing your broken
host's /bin/sh.

ĸen
-- 
After tragedy, and farce, OMG poneys!
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Mike McCarty
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

http://www.livecdlist.com/

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

Mike
-- 
p=p=%c%s%c;main(){printf(p,34,p,34);};main(){printf(p,34,p,34);}
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!
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Andrew Benton
On 08/06/10 21:54, Mike McCarty wrote:
 piper.guy1 wrote:
 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.

Safer than editing /etc/passwd by hand is to use the command usermod 
(read man usermod). Eg (as root)
usermod -s /bin/bash $USERNAME

Andy
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread linux fan
I haven't read where piper.guy confirmed that bash is installed or
that if bash is not installed, that changing the link to point to bash
won't help.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Bruce Dubbs
linux fan wrote:
 I haven't read where piper.guy confirmed that bash is installed or
 that if bash is not installed, that changing the link to point to bash
 won't help.

I don't know of a distro that doesn't install bash by default unless you 
are using tomsrtbt.

   -- Bruce

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Bruce Dubbs
Mike McCarty wrote:

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

I don't think that would not be the case today since udev mounts a 
tempfs on top of /dev and populates it upon boot.  See 6.2.2. Mounting 
and Populating /dev.  At one time, what you did would have been needed.

-- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Bruce Dubbs
Mike McCarty wrote:

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

Changing the /etc/password file won't do much.  The bootscripts need 
/bin/sh.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread piper.guy1
On Tue, Jun 8, 2010 at 5:50 PM, linux fan linuxscra...@gmail.com wrote:
 I haven't read where piper.guy confirmed that bash is installed or
 that if bash is not installed, that changing the link to point to bash
 won't help.
 --
 http://linuxfromscratch.org/mailman/listinfo/lfs-support
 FAQ: http://www.linuxfromscratch.org/lfs/faq.html
 Unsubscribe: See the above information page


Oh yes, it's there. I did confirm that bash was there before my calamity.

/carl h.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Neal Murphy
On Tuesday 08 June 2010 16:54:52 Mike McCarty wrote:
 piper.guy1 wrote:
  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?

The best way to do LFS is to pretend you are the computer, executing each 
command and understanding what each command does. In short time, you'll come 
to recognize what is happening and learn to pause before you hit the ENTER 
key.

Been there, done that. Hmmm. May I produce a t-shirt that proclaims, Member 
of the 'I hosed my Linux system building LFS!' club ??


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

It's fun the first couple times. :) Then it just becomes tedious and a pain to 
figure out how to avoid it in the future. :D

In a way, LFS is instructionary (as intended). If you do *exactly* what the 
book says, the probability is high that you will succeed and not hose your 
host system. I started playing with UNIX in 1986, and Linux in the 
mid-nineties. And just a couple weeks ago, I overwrote a disk that contained 
half of a couple striped MD filesystems. Lost nearly 10 years of pics and 
history. Another time, while redesigning the Smoothwall build system, I 
overwrote large bits of my host system because the build system did what I 
*told* it to do, not what I *wanted* it to do. Sigh. I *meant* to copy an 
external drive's image to a partition, *not* the whole drive.

So if all you did was wipe out a link to a shell, you haven't tried hard 
enough. :) Almost any Linux distro that has a rescue mode (even Debian's 
netinstall CD will work, and its much quicker) will allow you to boot into a 
usable Linux and repair such minor damage.
  - boot the live or rescue system
  - don't use your host's FS as root
  - mount your host's root FS and/or /usr FS, as needed
  - find what you hosed and any alternatives
  - create a symlink from that which you lost to an alternative
For example, if you deleted the symlink to dash, you can create a new link to 
dash. If you wiped out dash itself, you can create a symlink to just about 
anything that will act as a shell. Tclsh would do in a pinch; even perl or 
php would work.

At the worst, you might have to find and download the bash/dash/csh/tcsh 
package, learn to unarchive it, and replace only what you deleted. You could 
get lucky and find the package cached in a package archive area, as you'd 
find in at least Debian or Ubuntu (an ancient African word meaning can't 
install Debian).

And, yes, I have done 'rm -rf *' when in the root directory on my old ATT 
UNIXPC. I've since learned to be more careful. But, clearly, not careful 
enough. :) 

Just remember, it's only a computer. It can be restored to proper operating 
condition. In time, you'll learn to keep your personal data on a separate 
filesystem. You'll learn to pause before hitting ENTER. And in time you'll 
wonder why you stuck with Winders or Mac so long.

'97-02, I used BeOS as my primary system. For a short time, I used Windows 
after, until Debian Etch was release. I've been using Linux as my primary 
system ever since.

As Mike says, LFS is not for newbies. Though I might allow that it is not for 
newbies who have only one computer. Keep a computer, any computer, handy for 
internet access to search for the mistakes you make and how others have 
recovered. At least technically, we humans learn from our mistakes and are 
usually willing to help teach others to avoid and/or recover from theirs. 
Often you'll get a respone that details how to recover. Other times, you get 
a response like, There, there. This, too, shall pass.

So welcome to the world of virtual reality, where the all that exists are 
meaningless bits. It is all virtual; none of it is tangible. It is there to 
be moulded to our own individual desires.

In the future, pay close attention to *each* step of LFS. And be sure to 
follow each step *exactly*.

[Fest3er steps off his soapbox and puts it away.]

A possible future enhancement to 'the book' might be to incorporate checkboxes 
that a newbie would check off as she performs each step. Extra work? Yes. But 
worth it to make each step clearer? Yes again.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Neal Murphy
On Tuesday 08 June 2010 18:57:21 Bruce Dubbs wrote:
 Mike McCarty wrote:
  # 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.

 I don't think that would not be the case today since udev mounts a
 tempfs on top of /dev and populates it upon boot.  See 6.2.2. Mounting
 and Populating /dev.  At one time, what you did would have been needed.

But later, Mike says his system does not have udev.

If Mike had known the 'basic' /dev entries needed, he probably could have used 
mknod to create them. He could have booted some Linux in a virtual system, 
archived /dev, copied it to the system he crippled and unarchived it.

To quote an old SF TV show, Many such journeys are possible. :) :)
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Bruce Dubbs
Neal Murphy wrote:

 I started playing with UNIX in 1986, and Linux in the 
 mid-nineties. And just a couple weeks ago, I overwrote a disk that contained 
 half of a couple striped MD filesystems. Lost nearly 10 years of pics and 
 history.

No backups?  How is this different (in effect) from a failed disk drive.

   -- Bruce

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread Neal Murphy
On Tuesday 08 June 2010 20:05:46 Bruce Dubbs wrote:
 Neal Murphy wrote:
  I started playing with UNIX in 1986, and Linux in the
  mid-nineties. And just a couple weeks ago, I overwrote a disk that
  contained half of a couple striped MD filesystems. Lost nearly 10 years
  of pics and history.

 No backups?  How is this different (in effect) from a failed disk drive.

It differs in that I keep an eye on my hard drives. When they start to show 
signs of old age and failure, I buy a replacement and move everything to the 
new drive. (Euthenasia doesn't apply to hard drives.)

I've been close to a drive failure (an 'older' WD 30GB drive), but heard it 
struggling to read and decided I should buy a replacement. And back when 1TB 
drives reached $80US, I bought two Hitachi SATA 3s to replace the perfectly 
functional and problem-free 400GB Apple SATA 1.5s I'd bought a few years 
years earlier; I needed more disk space. Alas, wiping out data is *not* the 
preferred method of acquiring more disk space. :( Of course, it didn't help 
that my ASUS dual dual-core Opteron mboard on-board power supply capacitors 
gave up their ghosts; that's when I bought the new mboard and a quad PhII 965 
and 8GB RAM. (I truly *despise* waiting for Linux distribs to compile.)

But you are right. I had no backups and no excuses. I have an empty 400GB 
drive that would have held most of that data. And there's no reason I could 
not have saved all the pics to DVDs. I didn't. I lost. Oh, well. No one died, 
and no critters or humans were harmed, so no foul. :) Too bad I didn't wipe 
out my ripped CDs. I could've re-ripped them. Sigh.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: live and learn

2010-06-08 Thread littlebat
On Tue, 8 Jun 2010 16:08:18 -0400

 In  Host system Requirements, the instructions explicitly wants
 '/bin/sh' to be pointing to bash. Mine was pointing to dash. 

under Ubuntu, try sudo dpkg-reconfigure dash.

 Any recommendations on a rescue disk?

CDlinux. ( http://cdlinux.info/ )

PS: try virtual machine as your LFS building host. It will keep you real 
physical machine safe.

-- 
littlebat dashing.m...@gmail.com
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page