About $LFS

Please read the following paragraphs carefully. Throughout this book the variable LFS will be used frequently. $LFS must at all times be replaced with the directory where the partition that contains the LFS system is mounted. How to create and where to mount the partition will be explained in full detail in Chapter 3. For the moment let's assume that the LFS partition is mounted on /mnt/lfs.

When you are told to run a command like ./configure --prefix=$LFS/tools, you actually have to execute ./configure --prefix=/mnt/lfs/tools.

It's important that this is done no matter where it is read; be it in commands entered in a shell, or in a file edited or created.

A possible solution is to set the environment variable LFS. This way $LFS can be entered literally instead of replacing it with /mnt/lfs. This is accomplished by running:

export LFS=/mnt/lfs

Now, if you are told to run a command such as ./configure --prefix=$LFS/tools, then you may type it literally. Your shell will replace "$LFS" with "/mnt/lfs" when it processes the command line (that is, when you hit Enter after having typed the command).