On Mon, Aug 06, 2018 at 03:02:28PM -0700, Paul Rogers wrote:
> > You are correct.
> >
> > "echo "int main(){}" > dummy.c &&
> > cc dummy.c -Wl,--verbose | grep SEARCH | sed 's/; /\n/g' "
> > still points to /tools/lib.
> >
> > I saved a copy of /tools and /sources before starting chapter 6.
> >
> > Can I exit chroot and delete certain folders, stay in chroot and delete
> > certain folders, stay in chroot and delete all the contents or is there
> > another option?
> > I should be able to restart Chapter 6, right?
I've not really been following this because the original problem was
so uncommon (so, I suppose bonus points to the OP for a new
variation on doing the build wrongly). More comments below.
>
> Please stop top-posting, not having seen the relevant reference annoys people
> here. I know, my email client wants to do that too, but it's really easy
> enough to reposition.
>
> Now then, it would seem that with prudent backups along the way one should be
> able to "surgically" remove what's wrong and pick it up at just the right
> spot. Been there done that, as have we all, but it's a waste of time.
> You'll be miles ahead by blowing it all away, restoring just the /tools
> backup, if you got it all and at the right place, and starting Ch6 from
> scratch. This time you might consider putting all the book's instructions
> for each package in a script you can quickly and rerun error-free. That is a
> time saver.
As a first step, in chroot use bash's history (up-arrow) to compare
what was actually typed against what the book says. Or
history >/duff-hist
and then, on the host (possibly as root if that file is not readable)
less /mnt/lfs/duff-hist
The important thing is to discover what was wrong. We get a lot of
reports where people did *something* wrong, eventually started over
and then succeeded. But (for the builder, not for us on the list!)
understanding what went wrong is the best approach.
After that, yes, exiting chroot, umounting /mnt/lfs, wiping it and
restoring from the backup should work.
Like Paul, I use my own scripts and on the (hopefully rare)
occasions where I screw up in applying a change from the book I
usually work out what I did wrong and then start again. But the
problem with using scripts - mostly for the first-time user,
although I screwed up recently myself - is dealing with errors.
So, while LFS teaches enough for people to be able to come up with
their own scripts, I do not recommend that for a first build. And
I'm sure many peole here would be horrified by my scripts - but they
usually work ok for me ;-)
ĸen
--
Entropy not found, thump keyboard to continue
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style