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.

You should also ensure that this new partition is not mounted with permissions that are too restrictive (such as the nosuid, nodev or noatime options). You can run the mount command without any parameters to see with what options the LFS partition is mounted. If you see nosuid, nodev or noatime, you will need to remount it.

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