Re: live and learn
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
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
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
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: HSR's
On Tue, 2010-06-08 at 19:54 -0400, Neal Murphy wrote: So, in the case that spawned this thread, the used could have continued to use his shell, albeit vey carefully and judiciously, until he exitted that shell. Even if he performed an 'rm -rf /', his shell would continue to run and he would continue to be able to use shell built-ins until he exitted that shell. At that point, only the root directory, '.' and '..' would be accessible. Not necessarily - it depends on what else is happening on the system at the same time. A few months back, I accidentally removed part of udev, and the system died almost instantly - I never found out exactly what went wrong, but speculate that something caused /dev to go missing, which locked up X... That was fun... ended up running off a Ubuntu live-boot for a week until I could get a new LFS build done... :( 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
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
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