From 6370fa6cff0ec2a8ac8d50d1595ec9500f6631c9 Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Wed, 24 Jan 2001 00:31:17 +0000 Subject: Initial commit - LFS 2.4.4 files git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@14 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter02/aboutlfs.sgml | 51 +++++++++++++++++++++++ chapter02/bootscripts.sgml | 19 +++++++++ chapter02/chapter2.sgml | 10 +++++ chapter02/commands.sgml | 31 ++++++++++++++ chapter02/download.sgml | 30 +++++++++++++ chapter02/install.sgml | 102 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 243 insertions(+) create mode 100644 chapter02/aboutlfs.sgml create mode 100644 chapter02/bootscripts.sgml create mode 100644 chapter02/chapter2.sgml create mode 100644 chapter02/commands.sgml create mode 100644 chapter02/download.sgml create mode 100644 chapter02/install.sgml (limited to 'chapter02') diff --git a/chapter02/aboutlfs.sgml b/chapter02/aboutlfs.sgml new file mode 100644 index 000000000..44675577c --- /dev/null +++ b/chapter02/aboutlfs.sgml @@ -0,0 +1,51 @@ + +About $LFS + + +Please read the following carefully: throughout this book you will +frequently see the variable name $LFS. $LFS must at all times be +replaced by the directory where the partition that contains the LFS system +is mounted. How to create and where to mount the partition will be +explaind in full detail later on in chapter 4. In my case the LFS +partition is mounted on /mnt/lfs. If I read this book myself and I see +$LFS somewhere, I will pretend that I read /mnt/lfs. If I read that +I have to run this command: cp inittab $LFS/etc I actually will run this: +cp inittab /mnt/lfs/etc + + + +It's important that you do this no matter where you read it; be it in +commands you enter on the prompt, or in a file you edit or create. + + + +If you want, you can set the environment variable LFS. This way you can +literally enter $LFS instead of replacing it by something like +/mnt/lfs. This is accomplished by running: export LFS=/mnt/lfs + + + +If I read cp inittab $LFS/etc, I literally can type cp inittab $LFS/etc +and the shell will replace this command by cp inittab /mnt/lfs/etc +automatically. + + + +Do not forget to set the $LFS variable at all times. If you haven't set +the variable and you use it in a command, $LFS will be ignored and whatever +is left will be executed. The command cp inittab $LFS/etc without the $LFS +variable set, will result in copying the inittab file to the /etc +directory which will overwrite your system's inittab. A file like inittab +isn't that big a problem as it can easily be restored, but if you would +make this mistake during the installation of the C Library, you can +damage things. + + + +One way to make sure that $LFS is set at all times you could add it to +your /root/.bash_profile and/or /root/.bashrc file(s) so everytime you +'su' to user too as to install LFS, the $LFS variable is set for you. + + + + diff --git a/chapter02/bootscripts.sgml b/chapter02/bootscripts.sgml new file mode 100644 index 000000000..f1595b152 --- /dev/null +++ b/chapter02/bootscripts.sgml @@ -0,0 +1,19 @@ + +Download the bootscripts + + +Typing out all the bootscripts in chapters 7 and 9 can be a long tedious +process, not to mention very error prone. + + + +To save you guys and girls some time, you can download the bootscripts +from +http://download.linuxfromscratch.org/bootscripts/ or +ftp://download.linuxfromscratch.org/bootscripts/ + + + + diff --git a/chapter02/chapter2.sgml b/chapter02/chapter2.sgml new file mode 100644 index 000000000..e58f87cee --- /dev/null +++ b/chapter02/chapter2.sgml @@ -0,0 +1,10 @@ + +Important information + +&c2-aboutlfs; +&c2-download; +&c2-install; +&c2-bootscripts; +&c2-commands; + + diff --git a/chapter02/commands.sgml b/chapter02/commands.sgml new file mode 100644 index 000000000..3c64b2f76 --- /dev/null +++ b/chapter02/commands.sgml @@ -0,0 +1,31 @@ + +Download the LFS Commands + + +LFS Commands is a tarball containing files which list the installation +commands for the packages installed in this book. These files can be +used to dump to your shell and install the packages, though some files +need to be modified (for example when you install the console-tools +package you need to select your keyboard layout file which can't be guessed). + + + +These files can be used to quickly find out which commands have been +changed between the different LFS versions as well. You can download the +lfs-commands tarball for this book version and the previous book version +and run a diff on the files. That way you can see which package have +updated installation instructions so you can modify your own scripts, or +reinstall a package if you deem necessary. + + + +The lfscommands can be downloaded from +http://download.linuxfromscratch.org/lfs-commands/ or +ftp://download.linuxfromscratch.org/lfs-commands/ + + + + + diff --git a/chapter02/download.sgml b/chapter02/download.sgml new file mode 100644 index 000000000..c939473f2 --- /dev/null +++ b/chapter02/download.sgml @@ -0,0 +1,30 @@ + +How to download the software + + +Throughout this document I will assume that you have stored all the +packages you have downloaded somewhere in $LFS/usr/src. + + + +I use the convention of having a $LFS/usr/src/sources directory. +Under sources you'll find the directory 0-9 and the directories a +through z. A package as sysvinit-2.78.tar.gz is stored under +$LFS/usr/src/sources/s/ A package as bash-2.04.tar.gz is stored under +$LFS/usr/src/sources/b/ and so forth. You don't have to follow this +convention of course, I was just giving an example. It's better to keep +the packages out of $LFS/usr/src and move them to a subdirectory, so +we'll have a clean $LFS/usr/src directory in which we will unpack the +packages and work with them. + + + +The next chapter contains the list of all the packages you need to download, +but the partition that is going to contain our LFS system isn't created yet. +Therefore store the files temporarily somewhere where you want and remember +to copy them to $LFS/usr/src/ when you have finished the chapter in which +you prepare a new partition (chapter 4). + + + + diff --git a/chapter02/install.sgml b/chapter02/install.sgml new file mode 100644 index 000000000..37fdbbb36 --- /dev/null +++ b/chapter02/install.sgml @@ -0,0 +1,102 @@ + +How to install the software + + +Before you can actually start doing something with a package, you need +to unpack it first. Often you will find the package files being tar'ed and +gzip'ed (you can determind this by looking at the extension of the file. +tar'ed and gzip'ed archives have a .tar.gz or .tgz extension for +example)). I'm not going to write down every time how to ungzip and how +to untar an archive. I will tell you how to do that once, in this paragraph. +There is also the possibility that you have the ability of downloading +a .tar.bz2 file. Such a file is tar'ed and compressed with the bzip2 program. +Bzip2 achieves a better compression than the commonly used gzip does. In +order to use bz2 archives you need to have the bzip2 program installed. +Most if not every distribution comes with this program so chances are +high it is already installed on your system. If not, install it using +your distribution's installation tool. + + + +To start with, change to the $LFS/usr/src directory by running: + + +
+ + cd $LFS/usr/src + +
+ + +When you have a file that is tar'ed and gzip'ed, you unpack it by +running either one of the following two commands, depending on the +filename format: + + +
+ + tar xvzf filename.tar.gz + tar xvzf filename.tgz + +
+ + + +When you have a file that is tar'ed and bzip'ed, you unpack it by +running: + + +
+ + bzcat filename.tar.bz2 | tar xv + +
+ + +Some tar programs (most of them nowadays but not all of them) are +slightly modified to be able to use bzip2 files directly using either +the I or the y tar parameter which works the same as the z tar parameter +to handle gzip archives. + + + +When you have a file that is tar'ed, you unpack it by running: + + +
+ + tar xvf filename.tar + +
+ + +When the archive is unpacked a new directory will be created under the +current directory (and this document assumes that you unpack the archives +under the $LFS/usr/src directory). You have to enter that new directory +before you continue with the installation instructions. So everytime the +book is going to install a program, it's up to you to unpack the source +archive. + + + +After you have installed a package you can do two things with it. You can +either delete the directory that contains the sources or you can keep it. +If you decide to keep it, that's fine by me. But if you need the same package +again in a later chapter you need to delete the directory first before using +it again. If you don't do this, you might end up in trouble because old +settings will be used (settings that apply to your normal Linux system but +which don't always apply to your LFS system). Doing a simple make clean +or make distclean does not always guarantee a totally clean source tree. +The configure script can also have files lying around in various +subdirectories which aren't always removed by a make clean process. + + + +There is on exception to that rule: don't remove the linux kernel source +tree. A lot of programs need the kernel headers, so that's the only +directory you don't want to remove, unless you are not going to +compile any software anymore. + + +
+ -- cgit v1.2.3-54-g00ecf