Maybe too many softwares running concurrently during stepping through kernel source code will make thing complex, I just want build a clean linux system following the LFS projects.
1. download lfslivecd-x86-6.2-3 livecd from
http://ftp.osuosl.org/pub/lfs-livecd/lfslivcd-x86-6.2-3.iso or other url from what lfs website lists, and burn it to a cdrom. Why I choose x86-6.2-3 is because this version matches my linux-2.6.15.5-kgdb close.
2. boot your machine with the lfs livecd. Press enter key whenever it stops asking for settings during booting up until the # prompts. Run startx command to enter graphics UI, that is Xfce. In the Xfce panel in the bottom of the desktop, launch a Terminal and SeaMonkey Web Browser. The SeamMonkey Web Browser will display the LFS book as its default home page, from which we can copy the commands and paste(shift + Insert) to the Terminal and run.
3. Create a new partition or use an old partition for LFS use, say, /dev/hda2. Format this partition and mount it.
#export LFS=/mnt/lfs
# mke2fs -jv /dev/hda2
# mkdir -pv $LFS
# mount -v -t ext3 /dev/hda2 $LFS
4. Copy the lfs souces to $LFS/sources. Make it writable and sticky.
# mkdir -pv $LFS/sources
# cp -R /lfs-sources/* $LFS/sources
# chmod -v a+wt $LFS/sources
make a directory to accommodate the temporary build tools and make a link to /
# mkdir -pv $LFS/tools
# ln -sv $LFS/tools /
Add a lfs user and group and build the temporary tools as lfs user without messing host environments up. Change the
previously created two directories ownership to lfs user
# groupadd lfs
# useradd -s /bin/bash -g lfs -m -k /dev/null lfs
# chown -v lfs $LFS/tools
# chown -v lfs $LFS/sources
Login as user lfs and setting up the environment.
# su – lfs
# cat >~/.bash_profile <<"EOF"
exec env -i HOME=$HOME TERM=$TERM PS1=’\u:\w\$ ‘ /bin/bash
EOF
# cat >~/.bashrc <<"EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
EOF
# source ~/.bash_profile
5. Now we can start building LFS now. In order to save so many key strokes, I just made a shell scripts to build the time consuming packags building procedure. Run the scripts to build the temporary tools.
# chmod +x 5chapt.sh
# ./5chapt.sh
Some notes I feel needs to point out for the above building procedure.
A. First, binutils, gcc and glibc is build and installed under /tools. where ld-new is built with LIB_PATH=/tools/lib but now used during gcc and glibc build. During toolchain adjusting, the ld-new which will link /tools/lib library will be the default linker. Gcc will use /tools/lib/ld-linux.so.2 by amend its /usr/lib/gcc/i486-pc-linux-gnu/4.0.3/specs file.
B. Then build the test tools, tcl, expect, dejagnu. Rebuild the gcc and binutils. The ld in binutils is built with LIB_PATH=/usr/lib:/lib for chapter 6 usage.
C. Sed is extensively used during the build where it is used used mostly to replace a pattern in file. eg,
sed -i ‘s@^/lib/ld-linux.so.2@/tools&@g’ $SPECFILE > tempspecfile
search string /lib/ld-linux.so.2 at line beginning and append /tools to this pattern in aspecfile, -i means modify on the file directly.
6. Install basic system software. We use the toolchain built in chapter 5 to build the basic system software.
Prepare virtual kernel file system and change root by running the following script.
# chmod +x 6chroot.sh
# ./6chroot.sh
Under the chroot’ed environment, run the following script to build the basic system software.
# chmod +x 6chapt.sh
# ./6chapt.sh
7. Now we can setup system bootscripts. First chroot to the new built system.
# chroot $LFS /usr/bin/env -i HOME=/root TERM="$TERM" PS1=’\u:\w\$ ‘ PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash –login
Under the chroot’ed environment, run the following script to setup system script. Be care to modify /etc/fstab to match partition layout.
# ./7chapt.sh
8. Build the linux kernel. Just follow the LFS book. Copy the built kernel and System.map files to /boot directory. Of course, we can build kgdb versioned kernel here. Just follow kgdb guide. Modify our boot loader to start the new built LFS kernel.
9. reboot the machine and choose our boot entry.
# logout
# umount -v $LFS/dev/pts
# umount -v $LFS/dev/shm
# umount -v $LFS/dev
# umount -v $LFS/proc
# umount -v $LFS/sys
# umount -v $LFS
# reboot
#############################################################
5chap.sh
#!/bin/bash
export LFS=/mnt/lfs
cd $LFS/sources
#Binutils-2.16.1 – Pass 1
tar xvf binutils-2.16.1.tar.bz2
cd binutils-2.16.1
mkdir -v ../binutils-build
cd ../binutils-build
../binutils-2.16.1/configure –prefix=/tools –disable-nls
make
make install
make -C ld clean
make -C ld LIB_PATH=/tools/lib
cp -v ld/ld-new /tools/bin
cd $LFS/sources
rm -rf binutils-2.16.1
rm -rf binutils-build
#GCC-4.0.3 – Pass 1
cd $LFS/sources
tar xvf gcc-4.0.3.tar.bz2
cd gcc-4.0.3
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.0.3/configure –prefix=/tools \
–with-local-prefix=/tools –disable-nls –enable-shared \
–enable-languages=c
make bootstrap
make install
ln -vs gcc /tools/bin/cc
cd $LFS/sources
rm -rf gcc-4.0.3
rm -rf gcc-build
#Linux-Libc-Headers-2.6.12.0
tar xvf linux-libc-headers-2.6.12.0.tar.bz2
cp -Rv linux-libc-headers-2.6.12.0/include/asm-i386 /tools/include/asm
cp -Rv linux-libc-headers-2.6.12.0/include/linux /tools/include
rm -rf linux-libc-headers-2.6.12.0
cd $LFS/sources
#Glibc-2.3.6
tar xvf glibc-2.3.6.tar.bz2
mkdir -v glibc-build
cd glibc-build
../glibc-2.3.6/configure –prefix=/tools \
–disable-profile –enable-add-ons \
–enable-kernel=2.6.0 –with-binutils=/tools/bin \
–without-gd –with-headers=/tools/include \
–without-selinux
make
mkdir -v /tools/etc
touch /tools/etc/ld.so.conf
make install
cd $LFS/sources
rm -rf glibc-build
rm -rf glibc-2.3.6
#Adjusting the Toolchain
cd $LFS/sources
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &&
gcc -dumpspecs > $SPECFILE &&
sed ‘s@^/lib/ld-linux.so.2@/tools&@g’ $SPECFILE > tempspecfile &&
mv -vf tempspecfile $SPECFILE &&
unset SPECFILE
GCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include &&
find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf ‘{}’ \; &&
rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &&
unset GCC_INCLUDEDIR
#Tcl-8.4.13
cd $LFS/sources
tar xvf tcl8.4.13-src.tar.gz
cd tcl8.4.13
cd unix
./configure –prefix=/tools
make
make install
make install-private-headers
ln -sv tclsh8.4 /tools/bin/tclsh
cd $LFS/sources
rm -rf tcl8.4.13
#Expect-5.43.0
cd $LFS/sources
tar xvf expect-5.43.0.tar.gz
cd expect-5.43
patch -Np1 -i ../expect-5.43.0-spawn-1.patch
./configure –prefix=/tools –with-tcl=/tools/lib \
–with-tclinclude=/tools/include –with-x=no
make
make SCRIPTS="" install
cd $LFS/sources
rm -rf expect-5.43
#DejaGNU-1.4.4
cd $LFS/sources
tar xvf dejagnu-1.4.4.tar.gz
cd dejagnu-1.4.4
./configure –prefix=/tools
make install
cd $LFS/sources
rm -rf dejagnu-1.4.4
#GCC-4.0.3 – Pass 2
cd $LFS/sources
tar xvf gcc-4.0.3.tar.bz2
cd gcc-4.0.3
cp -v gcc/Makefile.in{,.orig} &&
sed ‘s@\./fixinc\.sh@-c true@’ gcc/Makefile.in.orig > gcc/Makefile.in
cp -v gcc/Makefile.in{,.tmp} &&
sed ‘s/^XCFLAGS =$/& -fomit-frame-pointer/’ gcc/Makefile.in.tmp \
> gcc/Makefile.in
patch -Np1 -i ../gcc-4.0.3-specs-1.patch
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.0.3/configure –prefix=/tools \
–with-local-prefix=/tools –enable-clocale=gnu \
–enable-shared –enable-threads=posix \
–enable-__cxa_atexit –enable-languages=c,c++ \
–disable-libstdcxx-pch
make
make -k check
make install
cd $LFS/sources
rm -rf gcc-4.0.3
rm -rf gcc-build
#Binutils-2.16.1 – Pass 2
tar xvf binutils-2.16.1.tar.bz2
cd binutils-2.16.1
mkdir -v ../binutils-build
cd ../binutils-build
../binutils-2.16.1/configure –prefix=/tools \
–disable-nls –with-lib-path=/tools/lib
make
make check
make install
make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib
cp -v ld/ld-new /tools/bin
cd $LFS/sources
rm -rf binutils-2.16.1
rm -rf binutils-build
#Ncurses-5.5
tar xvf ncurses-5.5.tar.gz
cd ncurses-5.5
./configure –prefix=/tools –with-shared \
–without-debug –without-ada –enable-overwrite
make
make install
cd $LFS/sources
rm -rf ncurses-5.5
#Bash-3.1
tar xvf bash-3.1.tar.gz
cd bash-3.1
patch -Np1 -i ../bash-3.1-fixes-8.patch
./configure –prefix=/tools –without-bash-malloc
make
make install
ln -vs bash /tools/bin/sh
cd $LFS/sources
rm -rf bash-3.1
#Bzip2-1.0.3
tar xvf bzip2-1.0.3.tar.gz
cd bzip2-1.0.3
make
make PREFIX=/tools install
cd $LFS/sources
rm -rf bzip2-1.0.3
#Coreutils-5.96
tar xvf coreutils-5.96.tar.bz2
cd coreutils-5.96
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf coreutils-5.96
#Diffutils-2.8.1
tar xvf diffutils-2.8.1.tar.gz
cd diffutils-2.8.1
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf diffutils-2.8.1
#Findutils-4.2.27
tar xvf findutils-4.2.27.tar.gz
cd findutils-4.2.27
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf findutils-4.2.27
#Gawk-3.1.5
tar xvf gawk-3.1.5.tar.bz2
cd gawk-3.1.5
./configure –prefix=/tools
cat >>config.h <<"EOF"
#define HAVE_LANGINFO_CODESET 1
#define HAVE_LC_MESSAGES 1
EOF
make
make install
cd $LFS/sources
rm -rf gawk-3.1.5
#Gettext-0.14.5
tar xvf gettext-0.14.5.tar.gz
cd gettext-0.14.5
cd gettext-tools
./configure –prefix=/tools –disable-shared
make -C lib
make -C src msgfmt
cp -v src/msgfmt /tools/bin
cd $LFS/sources
rm -rf gettext-0.14.5
#Grep-2.5.1a
tar xvf grep-2.5.1a.tar.bz2
cd grep-2.5.1a
./configure –prefix=/tools \
–disable-perl-regexp
make
make install
cd $LFS/sources
rm -rf grep-2.5.1a
#Gzip-1.3.5
tar xvf gzip-1.3.5.tar.gz
cd gzip-1.3.5
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf gzip-1.3.5
#M4-1.4.4
tar xvf m4-1.4.4.tar.gz
cd m4-1.4.4
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf m4-1.4.4
#Make-3.80
tar xvf make-3.80.tar.bz2
cd make-3.80
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf make-3.80
#Patch-2.5.4
tar xvf patch-2.5.4.tar.gz
cd patch-2.5.4
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf patch-2.5.4
#Perl-5.8.8
tar xvf perl-5.8.8.tar.bz2
cd perl-5.8.8
patch -Np1 -i ../perl-5.8.8-libc-2.patch
./configure.gnu –prefix=/tools -Dstatic_ext=’Data/Dumper Fcntl IO POSIX’
make perl utilities
cp -v perl pod/pod2man /tools/bin
mkdir -pv /tools/lib/perl5/5.8.8
cp -Rv lib/* /tools/lib/perl5/5.8.8
cd $LFS/sources
rm -rf perl-5.8.8
#Sed-4.1.5
tar xvf sed-4.1.5.tar.gz
cd sed-4.1.5
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf sed-4.1.5
#Tar-1.15.1
tar xvf tar-1.15.1.tar.bz2
cd tar-1.15.1
patch -Np1 -i ../tar-1.15.1-gcc4_fix_tests-1.patch
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf tar-1.15.1
#Texinfo-4.8
tar xvf texinfo-4.8.tar.bz2
cd texinfo-4.8
./configure –prefix=/tools
make
make install
cd $LFS/sources
rm -rf texinfo-4.8
#Util-linux-2.12r
tar xvf util-linux-2.12r.tar.bz2
cd util-linux-2.12r
sed -i ‘s@/usr/include@/tools/include@g’ configure
./configure
make -C lib
make -C mount mount umount
make -C text-utils more
cp mount/{,u}mount text-utils/more /tools/bin
cd $LFS/sources
rm -rf util-linux-2.12r
#End
# Go to 5.32. Changing Ownership continue
echo
echo "Please run exit and continue with 6chroot.sh"
#############################################################
6chap.sh
#!/tools/bin/bash
#Creating Directories FHS
mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}
mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
install -dv -m 0750 /root
install -dv -m 1777 /tmp /var/tmp
mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir -pv /usr/{,local/}share/man/man{1..8}
for dir in /usr /usr/local; do
ln -sv share/{man,doc,info} $dir
done
mkdir -v /var/{lock,log,mail,run,spool}
mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
#Creating Essential Files and Symlinks
ln -sv /tools/bin/{bash,cat,grep,pwd,stty} /bin
ln -sv /tools/bin/perl /usr/bin
ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
ln -sv bash /bin/sh
touch /etc/mtab
cat > /etc/passwd << "EOF"
root:x:0:0:root:/root:/bin/bash
EOF
cat > /etc/group << "EOF"
root:x:0:
bin:x:1:
sys:x:2:
kmem:x:3:
tty:x:4:
tape:x:5:
daemon:x:6:
floppy:x:7:
disk:x:8:
lp:x:9:
dialout:x:10:
audio:x:11:
video:x:12:
utmp:x:13:
usb:x:14:
cdrom:x:15:
EOF
#exec /tools/bin/bash –login +h
touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chgrp -v utmp /var/run/utmp /var/log/lastlog
chmod -v 664 /var/run/utmp /var/log/lastlog
cd /sources/
#Linux-Libc-Headers-2.6.12.0
tar xvf linux-libc-headers-2.6.12.0.tar.bz2
cd linux-libc-headers-2.6.12.0
patch -Np1 -i ../linux-libc-headers-2.6.12.0-inotify-3.patch
install -dv /usr/include/asm
cp -Rv include/asm-i386/* /usr/include/asm
cp -Rv include/linux /usr/include
chown -Rv root:root /usr/include/{asm,linux}
find /usr/include/{asm,linux} -type d -exec chmod -v 755 {} \;
find /usr/include/{asm,linux} -type f -exec chmod -v 644 {} \;
cd /sources/
rm -rf linux-libc-headers-2.6.12.0
#Man-pages-2.34
tar xvf man-pages-2.34.tar.bz2
cd man-pages-2.34
make install
cd /sources/
rm -rf man-pages-2.34
#Glibc-2.3.6
tar xvf glibc-2.3.6.tar.bz2
cd glibc-2.3.6
tar -xf ../glibc-libidn-2.3.6.tar.bz2
patch -Np1 -i ../glibc-2.3.6-linux_types-1.patch
patch -Np1 -i ../glibc-2.3.6-inotify-1.patch
sed -i ‘/vi_VN.TCVN/d’ localedata/SUPPORTED
sed -i \
‘s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|’ \
scripts/test-installation.pl
mkdir -v ../glibc-build
cd ../glibc-build
../glibc-2.3.6/configure –prefix=/usr \
–disable-profile –enable-add-ons \
–enable-kernel=2.6.0 –libexecdir=/usr/lib/glibc
make
make -k check 2>&1 | tee glibc-check-log
grep Error glibc-check-log
touch /etc/ld.so.conf
make install
cp -v ../glibc-2.3.6/sysdeps/unix/sysv/linux/inotify.h \
/usr/include/sys
mkdir -pv /usr/lib/locale
localedef -i de_DE -f ISO-8859-1 de_DE
localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
localedef -i en_HK -f ISO-8859-1 en_HK
localedef -i en_PH -f ISO-8859-1 en_PH
localedef -i en_US -f ISO-8859-1 en_US
localedef -i en_US -f UTF-8 en_US.UTF-8
localedef -i es_MX -f ISO-8859-1 es_MX
localedef -i fa_IR -f UTF-8 fa_IR
localedef -i fr_FR -f ISO-8859-1 fr_FR
localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
localedef -i it_IT -f ISO-8859-1 it_IT
localedef -i ja_JP -f EUC-JP ja_JP
cat > /etc/nsswitch.conf << "EOF"
# Begin /etc/nsswitch.conf
passwd: files
group: files
shadow: files
hosts: files dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
# End /etc/nsswitch.conf
EOF
cp -v –remove-destination /usr/share/zoneinfo/Asia/Shanghai \
/etc/localtime
cat > /etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf
/usr/local/lib
/opt/lib
# End /etc/ld.so.conf
EOF
cd /sources/
rm -rf glibc-2.3.6
rm -rf glibc-build
#Re-adjusting the toolchain
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
gcc -dumpspecs | \
perl -p -e ‘s@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g;’ \
-e ‘s@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;’ > \
`dirname $(gcc –print-libgcc-file-name)`/specs
#Binutils-2.16.1
tar xvf binutils-2.16.1.tar.bz2
cd binutils-2.16.1
mkdir -v ../binutils-build
cd ../binutils-build
../binutils-2.16.1/configure –prefix=/usr \
–enable-shared
make tooldir=/usr
make check
make tooldir=/usr install
cp -v ../binutils-2.16.1/include/libiberty.h /usr/include
cd /sources/
rm -rf binutils-2.16.1
rm -rf binutils-build
#GCC-4.0.3
tar xvf gcc-4.0.3.tar.bz2
cd gcc-4.0.3
sed -i ‘s/install_to_$(INSTALL_DEST) //’ libiberty/Makefile.in
sed -i ‘s/^XCFLAGS =$/& -fomit-frame-pointer/’ gcc/Makefile.in
sed -i ‘s@\./fixinc\.sh@-c true@’ gcc/Makefile.in
sed -i ‘s/@have_mktemp_command@/yes/’ gcc/gccbug.in
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.0.3/configure –prefix=/usr \
–libexecdir=/usr/lib –enable-shared \
–enable-threads=posix –enable-__cxa_atexit \
–enable-clocale=gnu –enable-languages=c,c++
make
make -k check
../gcc-4.0.3/contrib/test_summary
make install
ln -sv ../usr/bin/cpp /lib
ln -sv gcc /usr/bin/cc
cd /sources/
rm -rf gcc-4.0.3
rm -rf gcc-build
#Berkeley DB-4.4.20
tar xvf db-4.4.20.tar.gz
cd db-4.4.20
patch -Np1 -i ../db-4.4.20-fixes-1.patch
cd build_unix &&
../dist/configure –prefix=/usr –enable-compat185 –enable-cxx
make
make docdir=/usr/share/doc/db-4.4.20 install
chown -v root:root /usr/bin/db_* \
/usr/lib/libdb* /usr/include/db* &&
chown -Rv root:root /usr/share/doc/db-4.4.20
cd /sources/
rm -rf db-4.4.20
#Coreutils-5.96
tar xvf coreutils-5.96.tar.bz2
cd coreutils-5.96
patch -Np1 -i ../coreutils-5.96-uname-1.patch
patch -Np1 -i ../coreutils-5.96-suppress_uptime_kill_su-1.patch
patch -Np1 -i ../coreutils-5.96-i18n-1.patch
chmod +x tests/sort/sort-mb-tests
sed -i ‘s/_LEN 6/_LEN 20/’ src/who.c
./configure –prefix=/usr
make
echo "dummy1:x:1000:" >> /etc/group
echo "dummy2:x:1001:dummy" >> /etc/group
echo "dummy:x:1000:1000::/root:/bin/bash" >> /etc/passwd
make NON_ROOT_USERNAME=dummy check-root
src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"
sed -i ‘/dummy/d’ /etc/passwd /etc/group
make install
mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
mv -v /usr/bin/{false,hostname,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
mv -v /usr/bin/chroot /usr/sbin
mv -v /usr/bin/{head,sleep,nice} /bin
cd /sources/
rm -rf coreutils-5.96
#Iana-Etc-2.10
tar -xvf iana-etc-2.10.tar.bz2
cd iana-etc-2.10
make
make install
cd /sources/
rm -rf iana-etc-2.10
#M4-1.4.4
tar xvf m4-1.4.4.tar.gz
cd m4-1.4.4
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf m4-1.4.4
#Bison-2.2
tar xvf bison-2.2.tar.bz2
cd bison-2.2
./configure –prefix=/usr
echo ‘#define YYENABLE_NLS 1’ >> config.h
make
make check
make install
cd /sources/
rm -rf bison-2.2
#Ncurses-5.5
tar -xvf ncurses-5.5.tar.gz
cd ncurses-5.5
patch -Np1 -i ../ncurses-5.5-fixes-1.patch
./configure –prefix=/usr –with-shared –without-debug –enable-widec
make
make install
chmod -v 755 /usr/lib/*.5.5
chmod -v 644 /usr/lib/libncurses++w.a
mv -v /usr/lib/libncursesw.so.5* /lib
ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so
for lib in curses ncurses form panel menu ; do \
rm -vf /usr/lib/lib${lib}.so ; \
echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
done &&
ln -sfv libncurses++w.a /usr/lib/libncurses++.a
echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so &&
ln -sfv libncurses.so /usr/lib/libcurses.so &&
ln -sfv libncursesw.a /usr/lib/libcursesw.a &&
ln -sfv libncurses.a /usr/lib/libcurses.a
make distclean &&
./configure –prefix=/usr –with-shared –without-normal \
–without-debug –without-cxx-binding &&
make sources libs &&
cp -av lib/lib*.so.5* /usr/lib
cd /sources/
rm -rf ncurses-5.5
#procps-3.2.6
tar xvf procps-3.2.6.tar.gz
cd procps-3.2.6
make
make install
cd /sources/
rm -rf procps-3.2.6
#Sed-4.1.5
tar xvf sed-4.1.5.tar.gz
cd sed-4.1.5
./configure –prefix=/usr –bindir=/bin –enable-html
make
make install
cd /sources/
rm -rf sed-4.1.5
#libtool-1.5.22
tar xvf libtool-1.5.22.tar.gz
cd libtool-1.5.22
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf libtool-1.5.22
#perl-5.8.8.tar.bz2
tar xvf perl-5.8.8.tar.bz2
cd perl-5.8.8
echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
./configure.gnu –prefix=/usr \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR"
make
make install
cd /sources/
rm -rf perl-5.8.8
#Readline-5.1
tar xvf readline-5.1.tar.gz
cd readline-5.1
patch -Np1 -i ../readline-5.1-fixes-3.patch
sed -i ‘/MV.*old/d’ Makefile.in
sed -i ‘/{OLDSUFF}/c:’ support/shlib-install
./configure –prefix=/usr –libdir=/lib
make SHLIB_LIBS=-lncurses
make install
chmod -v 755 /lib/lib{readline,history}.so*
mv -v /lib/lib{readline,history}.a /usr/lib
rm -v /lib/lib{readline,history}.so
ln -sfv ../../lib/libreadline.so.5 /usr/lib/libreadline.so
ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so
cd /sources/
rm -rf readline-5.1
#Zlib-1.2.3
tar xvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure –prefix=/usr –shared –libdir=/lib
make
make install
rm -v /lib/libz.so
ln -sfv ../../lib/libz.so.1.2.3 /usr/lib/libz.so
make clean
./configure –prefix=/usr
make
make install
chmod -v 644 /usr/lib/libz.a
cd /sources/
rm -rf zlib-1.2.3
#Autoconf-2.59
tar xvf autoconf-2.59.tar.bz2
cd autoconf-2.59
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf autoconf-2.59
#Automake-1.9.6
tar xvf automake-1.9.6.tar.bz2
cd automake-1.9.6
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf automake-1.9.6
#Bash-3.1
tar xvf bash-3.1.tar.gz
cd bash-3.1
tar -xvf ../bash-doc-3.1.tar.gz &&
sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/bash-3.1|" \
Makefile.in
patch -Np1 -i ../bash-3.1-fixes-8.patch
./configure –prefix=/usr –bindir=/bin \
–without-bash-malloc –with-installed-readline
make
make tests
make install
cd /sources/
rm -rf bash-3.1
#Bzip2-1.0.3
tar xvf bzip2-1.0.3.tar.gz
cd bzip2-1.0.3
patch -Np1 -i ../bzip2-1.0.3-install_docs-1.patch
patch -Np1 -i ../bzip2-1.0.3-bzgrep_security-1.patch
sed -i ‘s@tempfile -d /tmp -p bz@mktemp -p /tmp@’ bzdiff
make -f Makefile-libbz2_so
make clean
make
make install
cp -v bzip2-shared /bin/bzip2
cp -av libbz2.so* /lib
ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
rm -v /usr/bin/{bunzip2,bzcat,bzip2}
ln -sv bzip2 /bin/bunzip2
ln -sv bzip2 /bin/bzcat
cd /sources/
rm -rf bzip2-1.0.3
#Diffutils-2.8.1
tar xvf diffutils-2.8.1.tar.gz
cd diffutils-2.8.1
patch -Np1 -i ../diffutils-2.8.1-i18n-1.patch
touch man/diff.1
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf diffutils-2.8.1
#E2fsprogs-1.39
tar xvf e2fsprogs-1.39.tar.gz
cd e2fsprogs-1.39
mkdir -v build
cd build
../configure –prefix=/usr –with-root-prefix="" \
–enable-elf-shlibs –disable-evms
make
make install
make install-libs
cd /sources/
rm -rf e2fsprogs-1.39
#File-4.17
tar xvf file-4.17.tar.gz
cd file-4.17
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf file-4.17
#Findutils-4.2.27
tar xvf findutils-4.2.27.tar.gz
cd findutils-4.2.27
./configure –prefix=/usr –libexecdir=/usr/lib/findutils \
–localstatedir=/var/lib/locate
make
make install
mv -v /usr/bin/find /bin
sed -i -e ‘s/find:=${BINDIR}/find:=\/bin/’ /usr/bin/updatedb
cd /sources/
rm -rf findutils-4.2.27
#Flex-2.5.33
tar xvf flex-2.5.33.tar.bz2
cd flex-2.5.33
./configure –prefix=/usr
make
make install
ln -sv libfl.a /usr/lib/libl.a
cat > /usr/bin/lex << "EOF"
#!/bin/sh
# Begin /usr/bin/lex
exec /usr/bin/flex -l "$@"
# End /usr/bin/lex
EOF
chmod -v 755 /usr/bin/lex
cd /sources/
rm -rf flex-2.5.33
#GRUB-0.97
tar xvf grub-0.97.tar.gz
cd grub-0.97
patch -Np1 -i ../grub-0.97-disk_geometry-1.patch
./configure –prefix=/usr
make
make install
mkdir -v /boot/grub
cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub
cd /sources/
rm -rf grub-0.97
#gawk-3.1.5
tar xvf gawk-3.1.5.tar.bz2
cd gawk-3.1.5
patch -Np1 -i ../gawk-3.1.5-segfault_fix-1.patch
./configure –prefix=/usr –libexecdir=/usr/lib
cat >>config.h <<"EOF"
#define HAVE_LANGINFO_CODESET 1
#define HAVE_LC_MESSAGES 1
EOF
make
make install
cd /sources/
rm -rf gawk-3.1.5
#Gettext-0.14.5
tar xvf gettext-0.14.5.tar.gz
cd gettext-0.14.5
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf gettext-0.14.5
#Grep-2.5.1a
tar xvf grep-2.5.1a.tar.bz2
cd grep-2.5.1a
patch -Np1 -i ../grep-2.5.1a-redhat_fixes-2.patch
chmod +x tests/fmbtest.sh
./configure –prefix=/usr –bindir=/bin
make
make install
cd /sources/
rm -rf grep-2.5.1a
#Groff-1.18.1.1
tar xvf groff-1.18.1.1.tar.gz
cd groff-1.18.1.1
patch -Np1 -i ../groff-1.18.1.1-debian_fixes-1.patch
sed -i -e ‘s/2010/002D/’ -e ‘s/2212/002D/’ \
-e ‘s/2018/0060/’ -e ‘s/2019/0027/’ font/devutf8/R.proto
PAGE=A4 ./configure –prefix=/usr –enable-multibyte
make
make install
ln -sv eqn /usr/bin/geqn
ln -sv tbl /usr/bin/gtbl
cd /sources/
rm -rf groff-1.18.1.1
#Gzip-1.3.5
tar xvf gzip-1.3.5.tar.gz
cd gzip-1.3.5
patch -Np1 -i ../gzip-1.3.5-security_fixes-1.patch
./configure –prefix=/usr
sed -i ‘s@"BINDIR"@/bin@g’ gzexe.in
make
make install
mv -v /usr/bin/gzip /bin
rm -v /usr/bin/{gunzip,zcat}
ln -sv gzip /bin/gunzip
ln -sv gzip /bin/zcat
ln -sv gzip /bin/compress
ln -sv gunzip /bin/uncompress
cd /sources/
rm -rf gzip-1.3.5
#Inetutils-1.4.2
tar xvf inetutils-1.4.2.tar.gz
cd inetutils-1.4.2
patch -Np1 -i ../inetutils-1.4.2-gcc4_fixes-3.patch
patch -Np1 -i ../inetutils-1.4.2-no_server_man_pages-1.patch
./configure –prefix=/usr –libexecdir=/usr/sbin \
–sysconfdir=/etc –localstatedir=/var \
–disable-logger –disable-syslogd \
–disable-whois –disable-servers
make
make install
mv -v /usr/bin/ping /bin
cd /sources/
rm -rf inetutils-1.4.2
#IPRoute2-2.6.16-060323
tar xvf iproute2-2.6.16-060323.tar.gz
cd iproute2-2.6.16-060323
make SBINDIR=/sbin
make SBINDIR=/sbin install
mv -v /sbin/arpd /usr/sbin
cd /sources/
rm -rf iproute2-2.6.16-060323
#Kbd-1.12
tar xvf kbd-1.12.tar.bz2
cd kbd-1.12
patch -Np1 -i ../kbd-1.12-backspace-1.patch
patch -Np1 -i ../kbd-1.12-gcc4_fixes-1.patch
./configure –datadir=/lib/kbd
make
make install
mv -v /usr/bin/{kbd_mode,openvt,setfont} /bin
cd /sources/
rm -rf kbd-1.12
#Less-394
tar xvf less-394.tar.gz
cd less-394
./configure –prefix=/usr –sysconfdir=/etc
make
make install
cd /sources/
rm -rf less-394
#make-3.80
tar xvf make-3.80.tar.bz2
cd make-3.80
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf make-3.80
#Man-DB-2.4.3
tar xvf man-db-2.4.3.tar.gz
cd man-db-2.4.3
mv man/de{_DE.88591,} &&
mv man/es{_ES.88591,} &&
mv man/it{_IT.88591,} &&
mv man/ja{_JP.eucJP,} &&
sed -i ‘s,\*_\*,??,’ man/Makefile.in
sed -i ‘/\t\/usr\/man/d’ src/man_db.conf.in
cat >>include/manconfig.h.in <<"EOF"
#define WEB_BROWSER "exec /usr/bin/lynx"
#define COL "/usr/bin/col"
#define VGRIND "/usr/bin/vgrind"
#define GRAP "/usr/bin/grap"
EOF
./configure –prefix=/usr –enable-mb-groff –disable-setuid
make
make install
cat >>convert-mans <<"EOF"
#!/bin/sh -e
FROM="$1"
TO="$2"
shift ; shift
while [ $# -gt 0 ]
do
FILE="$1"
shift
iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv
mv .tmp.iconv "$FILE"
done
EOF
install -m755 convert-mans /usr/bin
cat >>convert-mans <<"EOF"
#!/bin/sh -e
FROM="$1"
TO="$2"
shift ; shift
while [ $# -gt 0 ]
do
FILE="$1"
shift
iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv
mv .tmp.iconv "$FILE"
done
EOF
install -m755 convert-mans /usr/bin
cd /sources/
rm -rf man-db-2.4.3
#Mktemp-1.5
tar xvf mktemp-1.5.tar.gz
cd mktemp-1.5
patch -Np1 -i ../mktemp-1.5-add_tempfile-3.patch
./configure –prefix=/usr –with-libc
make
make install
make install-tempfile
cd /sources/
rm -rf mktemp-1.5
#Module-Init-Tools-3.2.2
tar xvf module-init-tools-3.2.2.tar.bz2
cd module-init-tools-3.2.2
patch -Np1 -i ../module-init-tools-3.2.2-modprobe-1.patch
./configure &&
make check &&
make distclean
./configure –prefix=/ –enable-zlib
make
make INSTALL=install install
cd /sources/
rm -rf module-init-tools-3.2.2
#Patch-2.5.4
tar xvf patch-2.5.4.tar.gz
cd patch-2.5.4
./configure –prefix=/usr
make
make install
cd /sources/
rm -rf patch-2.5.4
#Psmisc-22.2
tar xvf psmisc-22.2.tar.gz
cd psmisc-22.2
./configure –prefix=/usr –exec-prefix=""
make
make install
mv -v /bin/pstree* /usr/bin
ln -sv killall /bin/pidof
cd /sources/
rm -rf psmisc-22.2
#Shadow-4.0.15
tar xvf shadow-4.0.15.tar.bz2
cd shadow-4.0.15
./configure –libdir=/lib –enable-shared –without-selinux
sed -i ‘s/groups$(EXEEXT) //’ src/Makefile
find man -name Makefile -exec sed -i ‘/groups/d’ {} \;
sed -i -e ‘s/ ko//’ -e ‘s/ zh_CN zh_TW//’ man/Makefile
for i in de es fi fr id it pt_BR; do
convert-mans UTF-8 ISO-8859-1 man/${i}/*.?
done
for i in cs hu pl; do
convert-mans UTF-8 ISO-8859-2 man/${i}/*.?
done
convert-mans UTF-8 EUC-JP man/ja/*.?
convert-mans UTF-8 KOI8-R man/ru/*.?
convert-mans UTF-8 ISO-8859-9 man/tr/*.?
make
make install
cp -v etc/{limits,login.access} /etc
sed -e’s@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@’ \
-e ‘s@/var/spool/mail@/var/mail@’ \
etc/login.defs > /etc/login.defs
mv -v /usr/bin/passwd /bin
mv -v /lib/libshadow.*a /usr/lib
rm -v /lib/libshadow.so
ln -sfv ../../lib/libshadow.so.0 /usr/lib/libshadow.so
mkdir -v /etc/default
cd /sources/
rm -rf shadow-4.0.15
#Sysklogd-1.4.1
tar xvf sysklogd-1.4.1.tar.gz
cd sysklogd-1.4.1
patch -Np1 -i ../sysklogd-1.4.1-fixes-1.patch
patch -Np1 -i ../sysklogd-1.4.1-8bit-1.patch
make
make install
cat > /etc/syslog.conf << "EOF"
# Begin /etc/syslog.conf
auth,authpriv.* -/var/log/auth.log
*.*;auth,authpriv.none -/var/log/sys.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
*.emerg *
# End /etc/syslog.conf
EOF
cd /sources/
rm -rf sysklogd-1.4.1
#sysvinit-2.86
tar xvf sysvinit-2.86.tar.gz
cd sysvinit-2.86
sed -i ‘s@Sending processes@& started by init@g’ \
src/init.c
make -C src
make -C src install
cat > /etc/inittab << "EOF"
# Begin /etc/inittab
id:3:initdefault:
si::sysinit:/etc/rc.d/init.d/rc sysinit
l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
su:S016:once:/sbin/sulogin
1:2345:respawn:/sbin/agetty tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
5:2345:respawn:/sbin/agetty tty5 9600
6:2345:respawn:/sbin/agetty tty6 9600
# End /etc/inittab
EOF
cd /sources/
rm -rf sysvinit-2.86
#Tar-1.15.1
tar xvf tar-1.15.1.tar.bz2
cd tar-1.15.1
patch -Np1 -i ../tar-1.15.1-gcc4_fix_tests-1.patch
patch -Np1 -i ../tar-1.15.1-sparse_fix-1.patch
patch -Np1 -i ../tar-1.15.1-security_fixes-1.patch
./configure –prefix=/usr –bindir=/bin –libexecdir=/usr/sbin
make
make install
cd /sources/
rm -rf tar-1.15.1
#Texinfo-4.8
tar xvf texinfo-4.8.tar.bz2
cd texinfo-4.8
patch -Np1 -i ../texinfo-4.8-multibyte-1.patch
patch -Np1 -i ../texinfo-4.8-tempfile_fix-2.patch
./configure –prefix=/usr
make
make install
make TEXMF=/usr/share/texmf install-tex
cd /usr/share/info
rm dir
for f in *
do install-info $f dir 2>/dev/null
done
cd /sources/
rm -rf texinfo-4.8
#Udev-096
tar xvf udev-096.tar.bz2
cd udev-096
tar xf ../udev-config-6.2.tar.bz2
install -dv /lib/{firmware,udev/devices/{pts,shm}}
mknod -m0666 /lib/udev/devices/null c 1 3
ln -sv /proc/self/fd /lib/udev/devices/fd
ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
ln -sv /proc/kcore /lib/udev/devices/core
make EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
extras/firmware extras/floppy extras/path_id \
extras/scsi_id extras/usb_id extras/volume_id"
make test
make DESTDIR=/ \
EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
extras/firmware extras/floppy extras/path_id \
extras/scsi_id extras/usb_id extras/volume_id" install
cp -v udev-config-6.2/[0-9]* /etc/udev/rules.d/
install -m644 -D -v docs/writing_udev_rules/index.html \
/usr/share/doc/udev-096/index.html
cd /sources/
rm -rf udev-096
#Util-linux-2.12r
tar xvf util-linux-2.12r.tar.bz2
cd util-linux-2.12r
sed -i ‘s@etc/adjtime@var/lib/hwclock/adjtime@g’ \
hwclock/hwclock.c
mkdir -p /var/lib/hwclock
patch -Np1 -i ../util-linux-2.12r-cramfs-1.patch
./configure
make HAVE_KILL=yes HAVE_SLN=yes
make HAVE_KILL=yes HAVE_SLN=yes install
cd /sources/
rm -rf util-linux-2.12r
#Vim-7.0
tar xvf vim-7.0.tar.bz2
cd vim70
patch -Np1 -i ../vim-7.0-fixes-7.patch
patch -Np1 -i ../vim-7.0-mandir-1.patch
patch -Np1 -i ../vim-7.0-spellfile-1.patch
echo ‘#define SYS_VIMRC_FILE "/etc/vimrc"’ >> src/feature.h
./configure –prefix=/usr –enable-multibyte
make
make install
rm -f /usr/share/vim/vim70/tutor/tutor.{gr,pl,ru,sk}
rm -f /usr/share/vim/vim70/tutor/tutor.??.*
ln -sv vim /usr/bin/vi
for L in "" fr it pl ru; do
ln -sv vim.1 /usr/share/man/$L/man1/vi.1
done
ln -sv ../vim/vim70/doc /usr/share/doc/vim-7.0
cat > /etc/vimrc << "EOF"
" Begin /etc/vimrc
set nocompatible
set backspace=2
syntax on
if (&term == "iterm") || (&term == "putty")
set background=dark
endif
" End /etc/vimrc
EOF
cd /sources/
rm -rf vim70
#End
echo " Chroot into the new environments with the following,
chroot \"\$LFS\" /usr/bin/env -i \
HOME=/root TERM=\"$TERM\" PS1=’\u:\w\$ ‘ \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash –login
"
echo "
and continue with 7chapt.sh
"
#############################################################
6chroot.sh
#!/bin/bash
export LFS=/mnt/lfs
chown -R root:root $LFS/tools
mkdir -pv $LFS/{dev,proc,sys}
mknod -m 600 $LFS/dev/console c 5 1
mknod -m 666 $LFS/dev/null c 1 3
mount –bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
echo
echo "Now we will chroot. Please continue with 6chapt.sh"
echo
chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1=’\u:\w\$ ‘ \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash –login +h
#############################################################
7chapt.sh
#!/bin/bash
cd /sources/
#LFS-Bootscripts-6.2
tar xvf lfs-bootscripts-6.2.tar.bz2
cd lfs-bootscripts-6.2
make install
cd /sources/
rm -rf lfs-bootscripts-6.2
cat > /etc/sysconfig/clock << "EOF"
# Begin /etc/sysconfig/clock
UTC=1
# End /etc/sysconfig/clock
EOF
cat > /etc/sysconfig/console << "EOF"
# Begin /etc/sysconfig/console
KEYMAP="defkeymap"
FONT="default8x16"
# End /etc/sysconfig/console
EOF
cat > /etc/inputrc << "EOF"
# Begin /etc/inputrc
# Modified by Chris Lynn <roryo@roryo.dynup.net>
# Allow the command prompt to wrap to the next line
set horizontal-scroll-mode Off
# Enable 8bit input
set meta-flag On
set input-meta On
# Turns off 8th bit stripping
set convert-meta Off
# Keep the 8th bit for display
set output-meta On
# none, visible or audible
set bell-style none
# All of the following map the escape sequence of the
# value contained inside the 1st argument to the
# readline specific functions
"\eOd": backward-word
"\eOc": forward-word
# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line
# for Konsole
"\e[H": beginning-of-line
"\e[F": end-of-line
# End /etc/inputrc
EOF
cat > /etc/profile << "EOF"
# Begin /etc/profile
LANG="C" ; export LANG
export INPUTRC=/etc/inputrc
# End /etc/profile
EOF
echo "HOSTNAME=<lfs>" > /etc/sysconfig/network
cat > /etc/fstab << "EOF"
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/hda2 / ext3 defaults 1 1
/dev/hda3 swap swap pri=1 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
shm /dev/shm tmpfs defaults 0 0
# End /etc/fstab
EOF
echo "
Continue with 8.3. Linux-2.6.16.27
"
#############################################################