Mounting the new partition

Now that we've created a file system, we want to be able to access the partition. For that, we need to mount it, and have to choose a mount point. In this book we assume that the file system is mounted under /mnt/lfs, but it doesn't matter what directory you choose.

Choose a mount point and assign it to the LFS environment variable by running:

export LFS=/mnt/lfs

Now create the mount point and mount the LFS file system by running:

mkdir -p $LFS &&
mount /dev/xxx $LFS

Replace xxx with the designation of the LFS partition.

If you have decided to use multiple partitions for LFS (say one for / and another for /usr), mount them like this:

mkdir -p $LFS &&
mount /dev/xxx $LFS &&
mkdir $LFS/usr &&
mount /dev/yyy $LFS/usr

Of course, replace xxx and yyy with the appropriate partition names.

Now that we've made ourselves a place to work in, we're ready to download the packages.