#### Linux From Scratch - Version 7.9

### Chapter 2. Preparing a New Partition

- Prev

  Setting The $LFS Variable

- Next

  Packages and Patches

- Up
- Home

# 2.5. Mounting the New Partition

Now that a file system has been created, the partition needs to be made accessible. In order to do this, the partition needs to be mounted at a chosen mount point. For the purposes of this book, it is assumed that the file system is mounted under the directory specified by the `LFS` environment variable as described in the previous section.

Create the mount point and mount the LFS file system by running:

    mkdir -pv $LFS
    mount -v -t ext4 /dev/<xxx> $LFS

Replace `<xxx>` with the designation of the LFS partition.

If using multiple partitions for LFS (e.g., one for `/` and another for `/usr`), mount them using:

    mkdir -pv $LFS
    mount -v -t ext4 /dev/<xxx> $LFS
    mkdir -v $LFS/usr
    mount -v -t ext4 /dev/<yyy> $LFS/usr

Replace `<xxx>` and `<yyy>` with the appropriate partition names.

Ensure that this new partition is not mounted with permissions that are too restrictive (such as the `nosuid` or `nodev` options). Run the mount command without any parameters to see what options are set for the mounted LFS partition. If `nosuid` and/or `nodev` are set, the partition will need to be remounted.

If you are using a `swap` partition, ensure that it is enabled using the swapon command:

    /sbin/swapon -v /dev/<zzz>

Replace `<zzz>` with the name of the `swap` partition.

Now that there is an established place to work, it is time to download the packages.

- Prev

  Setting The $LFS Variable

- Next

  Packages and Patches

- Up
- Home