1 | <sect1 id="ch03-mounting">
|
---|
2 | <title>Mounting the new partition</title>
|
---|
3 | <?dbhtml filename="mounting.html" dir="chapter03"?>
|
---|
4 |
|
---|
5 | <para>Now that we've created a file system, we want to be able to access
|
---|
6 | the partition. For that, we need to mount it, and have to choose a mount
|
---|
7 | point. In this book we assume that the file system is mounted under
|
---|
8 | <filename>/mnt/lfs</filename>, but it doesn't matter what directory
|
---|
9 | you choose.</para>
|
---|
10 |
|
---|
11 | <para>Choose a mount point and assign it to the LFS environment variable
|
---|
12 | by running:</para>
|
---|
13 |
|
---|
14 | <screen><userinput>export LFS=/mnt/lfs</userinput></screen>
|
---|
15 |
|
---|
16 | <para>Now create the mount point and mount the LFS file system by running:</para>
|
---|
17 |
|
---|
18 | <screen><userinput>mkdir -p $LFS
|
---|
19 | mount /dev/xxx $LFS</userinput></screen>
|
---|
20 |
|
---|
21 | <para>Replace <filename>xxx</filename> with the designation of the LFS
|
---|
22 | partition.</para>
|
---|
23 |
|
---|
24 | <para>If you have decided to use multiple partitions for LFS (say one for
|
---|
25 | <filename>/</filename> and another for <filename>/usr</filename>), mount
|
---|
26 | them like this:</para>
|
---|
27 |
|
---|
28 | <screen><userinput>mkdir -p $LFS
|
---|
29 | mount /dev/xxx $LFS
|
---|
30 | mkdir $LFS/usr
|
---|
31 | mount /dev/yyy $LFS/usr</userinput></screen>
|
---|
32 |
|
---|
33 | <para>Of course, replace <filename>xxx</filename> and <filename>yyy</filename>
|
---|
34 | with the appropriate partition names.</para>
|
---|
35 |
|
---|
36 | <para>You should also ensure that this new partition is not mounted with
|
---|
37 | permissions that are too restrictive (such as the nosuid, nodev or noatime
|
---|
38 | options). You can run the <userinput>mount</userinput> command without any
|
---|
39 | parameters to see with what options the LFS partition is mounted. If
|
---|
40 | you see nosuid, nodev or noatime, you will need to remount it.</para>
|
---|
41 |
|
---|
42 | <para>Now that we've made ourselves a place to work in, we're ready to download
|
---|
43 | the packages.</para>
|
---|
44 |
|
---|
45 | </sect1>
|
---|
46 |
|
---|