diff options
author | Gerard Beekmans <gerard@linuxfromscratch.org> | 2001-01-24 00:31:17 +0000 |
---|---|---|
committer | Gerard Beekmans <gerard@linuxfromscratch.org> | 2001-01-24 00:31:17 +0000 |
commit | 6370fa6cff0ec2a8ac8d50d1595ec9500f6631c9 (patch) | |
tree | b17c8cb0a839b76f4a7db0f771953caa11c3a04e /chapter02 | |
parent | 5c930fe6eb43d23cfa0de2451d9a905a8505f981 (diff) |
Initial commit - LFS 2.4.4 files
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@14 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter02')
-rw-r--r-- | chapter02/aboutlfs.sgml | 51 | ||||
-rw-r--r-- | chapter02/bootscripts.sgml | 19 | ||||
-rw-r--r-- | chapter02/chapter2.sgml | 10 | ||||
-rw-r--r-- | chapter02/commands.sgml | 31 | ||||
-rw-r--r-- | chapter02/download.sgml | 30 | ||||
-rw-r--r-- | chapter02/install.sgml | 102 |
6 files changed, 243 insertions, 0 deletions
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 @@ +<sect1 id="ch02-aboutlfs"> +<title>About $LFS</title> + +<para> +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 +</para> + +<para> +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. +</para> + +<para> +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 +</para> + +<para> +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. +</para> + +<para> +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. +</para> + +<para> +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. +</para> + +</sect1> + 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 @@ +<sect1 id="ch02-bootscripts"> +<title>Download the bootscripts</title> + +<para> +Typing out all the bootscripts in chapters 7 and 9 can be a long tedious +process, not to mention very error prone. +</para> + +<para> +To save you guys and girls some time, you can download the bootscripts +from <ulink +url="http://download.linuxfromscratch.org/bootscripts/"> +http://download.linuxfromscratch.org/bootscripts/</ulink> or <ulink +url="ftp://download.linuxfromscratch.org/bootscripts/"> +ftp://download.linuxfromscratch.org/bootscripts/</ulink> +</para> + +</sect1> + 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 @@ +<chapter id="chapter02"> +<title>Important information</title> + +&c2-aboutlfs; +&c2-download; +&c2-install; +&c2-bootscripts; +&c2-commands; + +</chapter> 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 @@ +<sect1 id="ch02-commands"> +<title>Download the LFS Commands</title> + +<para> +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). +</para> + +<para> +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. +</para> + +<para> +The lfscommands can be downloaded from <ulink +url="http://download.linuxfromscratch.org/lfs-commands/"> +http://download.linuxfromscratch.org/lfs-commands/</ulink> or <ulink +url="ftp://download.linuxfromscratch.org/lfs-commands/"> +ftp://download.linuxfromscratch.org/lfs-commands/</ulink> +</para> + +</sect1> + + 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 @@ +<sect1 id="ch02-download"> +<title>How to download the software</title> + +<para> +Throughout this document I will assume that you have stored all the +packages you have downloaded somewhere in $LFS/usr/src. +</para> + +<para> +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. +</para> + +<para> +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). +</para> + +</sect1> + 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 @@ +<sect1 id="ch02-install"> +<title>How to install the software</title> + +<para> +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. +</para> + +<para> +To start with, change to the $LFS/usr/src directory by running: +</para> + +<blockquote><literallayout> + + <userinput>cd $LFS/usr/src</userinput> + +</literallayout></blockquote> + +<para> +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: +</para> + +<blockquote><literallayout> + + <userinput>tar xvzf filename.tar.gz</userinput> + <userinput>tar xvzf filename.tgz</userinput> + +</literallayout></blockquote> + + +<para> +When you have a file that is tar'ed and bzip'ed, you unpack it by +running: +</para> + +<blockquote><literallayout> + + <userinput>bzcat filename.tar.bz2 | tar xv</userinput> + +</literallayout></blockquote> + +<para> +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. +</para> + +<para> +When you have a file that is tar'ed, you unpack it by running: +</para> + +<blockquote><literallayout> + + <userinput>tar xvf filename.tar</userinput> + +</literallayout></blockquote> + +<para> +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. +</para> + +<para> +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. +</para> + +<para> +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. +</para> + +</sect1> + |