I recently built LFS 6.6 on Kubuntu 9.10. Altough the book is fully comprehensive, some people might have difficulties during LFS build.
Here is the guide,hope it helps someone!
all things you should type with keyboard is bold
Section 1: Preparing Kubuntu
1-execute terminal : press Alt+F2 -> then type:
terminal
2-create password for root user -> $
sudo passwd
3-login with root user -> $
su root
4-install gawk package -> #
apt-get install gawk
5-select gawk as the default executable for awk -> #
update-alternatives --config awk
6-install patch package -> #
apt-get install patch
Section 2: Create LFS root partition
if you use ubuntu instead of Kubuntu ,you can use
gparted for creating LFS partition:
1- execute gparted: press Alt+F2 -> then type:
gparted
2- create Lfs partition (3GB minimum) on your hard free space (if you have problem while working with gparted search google, I can't explain everything!)
3- format this partition with ext3 filesystem
if you use kubuntu:
1-execute terminal : press Alt+F2 -> then type:
terminal
2-login with root user -> $
su root
3-execute cfdisk -> #
cfdisk
4-create new partition (3GB minimum) on your hard free space ( if you don't have free space on your hard disk you should resize existing partitions with other programs like
parted. if you don't know what to do with cfdisk search google, I can't explain everything!)
5-remember LFS partiton name (mine is /dev/sda7,yours maybe different)
6-format this partition with ext3 filesystem: #
mke2fs -jv /dev/sda7
7-follow book instructions for mounting this partition (with root user):
http://www.linuxfromscratch.org/lfs/.../mounting.html
Section 3: download required packages
1-execute terminal : press Alt+F2 -> then type:
terminal
2-login with root user -> $
su root
3-download the packages -> #
wget ftp://ftp.lfs-matrix.net/pub/lfs/lfs...es-6.6-rc1.tar
this file contains all the packages mentioned in the LFS 6.6 book except some patch scripts, you should download them separately (see section 3.3)
also the linux kernel in this tar file is Linux 2.6.32.7
Section 4: Final preparations
1-execute terminal : press Alt+F2 -> then type:
terminal
2-login with root user -> $
su root
3-follow exactly the book instructions on chapter 4 (order of commands are important!)
4-copy packages tar file to your $LFS/sources directory ->
cp -v /home/kubuntu/lfs-packages-6.6-rc1.tar /mnt/lfs/sources
5-change to sources directory ->
cd /mnt/lfs/sources
5-extract packages tar file ->
tar -xvf lfs-packages-6.6-rc1.tar
6-move files to the sources directory ->
mv lfs-6.6-rc1-sources/* /mnt/lfs/sources
7-change tools and sources directory ownership ->
chown -v lfs $LFS/sources $LFS/tools
Section 5: construct temporary system
1-execute terminal : press Alt+F2 -> then type:
terminal
2-login with root user -> $
su root
3-export LFS -> $
export LFS=/mnt/lfs
4-mounting lfs partition -> #
mount -vt ext3 /dev/sda7 $LFS
5-login with lfs user -> $
su lfs
6-change to source directory -> $
cd /mnt/lfs/sources
7-unpack binutils package -> $
tar -xvf binutils-2.20.tar.bz2
8-change directory to binutils package -> $
cd binutils-2.20
9-follow book instructions for installing binutils ->
http://www.linuxfromscratch.org/lfs/...ils-pass1.html
10-change to source directory -> $
cd /mnt/lfs/sources
11-remove binutils-2.20 directory -> $
rm -rf binutils-2.20 (this is optional for saving space on your LFS partition)
12-repeat steps 7-11 for remaining packages (replace binutils with the name of the package for example gcc-4.3.3 and so on)