book bug

Anna Jonna Armannsdottir a at superbruger.dk
Mon Oct 9 21:01:57 PDT 2000


In  chapter 5
Installation of Bash
root:bash-2.04# ./configure --enable-static-link \
       > --prefix=/usr --disable-nls \
       #################
       > --host=i486-pclinux-gnu
       #################
       root:bash-2.04# make

I added the host option because my current system is identified as a
i586 I but I am building a system on a that is to run on a i486.
Therefore the host option is necessary in this case.

I suggest that the following is added to help people save hours of work
when they (as I did) repeatedly  install and remove the glibc packages
when trying to fix a bug.

In chapter 5
Installation of Glibc

For your convenience, the commands for unpacking the glibc package is
given here since it may help you proceed faster.

       export LFSSRC=~/lfs; echo $LFSSRC
       cd $LFSSRC/usr/src
       gzip -dc glibc-2.1.3.tar.gz | tar xvf -
       cp ./glibc-linuxthreads-2.1.3.tar.gz ./glibc-crypt-2.1.tar.gz
./glibc-2.1.3/
        cd glibc-2.1.3
       gzip -dc glibc-linuxthreads-2.1.3.tar.gz | tar xvf -
       gzip -dc glibc-crypt-2.1.tar.gz | tar xvf -
       rm glibc-linuxthreads-2.1.3.tar.gz glibc-crypt-2.1.tar.gz


In chapter 5
Installation of Glibc
a slight error in the parameter list of a patch command.  The book says:

root:glibc-2.1.3# patch -Np1 -i ../glibc-2.1.3.patch

The command should read:
root:glibc-2.1.3# patch -N -p1 -i ../glibc-2.1.3.patch

In chapter 6, the installation of bash may be a little confusing,
because the users can not know what
happend and where they are. Therefore I suggest something like the
following (changes are beetween
###### lines):




Install Bash by running the following commands:


       root:bash-2.04# ./configure --prefix=/usr --with-ncurses \
       #################
       > --host=i486-pclinux-gnu
       #################
       root:bash-2.04# make
       root:bash-2.04# make install

################
Now that the new bash has been installed, you can log into your new
shell as root  and automatically enter into your /root directory.  This
is basically
what normally happens when you log into your system.  Before you proceed
you might want to ensure that the LFS variable is still valid.


       root:bash-2.04# logout
       root:bash-2.04# echo $LFS

       Use the procedure given in the beginning of the book, if LFS does
not
       hold a correct value.
       TODO: What happened and Where are we ?

       root:lfs# mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin
       root:lfs# chroot $LFS env -i HOME=/root bash --login

       ########################


Other suggestions:
Compiling and installing software with root priviliges is dangerous to
the system health.
After crashing my system once, I do this as a normal user.
The $LFS and all subdirectories are owned by the user. All the
downloaded packages
are owned by the user. All software configuration, compilation and
installation is done
by the user.
This has saved my system many times when I issued a perfectly good
install command like
the following when $LFS was not set:
make $LFS/usr install

The system will not be hurt by this if I am a normal user. But if I am
root, this will overwrite
some programs.


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list