Mounting the new partition

Now that we have created the ext2 file system, it is ready for use. All we have to do to be able to access it (as in reading from and writing date to it) is mounting it. If you mount it under /mnt/hda5, you can access this partition by going to the /mnt/hda5 directory and then do whatever you need to do. This document will assume that you have mounted the partition on a subdirectory under /mnt. It doesn't matter which directory you choose (or you can use just the /mnt directory as the mount point), but a good practice is to create a directory with the same name as the partition's designation. In my case the LFS partition is called hda5 and therefore I mount it on /mnt/hda5

Create the /mnt directory if it doesn't exist yet by runnning:


root:~# mkdir /mnt

Create the /mnt/xxx directory by running:



root:~# mkdir /mnt/xxx

Replace "xxx" by your partition's designation.

Now mount the LFS partition by running:



root:~# mount /dev/xxx /mnt/xxx

Replace "xxx" by your partition's designation.

This directory (/mnt/xxx) is the $LFS variable you have read about earlier. So if you read somewhere to "cp inittab $LFS/etc" you actually will type "cp inittab /mnt/xxx/etc" where "xxx" is replaced by your partition's designation.