Ken Moffat wrote:
I'm getting close to making some specific suggestions to try to
reduce the number of errors that we see from new builders. One of
those is a script to be run as-desired in chapter 5 to look for
programs and libraries linked to the host system (see my past few
posts).
Unfortunately, gcc pass 1 builds libcc1.so which is, of course
linked to the host. Ignoring pass 1 progs called -lfs- is easy, but
to decide whether or not to test libcc1 I need to determine if gcc
pass 2 has been installed. And unfortunately, the tests ought to be
runnable for all chapter 5 packages from glibc onwards.
On x86_64, gcc pass 2 installs x86_64-unknown-linux-gnu-gcc. On my
previous 32-bit builds, it installed i686-pc-linux-gnu-gcc but I am
not certain if that was because of some minor way in which I might
have deviated (in the same way that I used to build glibc for i686),
or whether the 32-bit compiler will always be i686 ? I cannot
imagine anybody trying to build current LFS on i586 or i486, but who
knows ?
I'm not a huge fan of adding a bunch of code to check for earlier errors.
If it's one or two lines at a couple of strategic points in the book,
then that might be OK.
As you may know, I teach a college class using LFS/BLFS as vehicles for
learning Linux/Unix. Students run into a lot of problems. One of the
biggest issues is when a system is shut down during the process and
restarted later. My list of common errors include:
1. Forget to mount /mnt/lfs. Updating the host fstab fixes that.
2. Forget to set the LFS environment variable for root. Generally
updating /root/.(bash_)profile or /etc/profile fixes that.
3. Going too fast and omitting instructions.
4. Not deleting the build directories after the package is complete.
5. Not building Chapter 5 as user lfs. The host can be compromised if
you try to build Chapter 5 as root.
6. Not remounting virtual file systems in Chapters 6-8.
Generally I advocate a separate /boot partition. In Chapter 8, not doing
a 'mount --bind /boot /mnt/lfs/boot' leads to problems and occasionally
an unbootable system. In that case a rescue disk is needed.
If a system it too hosed, I tell students to start over. It's my way of
teaching fbbg.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page