The installation of all the software is pretty straightforward and you'll think it's so much easier and shorter to give the generic installation instructions for each package and only explain how to install something if a certain package requires an alternate installation method. Although I agree with you on this aspect, I, however, choose to give the full instructions for each and every package. This is simply to avoid any possible confusion and errors. Before you continue with this document you have to restart your system and boot into the LFS system. But before you do that, you need to determine which partition is used as your swap partition. This information can usually be found in the /etc/fstab file. Check this file for a line similar to this one: /dev/hda6 none swap sw 0 0 A different variation is a line simlar to this one: /dev/hda6 swap swap defaults 0 0
The 4th field in a line must contain 'sw'. Or the 2nd and/or 3rd field in a line must contain 'swap'. Keep in mind that there are more variantions possible, though it shouldn't be hard to recognize which line represents a swap partition (because it either contains 'sw' or 'swap' in it). All you need to remember is it's designation (which is /dev/hda6 in my case but this will probably be different on your system). When you have determined which partition is the swap partition, you can reboot your computer now and continue from here.
After you have rebooted you need to run /sbin/hwclock if you're on a PPC system before you execute anything else.
Before the software can be installed we need to remount the partition in read-write mode. Also, we need to activate the swap partition so that we won't risk running out of memory during large compilation processes (such as compiling gcc):
mount -n -o remount,rw / /
/sbin/swapon <swap device>
Replace <swap device> with the designation that you have determined before you rebooted the system (which is /dev/hda6 in my case).
Unpack the GCC archive and install it by running:
mkdir /usr/src/gcc-build
cd /usr/src/gcc-build
../gcc-2.95.2/configure --with-gxx-include-dir=/usr/include/g++ \
--enable-shared --enable-languages==c,c++
make bootstrap
make install
Unpack the Bison archive and install it by running:
./configure --datadir=/usr/share/bison
make
make install
Unpack the Mawk archive and install it by running:
./configure
make
make install
cd /usr/bin
ln -s mawk awk
Unpack the Findutils archive and install it by running:
./configure
make
make install
This package is known to cause compilation problems. If you're having trouble compiling this package as well, you can download a fixed package from http://www.linuxfromscratch.org/download/findutils-4.1-fixed.tar.gz
Unpack the Termpcap archive and install it by running:
./configure
make
make install
Unpack the Findutils archive and install it by running:
./configure --with-shared
make
make install
Unpack the Less archive and install it by running:
./configure
make
make install
mv /usr/bin/less /bin
Unpack the Perl archive and install it by running:
./Configure
make
make install
Note that we skip the make test step. This is because at the moment the system isn't ready yet for running the perl test suite. So we'll trust that perl compiled properly. If you want to be 100% sure, you have to reinstall Perl youself using the above instructions after you have created the bootscripts and have rebooted the system.
Unpack the Texinfo archive and install it by running:
./configure
make
make install
Unpack the Autoconf archive and install it by running:
./configure
make
make install
Unpack the Automake archive and install it by running:
./configure
make install
Unpack the Bash archive and install it by running:
./configure
make
make install
mv /usr/bin/bash /bin
Unpack the Binutils archive and install it by running:
./configure
make
make install
Unpack the Bzip2 archive and install it by running:
make
make install
cd /usr/bin
mv bunzip2 bzip2 /bin
Unpack the Diffutils archive and install it by running:
./configure
make
make install
Unpack the E2fsprogs archive and install it by running:
./configure
make
make install
mv /usr/sbin/mklost+found /sbin
Unpack the Fileutils archive and install it by running:
./configure
make
make install
cd /usr/bin
mv chgrp chmod chown cp dd df ln /bin
mv ls mkdir mknod mv rm rmdir sync /bin
Unpack the Gzip archive and install it by running:
./configure
make
make install
cd /usr/bin
mv *z /bin
Unpack the Ld.soarchive and install it by running:
cd util
make ldd ldconfig
cp ldd /bin
cp ldconfig /sbin
rm /usr/bin/ldd
Unpack the Libtool archive and install it by running:
./configure
make
make install
Unpack the Linux86 archive and install it by running:
cd as
make
make install
cd ../ld
make ld86
make install
Unpack the Shell Utils archive and install it by running:
./configure
make
make install
cd /usr/bin
mv date echo false pwd stty /bin
mv su true uname hostname /bin
Unpack the Shadow Password Suite archive and install it by running:
./configure
make
make install
cd etc
cp limits login.access login.defs.linux shells suauth /etc
mv /etc/login.defs.linux /etc/login.defs
cd /usr/bin
mv chpasswd dpasswd groupadd groupdel groupmod logoutd /sbin
mv mkpasswd newusers useradd userdel usermod grpchk /sbin
mv pwck vipw grpconv grpunconv pwconv pwunconv /sbin
Unpack the Man archive and install it by running:
./configure -default
make
make install
Unpack the Modutils archive and install it by running:
./configure -default
make
make install
Unpack the Procps archive and install it by running:
gcc -O3 -Wall -Wno-unused -c watch.c
make
make -e XSCPT="" install
mv /usr/bin/kill /bin
Unpack the Sed archive and install it by running:
./configure
make
make install
mv /usr/bin/sed /bin
Unpack the Start-stop-daemon archive and install it by running:
make start-stop-daemon
cp start-stop-daemon /sbin
cp start-stop-daemon.8 /usr/share/man/man8
Unpack the Tar archive and install it by running:
./configure
make
make install
mv /usr/bin/tar /bin
Unpack the Texutils archive and install it by running:
./configure
make
make install
mv /usr/bin/cat /bin
Unpack the Vim-rt and Vim-src archives and install them by running:
./configure
make
make install
cd /usr/bin
ln -s vim vi
Unpack the Util-Linux archive
Edit the MCONFIG file, find and modify the following variables as follows:
HAVE_PASSWD=yes
HAVE_SLN=yes
HAVE_TSORT=yes
Install the package by running:
groupadd -g 5 tty
./configure
make
make install
This installation will overwrite the existing /sbin/hwclock if you're using a PPC system. You need to re-create this file. Create a new file hwclock containing the following:
#!/bin/sh
# Begin /sbin/hwclock
/sbin/clock -s
# End /sbin/hwclock
Install this file by running:
chmod 755 hwclock
mv hwclock /sbin