2.7. Montage de la nouvelle partition

Now that a file system has been created, the partition must be mounted so the host system can access it. This book assumes that the file system is mounted at the directory specified by the LFS environment variable described in the previous section.

Strictly speaking, one cannot "mount a partition". One mounts the file system embedded in that partition. But since a single partition can't contain more than one file system, people often speak of the partition and the associated file system as if they were one and the same.

Create the mount point and mount the LFS file system with these commands:

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

Replace <xxx> with the name of the LFS partition.

If you are using multiple partitions for LFS (e.g., one for / and another for /home), mount them like this:

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

Remplacez <xxx> et <yyy> par les noms de partition appropriés.

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 must be remounted.

[Avertissement]

Avertissement

The above instructions assume that you will not restart your computer throughout the LFS process. If you shut down your system, you will either need to remount the LFS partition each time you restart the build process, or modify the host system's /etc/fstab file to automatically remount it when you reboot. For example, you might add this line to your /etc/fstab file:

/dev/<xxx>  /mnt/lfs ext4   defaults      1     1

If you use additional optional partitions, be sure to add them also.

Si vous utilisez une partition de swap, assurez-vous qu'elle est activée en exécutant la commande swapon :

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

Remplacez <zzz> par le nom de la partition de swap.

Now that the new LFS partition is open for business, it's time to download the packages.