diff --git a/chapter01/conventions.xml b/chapter01/conventions.xml
index e4a1e2404..1533fc350 100644
--- a/chapter01/conventions.xml
+++ b/chapter01/conventions.xml
@@ -47,13 +47,15 @@ This form of text is used for hyperlinks, both within the book and to external
pages such as HowTo's,download locations and websites etc.
-
This type of section is used mainly when creating configuration files. The diff --git a/chapter06/autoconf-inst.xml b/chapter06/autoconf-inst.xml index ac52be9ff..557f6753d 100644 --- a/chapter06/autoconf-inst.xml +++ b/chapter06/autoconf-inst.xml @@ -5,11 +5,13 @@ Install Autoconf by running the following commands: -+- ./configure --prefix=/usr && -make && -make install -+ diff --git a/chapter06/automake-inst.xml b/chapter06/automake-inst.xml index 9d3238e77..09a378452 100644 --- a/chapter06/automake-inst.xml +++ b/chapter06/automake-inst.xml @@ -5,10 +5,12 @@ Install Automake by running the following commands: -+ +./configure --prefix=/usr && +make && +make install ++- ./configure --prefix=/usr && -make install -+ diff --git a/chapter06/bash-inst.xml b/chapter06/bash-inst.xml index ea0e51b00..677a75ece 100644 --- a/chapter06/bash-inst.xml +++ b/chapter06/bash-inst.xml @@ -5,24 +5,26 @@ Install Bash by running the following commands: -+ +./configure --prefix=/usr && +make install ++- ./configure --prefix=/usr --with-curses - && -make && -make install && -logout -mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug - $LFS/bin -+ + +./configure --prefix=/usr --with-curses && +make && +make install && +logout +mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin +The static bash is replaced with the dynamic bash and the chroot'ed environment is re-entered by running: -+- &c6-chrootcmd; - + diff --git a/chapter06/bashprofile.xml b/chapter06/bashprofile.xml index 3e126f32e..b6543425c 100644 --- a/chapter06/bashprofile.xml +++ b/chapter06/bashprofile.xml @@ -14,7 +14,8 @@ Create a new file+&c6-chrootcmd; + +$LFS/root/.bash_profile by running the following. -+ + ++ cat > $LFS/root/.bash_profile << "EOF" # Begin /root/.bash_profile @@ -25,7 +26,8 @@ export PS1 PATH # End /root/.bash_profileEOF -The PS1 variable is an environment variable that controls the appearance of diff --git a/chapter06/bin86-inst.xml b/chapter06/bin86-inst.xml index e4d83eaef..cb818beda 100644 --- a/chapter06/bin86-inst.xml +++ b/chapter06/bin86-inst.xml @@ -5,10 +5,12 @@ Install Bin86 by running the following commands: -+- make && -make PREFIX=/usr install -+ diff --git a/chapter06/binutils-inst.xml b/chapter06/binutils-inst.xml index 8710e62d6..f8ea0860a 100644 --- a/chapter06/binutils-inst.xml +++ b/chapter06/binutils-inst.xml @@ -4,12 +4,14 @@ Install Binutils by running the following commands: -+ +make && +make PREFIX=/usr install ++- ./configure --prefix=/usr --enable-shared && -make -e tooldir=/usr && -make -e tooldir=/usr install && -make -e tooldir=/usr install-info -+ diff --git a/chapter06/bison-inst.xml b/chapter06/bison-inst.xml index f5ae99dbe..8d83c0bad 100644 --- a/chapter06/bison-inst.xml +++ b/chapter06/bison-inst.xml @@ -5,13 +5,14 @@ Install Bison by running the following commands: -+ +./configure --prefix=/usr --enable-shared && +make -e tooldir=/usr && +make -e tooldir=/usr install && +make -e tooldir=/usr install-info ++- ./configure --prefix=/usr \ ---datadir=/usr/share/bison - && -make && -make install -+ + +./configure --prefix=/usr \ +--datadir=/usr/share/bison && +make && +make install +Some programs don't know about bison and try to find the yacc program @@ -25,7 +26,8 @@ Create a new file -/usr/bin/yacc by running the following:+ + + diff --git a/chapter06/bzip2-inst.xml b/chapter06/bzip2-inst.xml index 40b27e803..8a9cc2880 100644 --- a/chapter06/bzip2-inst.xml +++ b/chapter06/bzip2-inst.xml @@ -5,23 +5,25 @@ Install Bzip2 by running the following commands: -+ cat > /usr/bin/yacc << "EOF" #!/bin/sh # Begin /usr/bin/yacc @@ -35,7 +37,8 @@ following: # End /usr/bin/yaccEOF chmod 755 /usr/bin/yacc -+- make -f Makefile-libbz2_so && -make bzip2recover libbz2.a && -cp bzip2-shared /bin/bzip2 && -cp bzip2recover /bin && -cp bzip2.1 /usr/share/man/man1 && -cp bzlib.h /usr/include && -cp -a libbz2.so* libbz2.a /lib && -rm /usr/lib/libbz2.a && -cd /bin && -ln -sf bzip2 bunzip2 && -ln -sf bzip2 bzcat && -cd /usr/share/man/man1 && -ln -s bzip2.1 bunzip2.1 && -ln -s bzip2.1 bzcat.1 && -ln -s bzip2.1 bzip2recover.1 -+ + +make -f Makefile-libbz2_so && +make bzip2recover libbz2.a && +cp bzip2-shared /bin/bzip2 && +cp bzip2recover /bin && +cp bzip2.1 /usr/share/man/man1 && +cp bzlib.h /usr/include && +cp -a libbz2.so* libbz2.a /lib && +rm /usr/lib/libbz2.a && +cd /bin && +ln -sf bzip2 bunzip2 && +ln -sf bzip2 bzcat && +cd /usr/share/man/man1 && +ln -s bzip2.1 bunzip2.1 && +ln -s bzip2.1 bzcat.1 && +ln -s bzip2.1 bzip2recover.1 +Although it's not strictly a part of a basic LFS system it's worth diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml index ca70820f8..c025085dd 100644 --- a/chapter06/chroot.xml +++ b/chapter06/chroot.xml @@ -13,9 +13,11 @@ everything a user does will be restricted to the LFS partition (since / is actually /mnt/lfs but the shell doesn't know that). -+- &c6-chrootcmd; - + +&c6-chrootcmd; + +The -i option will clear all environment variables for as long as you diff --git a/chapter06/chrootcmd.xml b/chapter06/chrootcmd.xml index 5b3229571..79e3a60e2 100644 --- a/chapter06/chrootcmd.xml +++ b/chapter06/chrootcmd.xml @@ -1,4 +1,3 @@ - -cd $LFS && -chroot $LFS /usr/bin/env -i HOME=/root - \ -TERM=$TERM /bin/bash --login +cd $LFS && +chroot $LFS /usr/bin/env -i HOME=/root \ +TERM=$TERM /bin/bash --login diff --git a/chapter06/config-glibc.xml b/chapter06/config-glibc.xml index cfb1ae441..f5b9787da 100644 --- a/chapter06/config-glibc.xml +++ b/chapter06/config-glibc.xml @@ -12,7 +12,8 @@ Create a new file/etc/nsswitch.conf by running the following:+ + ++ cat > /etc/nsswitch.conf << "EOF" # Begin /etc/nsswitch.conf @@ -34,7 +35,8 @@ netgroup: db files # End /etc/nsswitch.confEOF -The -tzselect script has to be run and the questions @@ -48,11 +50,12 @@ Create the/etc/localtime symlink by running:+- cd /etc && -ln -sf ../usr/share/zoneinfo/<tzselect's output> - localtime -+ + +cd /etc && +ln -sf ../usr/share/zoneinfo/<tzselect's output> localtime +tzselect's output can be something like -EST5EDT or @@ -63,18 +66,21 @@ tzselect's output can be something likeEST5EDT or The symlink you'd create with that information would be:+- ln -sf ../usr/share/zoneinfo/EST5EDT localtime -+ + +ln -sf ../usr/share/zoneinfo/EST5EDT localtime +Or: -+- ln -sf ../usr/share/zoneinfo/Canada/Eastern localtime - -+ diff --git a/chapter06/config-ldso.xml b/chapter06/config-ldso.xml index c6189d044..04fb4960e 100644 --- a/chapter06/config-ldso.xml +++ b/chapter06/config-ldso.xml @@ -17,7 +17,8 @@ Create a new file+ +ln -sf ../usr/share/zoneinfo/Canada/Eastern localtime +/etc/ld.so.conf by running the following: -+ + ++ cat > /etc/ld.so.conf << "EOF" # Begin /etc/ld.so.conf @@ -27,7 +28,8 @@ following: # End /etc/ld.so.confEOF -Although it's not necessary to add the diff --git a/chapter06/config-shadowpwd.xml b/chapter06/config-shadowpwd.xml index a10d05784..8202c12bb 100644 --- a/chapter06/config-shadowpwd.xml +++ b/chapter06/config-shadowpwd.xml @@ -15,9 +15,11 @@ be able to work with shadow'ed passwords. To enable shadow'ed passwords, run the following command: -+- /usr/sbin/pwconv -+ diff --git a/chapter06/config-sysklogd.xml b/chapter06/config-sysklogd.xml index 900010b28..3b52725e3 100644 --- a/chapter06/config-sysklogd.xml +++ b/chapter06/config-sysklogd.xml @@ -5,7 +5,8 @@ Create a new file+ +/usr/sbin/pwconv +/etc/syslog.conf by running the following: -+ + + diff --git a/chapter06/config-sysvinit.xml b/chapter06/config-sysvinit.xml index fafb372f7..bbb2ae51a 100644 --- a/chapter06/config-sysvinit.xml +++ b/chapter06/config-sysvinit.xml @@ -5,7 +5,8 @@ Create a new file+ cat > /etc/syslog.conf << "EOF" # Begin /etc/syslog.conf @@ -19,7 +20,8 @@ user.* -/var/log/user.log # End /etc/syslog.confEOF -/etc/inittab by running the following: -+ + + diff --git a/chapter06/config-vim.xml b/chapter06/config-vim.xml index 7e230f1b8..172d67ffc 100644 --- a/chapter06/config-vim.xml +++ b/chapter06/config-vim.xml @@ -7,7 +7,8 @@ have included Vim in this book but the original Vi). Create the+ cat > /etc/inittab << "EOF" # Begin /etc/inittab @@ -34,7 +35,8 @@ su:S016:respawn:/sbin/sulogin # End /etc/inittabEOF -/root/.vimrc by running the following: -+ + + diff --git a/chapter06/create-password.xml b/chapter06/create-password.xml index 71492ffdf..7bbde76f9 100644 --- a/chapter06/create-password.xml +++ b/chapter06/create-password.xml @@ -6,9 +6,11 @@ Choose a password for user root and create it by running the following command: -+ cat > /root/.vimrc << "EOF" " Begin /root/.vimrc @@ -16,7 +17,8 @@ set bs=2 " End /root/.vimrcEOF -+ + diff --git a/chapter06/create-utmp.xml b/chapter06/create-utmp.xml index 512172a4d..93a94fb75 100644 --- a/chapter06/create-utmp.xml +++ b/chapter06/create-utmp.xml @@ -15,14 +15,14 @@ Create these files with their proper permissions by running the following commands: -+ + passwd root -+- touch /var/run/utmp /var/log/wtmp \ -/var/log/btmp - /var/log/lastlog && -chmod 644 /var/run/utmp /var/log/wtmp \ -/var/log/btmp /var/log/lastlog - -+ diff --git a/chapter06/diffutils-inst.xml b/chapter06/diffutils-inst.xml index 7a6bd1607..7b3bf5ecd 100644 --- a/chapter06/diffutils-inst.xml +++ b/chapter06/diffutils-inst.xml @@ -5,11 +5,13 @@ Install Diffutils by running the following commands: -+ +touch /var/run/utmp /var/log/wtmp \ +/var/log/btmp /var/log/lastlog && +chmod 644 /var/run/utmp /var/log/wtmp \ +/var/log/btmp /var/log/lastlog ++- ./configure --prefix=/usr && -make && -make install -+ diff --git a/chapter06/e2fsprogs-inst.xml b/chapter06/e2fsprogs-inst.xml index a7ba507d7..39c263be4 100644 --- a/chapter06/e2fsprogs-inst.xml +++ b/chapter06/e2fsprogs-inst.xml @@ -10,14 +10,16 @@ Please note that the empty --with-root-prefix= option below is supposed to be like this. We did not forget to supply a value there. -+ +./configure --prefix=/usr && +make && +make install ++- ./configure --prefix=/usr --with-root-prefix= \ ---enable-elf-shlibs && -make && -make install && -make install-libs && -mv /usr/sbin/mklost+found /sbin -+ diff --git a/chapter06/ed-inst.xml b/chapter06/ed-inst.xml index 1cafca834..8c582413f 100644 --- a/chapter06/ed-inst.xml +++ b/chapter06/ed-inst.xml @@ -5,12 +5,14 @@ Install Ed by running the following commands: -+ +./configure --prefix=/usr --with-root-prefix= \ +--enable-elf-shlibs && +make && +make install && +make install-libs && +mv /usr/sbin/mklost+found /sbin ++- ./configure --prefix=/usr && -make && -make install && -mv /usr/bin/ed /usr/bin/red /bin -+ diff --git a/chapter06/file-inst.xml b/chapter06/file-inst.xml index d3d9566cc..0a084a542 100644 --- a/chapter06/file-inst.xml +++ b/chapter06/file-inst.xml @@ -5,12 +5,13 @@ Install File by running the following commands: -+ +./configure --prefix=/usr && +make && +make install && +mv /usr/bin/ed /usr/bin/red /bin ++- ./configure --prefix=/usr - --datadir=/usr/share/misc && -make && -make install -+ + +./configure --prefix=/usr --datadir=/usr/share/misc && +make && +make install +File uses magic numbers to determine a file type. These magic numbers come with @@ -26,9 +27,11 @@ compile this file, because it's faster, fixes that annoying warning and is how it was meant to be: -+- file -C -+ diff --git a/chapter06/fileutils-inst.xml b/chapter06/fileutils-inst.xml index 4766fc44c..aa882500c 100644 --- a/chapter06/fileutils-inst.xml +++ b/chapter06/fileutils-inst.xml @@ -5,13 +5,14 @@ Install Fileutils by running the following commands: -+ +file -C ++- ./configure --prefix=/usr --bindir=/bin \ ---libexecdir=/bin - && -make && -make install -+ diff --git a/chapter06/findutils-inst.xml b/chapter06/findutils-inst.xml index cfb308bfb..167930c3a 100644 --- a/chapter06/findutils-inst.xml +++ b/chapter06/findutils-inst.xml @@ -9,12 +9,14 @@ Before Findutils is installed the findutils patch file has to be unpacked. Install Findutils by running the following commands: -+ +./configure --prefix=/usr --bindir=/bin \ +--libexecdir=/bin && +make && +make install ++- patch -Np1 -i ../findutils-4.1.patch && -./configure --prefix=/usr && -make && -make libexecdir=/usr/bin install -+ diff --git a/chapter06/flex-inst.xml b/chapter06/flex-inst.xml index a14173da8..efe1801bc 100644 --- a/chapter06/flex-inst.xml +++ b/chapter06/flex-inst.xml @@ -5,13 +5,15 @@ Install Flex by running the following commands: -+ +patch -Np1 -i ../findutils-4.1.patch && +./configure --prefix=/usr && +make && +make libexecdir=/usr/bin install ++- ./configure --prefix=/usr && -make && -make install && -cd /usr/bin && -ln -s flex lex -+ diff --git a/chapter06/gcc-inst.xml b/chapter06/gcc-inst.xml index 284397554..15e03c85f 100644 --- a/chapter06/gcc-inst.xml +++ b/chapter06/gcc-inst.xml @@ -15,17 +15,17 @@ Note: the build of other compilers is not tested by the people who actively work on LFS. -+ +./configure --prefix=/usr && +make && +make install && +cd /usr/bin && +ln -s flex lex ++- mkdir /usr/src/gcc-build && -cd /usr/src/gcc-build && -../gcc-&gcc-version;/configure --prefix=/usr \ ---with-slibdir=/lib - --enable-shared \ ---enable-languages=c,c++ - && -make bootstrap && -make install -+ diff --git a/chapter06/gettext-inst.xml b/chapter06/gettext-inst.xml index 228d2dc93..25f3f58fa 100644 --- a/chapter06/gettext-inst.xml +++ b/chapter06/gettext-inst.xml @@ -5,11 +5,13 @@ Install Gettext by running the following commands: -+ +mkdir /usr/src/gcc-build && +cd /usr/src/gcc-build && +../gcc-&gcc-version;/configure --prefix=/usr \ +--with-slibdir=/lib --enable-shared \ +--enable-languages=c,c++ && +make bootstrap && +make install ++- ./configure --prefix=/usr && -make && -make install -+ diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index a8c94ce2a..62335ac32 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -10,34 +10,28 @@ Unpack the glibc-linuxthreads in the glibc-&glibc-version; directory, not in Install Glibc by running the following commands: -+ +./configure --prefix=/usr && +make && +make install ++- mknod -m 0666 /dev/null c 1 3 && -touch /etc/ld.so.conf && -mkdir /usr/src/glibc-build && -cd /usr/src/glibc-build && -sed s/"\$(PERL)"/"\/usr\/bin\/perl"/ \ -../glibc-&glibc-version;/malloc/Makefile - > tmp~ && -mv tmp~ ../glibc-&glibc-version;/malloc/Makefile && - -sed "s/root/0/" ../glibc-&glibc-version;/login/Makefile - > tmp~ && -mv tmp~ ../glibc-&glibc-version;/login/Makefile && - -../glibc-&glibc-version;/configure \ ---prefix=/usr --enable-add-ons - \ ---libexecdir=/usr/bin && - -sed s/"cross-compiling = yes"/"cross-compiling = no"/ - \ -config.make > config.make~ - && -mv config.make~ config.make && -make && -make install && -make localedata/install-locales -+ + +mknod -m 0666 /dev/null c 1 3 && +touch /etc/ld.so.conf && +mkdir /usr/src/glibc-build && +cd /usr/src/glibc-build && +sed s/"\$(PERL)"/"\/usr\/bin\/perl"/ \ +../glibc-&glibc-version;/malloc/Makefile > tmp~ && +mv tmp~ ../glibc-&glibc-version;/malloc/Makefile && +sed "s/root/0/" ../glibc-&glibc-version;/login/Makefile > tmp~ && +mv tmp~ ../glibc-&glibc-version;/login/Makefile && +../glibc-&glibc-version;/configure \ +--prefix=/usr --enable-add-ons \ +--libexecdir=/usr/bin && +sed s/"cross-compiling = yes"/"cross-compiling = no"/ \ +config.make > config.make~ && +mv config.make~ config.make && +make && +make install && +make localedata/install-locales +During the configure stage you will see the following warning: @@ -69,10 +63,12 @@ to ensure a properly working bash. Run the following commands to accomplish this: -+- logout - &c6-chrootcmd; -+ diff --git a/chapter06/grep-inst.xml b/chapter06/grep-inst.xml index 8b48c2c42..477df7476 100644 --- a/chapter06/grep-inst.xml +++ b/chapter06/grep-inst.xml @@ -5,11 +5,13 @@ Install Grep by running the following commands: -+ +logout +&c6-chrootcmd; ++- ./configure --prefix=/usr && -make && -make install -+ diff --git a/chapter06/groff-inst.xml b/chapter06/groff-inst.xml index 03857f25e..5a00d4fd8 100644 --- a/chapter06/groff-inst.xml +++ b/chapter06/groff-inst.xml @@ -5,12 +5,13 @@ Install Groff by running the following commands: -+ +./configure --prefix=/usr && +make && +make install ++- ./configure --prefix=/usr && - -make && -make install -+ diff --git a/chapter06/gzip-inst.xml b/chapter06/gzip-inst.xml index 6af228e10..08b03a3a7 100644 --- a/chapter06/gzip-inst.xml +++ b/chapter06/gzip-inst.xml @@ -5,19 +5,21 @@ Install Gzip by running the following commands: -+ +./configure --prefix=/usr && +make && +make install ++- ./configure --prefix=/usr && -make && -make install && -cd /usr/bin && -mv gzip /bin && -rm gunzip zcat && -cd /bin && -ln -sf gzip gunzip && -ln -s gzip zcat && -ln -s gzip compress && -ln -s gunzip uncompress -+ diff --git a/chapter06/kbd-inst.xml b/chapter06/kbd-inst.xml index adc5e3443..b6b8e1aec 100644 --- a/chapter06/kbd-inst.xml +++ b/chapter06/kbd-inst.xml @@ -5,13 +5,14 @@ Install Kbd by running the following commands: -+ +./configure --prefix=/usr && +make && +make install && +cd /usr/bin && +mv gzip /bin && +rm gunzip zcat && +cd /bin && +ln -sf gzip gunzip && +ln -s gzip zcat && +ln -s gzip compress && +ln -s gunzip uncompress ++- ./configure --datadir=/usr/share/kbd && -make && -make install && -rm - /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz -+ + +./configure --datadir=/usr/share/kbd && +make && +make install && +rm /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz +Now we have to choose a default keymap. Explore the @@ -19,10 +20,12 @@ Now we have to choose a default keymap. Explore the as a default. Then execute this command: -+- cd /usr/share/kbd/keymaps && -ln -s <path-to-keymap> defkeymap.map.gz -+ + +cd /usr/share/kbd/keymaps && +ln -s <path-to-keymap> defkeymap.map.gz +Replace -<path-to-keymap> with the path to the diff --git a/chapter06/less-inst.xml b/chapter06/less-inst.xml index f4804c6aa..1750d22ec 100644 --- a/chapter06/less-inst.xml +++ b/chapter06/less-inst.xml @@ -5,11 +5,13 @@ Install Less by running the following commands:+- ./configure --prefix=/usr --bindir=/bin && -make && -make install -+ diff --git a/chapter06/libtool-inst.xml b/chapter06/libtool-inst.xml index 6e41a07d3..8e5333702 100644 --- a/chapter06/libtool-inst.xml +++ b/chapter06/libtool-inst.xml @@ -5,11 +5,13 @@ Install Libtool by running the following commands: -+ +./configure --prefix=/usr --bindir=/bin && +make && +make install ++- ./configure --prefix=/usr && -make && -make install -+ diff --git a/chapter06/lilo-inst.xml b/chapter06/lilo-inst.xml index 790a3d62a..e4c8a2b13 100644 --- a/chapter06/lilo-inst.xml +++ b/chapter06/lilo-inst.xml @@ -13,10 +13,12 @@ http://archive.linuxfromscratch.org/lfs-hints/grub-howto.txt, Install Lilo by running the following commands: -+ +./configure --prefix=/usr && +make && +make install ++- make && -make install -+ + +make && +make install +It appears that compilation of this package fails on certain machines diff --git a/chapter06/m4-inst.xml b/chapter06/m4-inst.xml index c372d5df0..3c20e2a6e 100644 --- a/chapter06/m4-inst.xml +++ b/chapter06/m4-inst.xml @@ -5,11 +5,13 @@ Install M4 by running the following commands: -+- ./configure --prefix=/usr && -make && -make install -+ + +./configure --prefix=/usr && +make && +make install +If the base system is running a 2.0 kernel and the Glibc version is @@ -29,13 +31,15 @@ To create a statically linked version of M4, execute the following commands: -+ ++ + logout cd $LFS/usr/src/m4-1.4 ./configure --prefix=/usr make LDFLAGS=-static make prefix=$LFS/usr install -Now the chroot'ed environment can be re-entered and the @@ -44,9 +48,11 @@ this can be done after having rebooted into the LFS system rather than chrooting into it. -+- &c6-chrootcmd; - + diff --git a/chapter06/make-inst.xml b/chapter06/make-inst.xml index e4e50076a..ebf668ae6 100644 --- a/chapter06/make-inst.xml +++ b/chapter06/make-inst.xml @@ -5,11 +5,13 @@ Install Make by running the following commands: -+&c6-chrootcmd; + ++- ./configure --prefix=/usr && -make && -make install -+ diff --git a/chapter06/makedev-inst.xml b/chapter06/makedev-inst.xml index e13002d82..f59a1a23b 100644 --- a/chapter06/makedev-inst.xml +++ b/chapter06/makedev-inst.xml @@ -10,13 +10,14 @@ won't create a directory for you to cd into. Create the device files by running the following commands: -+ +./configure --prefix=/usr && +make && +make install ++- cp MAKEDEV-1.1 /dev/MAKEDEV && - -cd /dev && -chmod 755 MAKEDEV && -./MAKEDEV -v generic -+ + +cp MAKEDEV-1.1 /dev/MAKEDEV && +cd /dev && +chmod 755 MAKEDEV && +./MAKEDEV -v generic +MAKEDEV will create hda[1-20] and hdb[1-20] and such but keep in mind diff --git a/chapter06/man-inst.xml b/chapter06/man-inst.xml index d29d95edf..6126fbea0 100644 --- a/chapter06/man-inst.xml +++ b/chapter06/man-inst.xml @@ -5,13 +5,14 @@ Before Man is installed, the man patch file needs to be unpacked. -+- patch -Np1 -i ../man-&man-version;.patch - && -./configure -default && -make && -make install -+ + +patch -Np1 -i ../man-&man-version;.patch && +./configure -default && +make && +make install +You may want to take a look at the man hint at -- +- patch -Np1 -i ../man-pages-&man-pages-version;.patch - && -make install -+ diff --git a/chapter06/mawk-inst.xml b/chapter06/mawk-inst.xml index a04a4c4d0..631ea0511 100644 --- a/chapter06/mawk-inst.xml +++ b/chapter06/mawk-inst.xml @@ -5,15 +5,16 @@ Install Mawk by running the following commands:+ +patch -Np1 -i ../man-pages-&man-pages-version;.patch && +make install ++- ./configure && -make && -make BINDIR=/usr/bin \ -MANDIR=/usr/share/man/man1 install - && -cd /usr/bin && -ln -s mawk awk -+ diff --git a/chapter06/modutils-inst.xml b/chapter06/modutils-inst.xml index af482dedb..dbe9e8480 100644 --- a/chapter06/modutils-inst.xml +++ b/chapter06/modutils-inst.xml @@ -11,11 +11,13 @@ downgrade to modutils 2.4.5 which seems to be working better. Install Modutils by running the following commands: -+ +./configure && +make && +make BINDIR=/usr/bin \ +MANDIR=/usr/share/man/man1 install && +cd /usr/bin && +ln -s mawk awk ++- ./configure && -make && -make install -+ diff --git a/chapter06/ncurses-inst.xml b/chapter06/ncurses-inst.xml index 95f98615a..b5433a0fe 100644 --- a/chapter06/ncurses-inst.xml +++ b/chapter06/ncurses-inst.xml @@ -5,15 +5,15 @@ Install Ncurses by running the following commands: -+ +./configure && +make && +make install ++- patch -Np1 -F10 -i ../ncurses-&ncurses-version;.patch - && -./configure --prefix=/usr --libdir=/lib \ ---with-shared - --disable-termcap && -make && -make install -+ diff --git a/chapter06/netkitbase-inst.xml b/chapter06/netkitbase-inst.xml index e631d2e56..9860311d1 100644 --- a/chapter06/netkitbase-inst.xml +++ b/chapter06/netkitbase-inst.xml @@ -5,14 +5,15 @@ Install Netkit-base by running the following commands: -+ +patch -Np1 -F10 -i ../ncurses-&ncurses-version;.patch && +./configure --prefix=/usr --libdir=/lib \ +--with-shared --disable-termcap && +make && +make install ++- - ./configure && -make && -make install && -cd etc.sample && -cp services protocols /etc -+ + +./configure && +make && +make install && +cd etc.sample && +cp services protocols /etc +There are other files in the -- +- make && -make install -+ diff --git a/chapter06/patch-inst.xml b/chapter06/patch-inst.xml index e4a570eb2..ff9c2a365 100644 --- a/chapter06/patch-inst.xml +++ b/chapter06/patch-inst.xml @@ -5,11 +5,13 @@ Install Patch by running the following commands:+ +make && +make install ++- ./configure --prefix=/usr && -make && -make install -+ diff --git a/chapter06/perl-inst.xml b/chapter06/perl-inst.xml index fcf1938bd..1e7e28015 100644 --- a/chapter06/perl-inst.xml +++ b/chapter06/perl-inst.xml @@ -5,11 +5,13 @@ Install Perl by running the following commands: -+ +./configure --prefix=/usr && +make && +make install ++- ./Configure -Dprefix=/usr && -make && -make install -+ + +./Configure -Dprefix=/usr && +make && +make install +If you don't want to answer all those questions Perl asks, you can @@ -19,11 +21,13 @@ after the config.sh file has been created you can pass the -e parameter to perl as well. The commands with these parameters included will be: -+- ./Configure -Dprefix=/usr -d -e && -make && -make install -+ diff --git a/chapter06/procinfo-inst.xml b/chapter06/procinfo-inst.xml index e7ace1191..dde3916cb 100644 --- a/chapter06/procinfo-inst.xml +++ b/chapter06/procinfo-inst.xml @@ -5,11 +5,12 @@ Install Procinfo by running the following commands: -+ +./Configure -Dprefix=/usr -d -e && +make && +make install ++- sed "s/-ltermcap/-lncurses/" Makefile | make -f - - && -make install -+ diff --git a/chapter06/procps-inst.xml b/chapter06/procps-inst.xml index 3c93dc08f..65b1fd107 100644 --- a/chapter06/procps-inst.xml +++ b/chapter06/procps-inst.xml @@ -5,12 +5,13 @@ Install Procps by running the following commands: -+ +sed "s/-ltermcap/-lncurses/" Makefile | make -f - && +make install ++- make && -make XSCPT='' install - && -mv /usr/bin/kill /bin -+ diff --git a/chapter06/psmisc-inst.xml b/chapter06/psmisc-inst.xml index 556b82f56..b8194286a 100644 --- a/chapter06/psmisc-inst.xml +++ b/chapter06/psmisc-inst.xml @@ -5,11 +5,13 @@ Install Psmisc by running the following commands: -+ +make && +make XSCPT='' install && +mv /usr/bin/kill /bin ++- ./configure --prefix=/usr && -make && -make install -+ diff --git a/chapter06/removeoldnss.xml b/chapter06/removeoldnss.xml index 0e2d138af..dfba1e670 100644 --- a/chapter06/removeoldnss.xml +++ b/chapter06/removeoldnss.xml @@ -7,9 +7,11 @@ LFS system (because the normal system runs glibc-2.0) it's time to remove them now by running: -+ +./configure --prefix=/usr && +make && +make install ++- rm /lib/libnss*.so.1 /lib/libnss*2.0* -+ diff --git a/chapter06/sed-inst.xml b/chapter06/sed-inst.xml index 010b7f17d..795d72926 100644 --- a/chapter06/sed-inst.xml +++ b/chapter06/sed-inst.xml @@ -5,11 +5,13 @@ Install Sed by running the following commands: -+ +rm /lib/libnss*.so.1 /lib/libnss*2.0* ++- ./configure --prefix=/usr --bindir=/bin && -make && -make install -+ diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml index 15f94eb7c..668d6dca4 100644 --- a/chapter06/shadowpwd-inst.xml +++ b/chapter06/shadowpwd-inst.xml @@ -5,16 +5,17 @@ Install the Shadow Password Suite by running the following commands: -+ +./configure --prefix=/usr --bindir=/bin && +make && +make install ++- patch -Np1 -i ../shadow-20001016.patch && -./configure --prefix=/usr && -make && -make install && -cd etc && -cp limits login.access /etc && -sed "s|/var/spool/mail|/var/mail|" login.defs.linux > - /etc/login.defs -+ diff --git a/chapter06/shellutils-inst.xml b/chapter06/shellutils-inst.xml index 7ecf22d7c..4e24c3af6 100644 --- a/chapter06/shellutils-inst.xml +++ b/chapter06/shellutils-inst.xml @@ -5,14 +5,16 @@ Install Shellutils by running the following commands: -+ +patch -Np1 -i ../shadow-20001016.patch && +./configure --prefix=/usr && +make && +make install && +cd etc && +cp limits login.access /etc && +sed "s|/var/spool/mail|/var/mail|" login.defs.linux > /etc/login.defs ++- ./configure --prefix=/usr && -make && -make install && -cd /usr/bin && -mv date echo false pwd stty /bin && -mv su true uname hostname /bin -+ @@ -28,9 +30,11 @@ the bash interpreter, but the FHS dictates that there should be a+ +./configure --prefix=/usr && +make && +make install && +cd /usr/bin && +mv date echo false pwd stty /bin && +mv su true uname hostname /bin +/usr/bin directory: -+- ln -s test [ -+ diff --git a/chapter06/sysklogd-inst.xml b/chapter06/sysklogd-inst.xml index 4e669586a..42beb3342 100644 --- a/chapter06/sysklogd-inst.xml +++ b/chapter06/sysklogd-inst.xml @@ -5,10 +5,12 @@ Install Sysklogd by running the following commands: -+ +ln -s test [ ++- make && -make install -+ diff --git a/chapter06/sysvinit-inst.xml b/chapter06/sysvinit-inst.xml index 544ea3669..846c28944 100644 --- a/chapter06/sysvinit-inst.xml +++ b/chapter06/sysvinit-inst.xml @@ -17,18 +17,22 @@ processes started by init the TERM signal". Apply the patch by running the following command: -+ +make && +make install ++- patch -Np1 -i ../sysvinit-2.78.patch -+ + +patch -Np1 -i ../sysvinit-2.78.patch +Install Sysvinit by running the following commands: -+- make -C src && -make -C src install -+ diff --git a/chapter06/tar-inst.xml b/chapter06/tar-inst.xml index 6c779cdb4..9473d3189 100644 --- a/chapter06/tar-inst.xml +++ b/chapter06/tar-inst.xml @@ -13,24 +13,27 @@ for gzip files). Apply the patch by running the following command: -+ +make -C src && +make -C src install ++- cd src && -patch -i ../../gnutarpatch.txt && -cd .. -+ + +cd src && +patch -i ../../gnutarpatch.txt && +cd .. +Install Tar by running the following commands from the toplevel directory: -+- ./configure --prefix=/usr --libexecdir=/usr/bin - \ ---bindir=/bin && -make && -make install -+ diff --git a/chapter06/texinfo-inst.xml b/chapter06/texinfo-inst.xml index fee8ec74d..9eadf1ea0 100644 --- a/chapter06/texinfo-inst.xml +++ b/chapter06/texinfo-inst.xml @@ -5,14 +5,15 @@ Install Texinfo by running the following commands: -+ +./configure --prefix=/usr --libexecdir=/usr/bin \ +--bindir=/bin && +make && +make install ++- patch -Np1 -i ../texinfo-&texinfo-version;.patch - && -./configure --prefix=/usr && -make && -make install && -make TEXMF=/usr/share/texmf install-tex -+ diff --git a/chapter06/textutils-inst.xml b/chapter06/textutils-inst.xml index 76e401f10..0cba4145f 100644 --- a/chapter06/textutils-inst.xml +++ b/chapter06/textutils-inst.xml @@ -5,12 +5,14 @@ Install Textutils by running the following commands: -+ +patch -Np1 -i ../texinfo-&texinfo-version;.patch && +./configure --prefix=/usr && +make && +make install && +make TEXMF=/usr/share/texmf install-tex ++- ./configure --prefix=/usr && -make && -make install && -mv /usr/bin/cat /bin -+ diff --git a/chapter06/utillinux-inst.xml b/chapter06/utillinux-inst.xml index da409fc8f..55a9c4fc9 100644 --- a/chapter06/utillinux-inst.xml +++ b/chapter06/utillinux-inst.xml @@ -7,14 +7,15 @@ file, instead of the usual /etc. To make hwclock, which is part of the util-linux package, FHS-compliant, run the following. -+ +./configure --prefix=/usr && +make && +make install && +mv /usr/bin/cat /bin ++- sed "s|etc/adjtime\"\$|var/lib/hwclock/adjtime\"|" - \ -hwclock/hwclock.c > hwclock~ - && -mv hwclock~ hwclock/hwclock.c && -mkdir /var/lib/hwclock -+ ++ +sed "s|etc/adjtime\"\$|var/lib/hwclock/adjtime\"|" \ +hwclock/hwclock.c > hwclock~ && +mv hwclock~ hwclock/hwclock.c && +mkdir /var/lib/hwclock +@@ -24,15 +25,16 @@ util-linux package, FHS-compliant, run the following. Install Util-Linux by running the following commands: - diff --git a/chapter06/vim-inst.xml b/chapter06/vim-inst.xml index 4f50750b5..49424450d 100644 --- a/chapter06/vim-inst.xml +++ b/chapter06/vim-inst.xml @@ -18,13 +18,15 @@ won't overwrite any files from the other package. So it doesn't matter in which order it is done. Install Vim by running the following commands: -+- sed s/HAVE_SLN=no/HAVE_SLN=yes/ \ -MCONFIG > MCONFIG~ - && -mv MCONFIG~ MCONFIG && -./configure && -make && -make install -+ + +sed s/HAVE_SLN=no/HAVE_SLN=yes/ \ +MCONFIG > MCONFIG~ && +mv MCONFIG~ MCONFIG && +./configure && +make && +make install ++- ./configure --prefix=/usr && -make && -make install && -cd /usr/bin && -ln -s vim vi -+ + +./configure --prefix=/usr && +make && +make install && +cd /usr/bin && +ln -s vim vi +If you plan on installing the X Window system on your LFS @@ -46,14 +48,16 @@ conform to the FHS, you should use this command set instead of the one presented above: -+- ./configure --prefix=/usr --localstatedir=/var/lib/vim && -make && -make install && -cd /usr/bin && -ln -s vim vi && -mkdir /var/lib/vim -+ diff --git a/chapter07/checkfs.xml b/chapter07/checkfs.xml index d19959303..83e854752 100644 --- a/chapter07/checkfs.xml +++ b/chapter07/checkfs.xml @@ -6,7 +6,8 @@ A new file+ +./configure --prefix=/usr --localstatedir=/var/lib/vim && +make && +make install && +cd /usr/bin && +ln -s vim vi && +mkdir /var/lib/vim +/etc/init.d/checkfs is created containing the following: -+ + + diff --git a/chapter07/createdirs.xml b/chapter07/createdirs.xml index fbffcb517..90980d264 100644 --- a/chapter07/createdirs.xml +++ b/chapter07/createdirs.xml @@ -6,12 +6,13 @@ We need to start by creating a few extra directories that are used by the boot scripts. These directories are created by running: -+ cat > checkfs << "EOF" #!/bin/sh # Begin /etc/init.d/checkfs @@ -108,7 +109,8 @@ fi # End /etc/init.d/checkfsEOF -+- cd /etc && -mkdir rc{0,1,2,3,4,5,6,S}.d init.d sysconfig - && -cd init.d -+ diff --git a/chapter07/ethnet.xml b/chapter07/ethnet.xml index c3db3e72d..3659c71d7 100644 --- a/chapter07/ethnet.xml +++ b/chapter07/ethnet.xml @@ -11,7 +11,8 @@ A new file+ +cd /etc && +mkdir rc{0,1,2,3,4,5,6,S}.d init.d sysconfig && +cd init.d +/etc/init.d/ethnet is created containing the following: -+ + ++ cat > /etc/init.d/ethnet << "EOF" #!/bin/sh # Begin /etc/init.d/ethnet @@ -114,7 +115,8 @@ esac # End /etc/init.d/ethnetEOF -Adding default gateway to /etc/sysconfig/network @@ -123,12 +125,14 @@ esac If a default gateway is required to be setup, the following command does that: -+ + ++ cat >> /etc/sysconfig/network << "EOF" GATEWAY=192.168.1.2 GATEWAY_IF=eth0EOF -GATEWAY and GATEWAY_IF need to be changed to match the network setup. @@ -153,9 +157,11 @@ identification number (or whatever a user named it). First the nic-config directory is created by running: -+- mkdir /etc/sysconfig/nic-config -+ + +mkdir /etc/sysconfig/nic-config +@@ -163,16 +169,17 @@ Now, new files are created in that directory containing the following. This creates a sample file ifcfg-eth0: -- + +cat > /etc/sysconfig/nic-config/ifcfg-eth0 - << "EOF" ++ + cat > /etc/sysconfig/nic-config/ifcfg-eth0 << "EOF" ONBOOT=yes DEVICE=eth0 IP=192.168.1.1 NETMASK=255.255.255.0 BROADCAST=192.168.1.255EOF -Of course, the values of those four variables have to be changed diff --git a/chapter07/functions.xml b/chapter07/functions.xml index 10b53f501..37435e23a 100644 --- a/chapter07/functions.xml +++ b/chapter07/functions.xml @@ -6,7 +6,8 @@ A new file -/etc/init.d/functions is created containing the following:+ + + diff --git a/chapter07/halt.xml b/chapter07/halt.xml index f3938d17b..f1e93bfd7 100644 --- a/chapter07/halt.xml +++ b/chapter07/halt.xml @@ -6,7 +6,8 @@ A new file+ cat > functions << "EOF" #!/bin/sh # Begin /etc/init.d/functions @@ -484,7 +485,8 @@ statusproc() # End /etc/init.d/functionsEOF -/etc/init.d/halt is created containing the following: -+ + + diff --git a/chapter07/hosts.xml b/chapter07/hosts.xml index 01684ee6d..3d8613186 100644 --- a/chapter07/hosts.xml +++ b/chapter07/hosts.xml @@ -7,21 +7,25 @@ IP-address, FQDN and possible aliases for use in the /etc/hosts file. An example is: -+ cat > halt << "EOF" #!/bin/sh # Begin /etc/init.d/halt @@ -19,7 +20,8 @@ following: # End /etc/init.d/haltEOF -+- <my-IP> myhost.mydomain.org aliases - + +<my-IP> myhost.mydomain.org aliases + +It should made sure that the IP-address is in the private network IP-address range. Valid ranges are: -+ ++ + Class Networks A 10.0.0.0 B 172.16.0.0 through 172.31.0.0 C 192.168.0.0 through 192.168.255.0 - A valid IP address could be 192.168.1.1. A valid FQDN for this IP could @@ -39,7 +43,8 @@ If a network card is not going to be configured, a new file -/etc/hosts is created by running:+ + ++ cat > /etc/hosts << "EOF" # Begin /etc/hosts (no network card version) @@ -47,14 +52,16 @@ If a network card is not going to be configured, a new file # End /etc/hosts (no network card version)EOF -If a network card is to be configured, a new file -/etc/hosts is created containing:+ + ++ cat > /etc/hosts << "EOF" # Begin /etc/hosts (network card version) @@ -63,7 +70,8 @@ If a network card is to be configured, a new file # End /etc/hosts (network card version)EOF -Of course, the 192.168.1.1 and www.mydomain.org have to be changed to the diff --git a/chapter07/loadkeys.xml b/chapter07/loadkeys.xml index 01f004f85..9520e45c2 100644 --- a/chapter07/loadkeys.xml +++ b/chapter07/loadkeys.xml @@ -8,7 +8,8 @@ US keyboard layout. A new file created: -+ + + diff --git a/chapter07/localnet.xml b/chapter07/localnet.xml index 1aa413b37..e7d1c7afc 100644 --- a/chapter07/localnet.xml +++ b/chapter07/localnet.xml @@ -6,7 +6,8 @@ A new file+ cat > loadkeys << "EOF" #!/bin/sh # Begin /etc/init.d/loadkeys @@ -29,7 +30,8 @@ evaluate_retval # End /etc/init.d/loadkeysEOF -/etc/init.d/localnet is created containing the following: -+ + + diff --git a/chapter07/mountfs.xml b/chapter07/mountfs.xml index 242924f42..969cac4f5 100644 --- a/chapter07/mountfs.xml +++ b/chapter07/mountfs.xml @@ -6,7 +6,8 @@ A new file+ cat > /etc/init.d/localnet << "EOF" #!/bin/sh # Begin /etc/init.d/localnet @@ -49,7 +50,8 @@ esac # End /etc/init.d/localnetEOF -/etc/init.d/mountfs is created containing the following: -+ + + diff --git a/chapter07/network.xml b/chapter07/network.xml index 121dc5cb1..f9cea6f1e 100644 --- a/chapter07/network.xml +++ b/chapter07/network.xml @@ -6,9 +6,11 @@ A new file+ cat > mountfs << "EOF" #!/bin/sh # Begin /etc/init.d/mountfs @@ -102,7 +103,8 @@ esac # End /etc/init.d/mountfsEOF -/etc/sysconfig/network is created and the hostname is put in it by running: -+- echo "HOSTNAME=lfs" > /etc/sysconfig/network -+ + +echo "HOSTNAME=lfs" > /etc/sysconfig/network +- lfsneeds to be replaced by the name the computer is to be diff --git a/chapter07/rc.xml b/chapter07/rc.xml index 2e86e031c..2372755a5 100644 --- a/chapter07/rc.xml +++ b/chapter07/rc.xml @@ -6,7 +6,8 @@ The first main boot script is the/etc/init.d/rc script. A new file/etc/init.d/rc is created containing the following:+ + + diff --git a/chapter07/rcS.xml b/chapter07/rcS.xml index 3a3b0fe16..ca53824a2 100644 --- a/chapter07/rcS.xml +++ b/chapter07/rcS.xml @@ -6,7 +6,8 @@ The second main boot script is the+ cat > rc << "EOF" #!/bin/sh # Begin /etc/init.d/rc @@ -245,7 +246,8 @@ fi # End /etc/init.d/rcEOF -rcS script. Create a new file/etc/init.d/rcS containing the following: -+ + + diff --git a/chapter07/reboot.xml b/chapter07/reboot.xml index 9ce1a6037..4fb352722 100644 --- a/chapter07/reboot.xml +++ b/chapter07/reboot.xml @@ -6,7 +6,8 @@ Create a new file+ cat > rcS << "EOF" #!/bin/sh # Begin /etc/init.d/rcS @@ -35,7 +36,8 @@ done # End /etc/init.d/rcSEOF -/etc/init.d/reboot containing the following: -+ + + diff --git a/chapter07/sendsignals.xml b/chapter07/sendsignals.xml index b2ed0c80e..30d48ac7d 100644 --- a/chapter07/sendsignals.xml +++ b/chapter07/sendsignals.xml @@ -6,7 +6,8 @@ Create a new file+ cat > reboot << "EOF" #!/bin/sh # Begin /etc/init.d/reboot @@ -22,7 +23,8 @@ echo "System reboot in progress..." # End /etc/init.d/rebootEOF -/etc/init.d/sendsignals containing the following: -+ + + diff --git a/chapter07/setclock.xml b/chapter07/setclock.xml index 05147f38d..4821459ad 100644 --- a/chapter07/setclock.xml +++ b/chapter07/setclock.xml @@ -20,7 +20,8 @@ hardware clock is set to GMT, then the UTC variable below has to be changed value of+ cat > sendsignals << "EOF" #!/bin/sh # Begin /etc/init.d/sendsignals @@ -36,7 +37,8 @@ evaluate_retval # End /etc/init.d/sendsignalsEOF -1 . -+ + ++ cat > setclock << "EOF" #!/bin/sh # Begin /etc/init.d/setclock @@ -61,7 +62,8 @@ evaluate_retval # End /etc/init.d/setclockEOF -Creating the /etc/sysconfig/clock file @@ -71,7 +73,8 @@ Create a new file/etc/sysconfig/clock by running the following: -+ + ++ cat > /etc/sysconfig/clock << "EOF" # Begin /etc/sysconfig/clock @@ -79,7 +82,8 @@ UTC=1 # End /etc/sysconfig/clockEOF -If the hardware clock (also known as BIOS or CMOS clock) is not set to diff --git a/chapter07/symperm.xml b/chapter07/symperm.xml index 03c258650..161a92e94 100644 --- a/chapter07/symperm.xml +++ b/chapter07/symperm.xml @@ -17,49 +17,47 @@ S20mydaemon, but S020mydaemon. And don't use K2otherdaemon, but K002otherdaemon. -+- cd /etc/init.d && -chmod 754 rc rcS functions checkfs halt loadkeys mountfs - reboot && -chmod 754 sendsignals setclock sysklogd template - && -chmod 754 localnet ethnet && -cd ../rc0.d && -ln -s ../init.d/ethnet K800ethnet && -ln -s ../init.d/sysklogd K900sysklogd && -ln -s ../init.d/sendsignals S800sendsignals && - -ln -s ../init.d/mountfs S900mountfs && -ln -s ../init.d/halt S999halt && -cd ../rc6.d && -ln -s ../init.d/ethnet K800ethnet && -ln -s ../init.d/sysklogd K900sysklogd && -ln -s ../init.d/sendsignals S800sendsignals && - -ln -s ../init.d/mountfs S900mountfs && -ln -s ../init.d/reboot S999reboot && -cd ../rcS.d && -ln -s ../init.d/localnet S100localnet && -ln -s ../init.d/checkfs S200checkfs && -ln -s ../init.d/mountfs S300mountfs && -ln -s ../init.d/setclock S400setclock && -ln -s ../init.d/loadkeys S500loadkeys && -cd ../rc1.d && -ln -s ../init.d/ethnet K800ethnet && -ln -s ../init.d/sysklogd K900sysklogd && -cd ../rc2.d && -ln -s ../init.d/sysklogd S100sysklogd && -ln -s ../init.d/ethnet K800ethnet && -cd ../rc3.d && -ln -s ../init.d/sysklogd S100sysklogd && -ln -s ../init.d/ethnet S200ethnet && -cd ../rc4.d && -ln -s ../init.d/sysklogd S100sysklogd && -ln -s ../init.d/ethnet S200ethnet && -cd ../rc5.d && -ln -s ../init.d/sysklogd S100sysklogd -ln -s ../init.d/ethnet S200ethnet && -+ diff --git a/chapter07/sysklogd.xml b/chapter07/sysklogd.xml index e6a188af0..b794f8fd1 100644 --- a/chapter07/sysklogd.xml +++ b/chapter07/sysklogd.xml @@ -6,7 +6,8 @@ A new file+ +cd /etc/init.d && +chmod 754 rc rcS functions checkfs halt loadkeys mountfs reboot && +chmod 754 sendsignals setclock sysklogd template && +chmod 754 localnet ethnet && +cd ../rc0.d && +ln -s ../init.d/ethnet K800ethnet && +ln -s ../init.d/sysklogd K900sysklogd && +ln -s ../init.d/sendsignals S800sendsignals && +ln -s ../init.d/mountfs S900mountfs && +ln -s ../init.d/halt S999halt && +cd ../rc6.d && +ln -s ../init.d/ethnet K800ethnet && +ln -s ../init.d/sysklogd K900sysklogd && +ln -s ../init.d/sendsignals S800sendsignals && +ln -s ../init.d/mountfs S900mountfs && +ln -s ../init.d/reboot S999reboot && +cd ../rcS.d && +ln -s ../init.d/localnet S100localnet && +ln -s ../init.d/checkfs S200checkfs && +ln -s ../init.d/mountfs S300mountfs && +ln -s ../init.d/setclock S400setclock && +ln -s ../init.d/loadkeys S500loadkeys && +cd ../rc1.d && +ln -s ../init.d/ethnet K800ethnet && +ln -s ../init.d/sysklogd K900sysklogd && +cd ../rc2.d && +ln -s ../init.d/sysklogd S100sysklogd && +ln -s ../init.d/ethnet K800ethnet && +cd ../rc3.d && +ln -s ../init.d/sysklogd S100sysklogd && +ln -s ../init.d/ethnet S200ethnet && +cd ../rc4.d && +ln -s ../init.d/sysklogd S100sysklogd && +ln -s ../init.d/ethnet S200ethnet && +cd ../rc5.d && +ln -s ../init.d/sysklogd S100sysklogd +ln -s ../init.d/ethnet S200ethnet && +/etc/init.d/sysklogd is created containing the following: -+ + + diff --git a/chapter07/template.xml b/chapter07/template.xml index 6a366b6f8..e4f20c36b 100644 --- a/chapter07/template.xml +++ b/chapter07/template.xml @@ -6,7 +6,8 @@ A new file+ cat > sysklogd << "EOF" #!/bin/sh # Begin /etc/init.d/sysklogd @@ -59,7 +60,8 @@ esac # End /etc/init.d/sysklogdEOF -/etc/init.d/template is created containing the following: -+ + + diff --git a/chapter08/fstab.xml b/chapter08/fstab.xml index d896e5f77..f12ffae71 100644 --- a/chapter08/fstab.xml +++ b/chapter08/fstab.xml @@ -8,7 +8,8 @@ used. A new file+ cat > template << "EOF" #!/bin/sh # Begin /etc/init.d/ @@ -52,7 +53,8 @@ esac # End /etc/init.d/EOF -/etc/fstab is created containing the following: -+ + ++ cat > /etc/fstab << "EOF" # Begin /etc/fstab @@ -18,7 +19,8 @@ proc /proc proc defaults 0 0 # End /etc/fstabEOF -<LFS-partition designation>, <swap-partition diff --git a/chapter08/kernel.xml b/chapter08/kernel.xml index 54a1efa80..4fd0bf4a2 100644 --- a/chapter08/kernel.xml +++ b/chapter08/kernel.xml @@ -9,18 +9,19 @@ with the kernel source tree, and find out what the options are. The following commands are run to build the kernel: -+- cd /usr/src/linux && -make mrproper && -make menuconfig && -make dep && -make bzImage && -make modules && -make modules_install && -cp arch/i386/boot/bzImage /boot/lfskernel && - -cp System.map /boot -+ + +cd /usr/src/linux && +make mrproper && +make menuconfig && +make dep && +make bzImage && +make modules && +make modules_install && +cp arch/i386/boot/bzImage /boot/lfskernel && +cp System.map /boot +Note: the arch/i386/boot/bzImage path may vary on different platforms. diff --git a/chapter08/lilo.xml b/chapter08/lilo.xml index 98c4363fb..6abec4e89 100644 --- a/chapter08/lilo.xml +++ b/chapter08/lilo.xml @@ -18,24 +18,28 @@ the host system or the LFS system). First we'll exit chroot and copy the lfskernel file to the host system: -+- logout -cp $LFS/boot/lfskernel /boot -+ + +logout +cp $LFS/boot/lfskernel /boot +The next step is adding an entry to /etc/lilo.conf so that we can choose LFS when booting the computer: -- +cat >> /etc/lilo.conf << "EOF" - image=/boot/lfskernel - label=lfs - root=<partition> - read-only -EOF -+ + +cat >> /etc/lilo.conf << "EOF" +image=/boot/lfskernel + label=lfs + root=<partition> + read-only +EOF +<partition> must be replaced by the LFS partition's designation. @@ -45,19 +49,23 @@ choose LFS when booting the computer: Now the boot loader gets updated by running: -+- /sbin/lilo -+ + +/sbin/lilo +The last step is syncing the host system lilo config. files with the LFS system: -+- cp /etc/lilo.conf $LFS/etc && -cp <kernel images> $LFS/boot -+ + +cp /etc/lilo.conf $LFS/etc && +cp <kernel images> $LFS/boot +To find out which kernel images files are being used, look at the diff --git a/chapter08/reboot.xml b/chapter08/reboot.xml index ef893ef1c..e55145af9 100644 --- a/chapter08/reboot.xml +++ b/chapter08/reboot.xml @@ -7,18 +7,22 @@ it's time to reboot the computer. Before we reboot let's exit the chroot'ed environment first and unmount the LFS partition by running: -+- umount $LFS/proc && -umount $LFS -+ + +umount $LFS/proc && +umount $LFS +And you can reboot your system by running something like: -+- /sbin/shutdown -r now -+ + +/sbin/shutdown -r now +At the LILO: prompt make sure that you tell it to boot diff --git a/chapter09/theend.xml b/chapter09/theend.xml index 6cc83a077..a4edb750d 100644 --- a/chapter09/theend.xml +++ b/chapter09/theend.xml @@ -37,10 +37,11 @@ is to not run strip on libraries (other than --strip-debug) just to be on the safe side. -+- find / -type f -exec strip --strip-debug '{}' ';' - -+ + +find / -type f -exec strip --strip-debug '{}' ';' +If you plan to ever upgrade to a newer LFS version in the future it @@ -51,9 +52,11 @@ you have installed on your system. This can just be a null-byte file by running: -+- touch /etc/lfs-&version; -+ + +touch /etc/lfs-&version; +One final thing you may want to do is run lilo now that you are booted @@ -68,9 +71,11 @@ Either way, run the following to make the lilo version installed on LFS active: -+- /sbin/lilo -+ + +/sbin/lilo +If you are wondering: "Well, where to go now?" you'll be glad to hear that