Linux From Scratch
Prev | Chapter 4. Preparing a new partition | Next

# 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/lfs, you can access this partition by going to the /mnt/lfs directory and then do whatever you need to do. This book will assume that you have mounted the partition on a subdirectory under /mnt. It doesn't matter which directory you choose, just make sure you remember what you chose.

Create the /mnt/lfs directory by runnning:

> `mkdir -p /mnt/lfs`

Now mount the LFS partition by running:

> `mount /dev/xxx /mnt/lfs`

Replace "xxx" by your partition's designation.

This directory (/mnt/lfs) 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/lfs/etc". Or if you want to use the $LFS environment variable, execute `export LFS=/mnt/lfs` now.

Prev | Home | Next
Creating a file system on the new partition | Up | Creating directories