2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2006-01-11 20:21:38 +00:00
|
|
|
|
2020-02-09 20:50:38 +00:00
|
|
|
<sect1 id="ch-partitioning-mounting">
|
2006-01-11 20:21:38 +00:00
|
|
|
<?dbhtml filename="mounting.html"?>
|
|
|
|
|
|
|
|
<title>Mounting the New Partition</title>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2022-09-22 22:17:48 +01:00
|
|
|
<para>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
|
|
|
|
<envar>LFS</envar> environment variable described in the previous section.
|
2015-03-31 22:25:42 +01:00
|
|
|
</para>
|
2022-09-27 18:21:38 +01:00
|
|
|
|
|
|
|
<para>Strictly speaking, one cannot "mount a partition". One mounts the <emphasis>file
|
|
|
|
system</emphasis> 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.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2022-09-22 22:17:48 +01:00
|
|
|
<para>Create the mount point and mount the LFS file system with these commands:</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2005-09-29 21:55:40 +01:00
|
|
|
<screen role="nodump"><userinput>mkdir -pv $LFS
|
2013-05-20 04:00:52 +01:00
|
|
|
mount -v -t ext4 /dev/<replaceable><xxx></replaceable> $LFS</userinput></screen>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2022-09-22 22:17:48 +01:00
|
|
|
<para>Replace <replaceable><xxx></replaceable> with the name of the LFS
|
2006-01-11 20:21:38 +00:00
|
|
|
partition.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2022-09-22 22:17:48 +01:00
|
|
|
<para>If you are using multiple partitions for LFS (e.g., one for
|
|
|
|
<filename class="directory">/</filename> and another for <filename
|
|
|
|
class="directory">/home</filename>), mount them like this:</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2005-09-29 21:55:40 +01:00
|
|
|
<screen role="nodump"><userinput>mkdir -pv $LFS
|
2013-05-20 04:00:52 +01:00
|
|
|
mount -v -t ext4 /dev/<replaceable><xxx></replaceable> $LFS
|
2021-05-12 05:24:11 +01:00
|
|
|
mkdir -v $LFS/home
|
|
|
|
mount -v -t ext4 /dev/<replaceable><yyy></replaceable> $LFS/home</userinput></screen>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-04-14 10:37:17 +01:00
|
|
|
<para>Replace <replaceable><xxx></replaceable> and
|
|
|
|
<replaceable><yyy></replaceable> with the appropriate partition
|
2006-01-11 20:21:38 +00:00
|
|
|
names.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2012-08-22 21:38:21 +01:00
|
|
|
<para>Ensure that this new partition is not mounted with permissions that are
|
|
|
|
too restrictive (such as the <option>nosuid</option> or
|
|
|
|
<option>nodev</option> options). Run the <command>mount</command> command
|
2006-01-11 20:21:38 +00:00
|
|
|
without any parameters to see what options are set for the mounted LFS
|
2014-09-08 07:05:23 +01:00
|
|
|
partition. If <option>nosuid</option> and/or <option>nodev</option> are set,
|
2022-09-22 22:17:48 +01:00
|
|
|
the partition must be remounted.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2022-09-22 22:17:48 +01:00
|
|
|
<warning><para>The above instructions assume that you will not restart
|
2018-01-26 20:37:11 +00:00
|
|
|
your computer throughout the LFS process. If you shut down your system,
|
2021-09-07 21:46:24 +01:00
|
|
|
you will either need to remount the LFS partition each time you restart
|
2022-09-24 11:56:45 +01:00
|
|
|
the build process, or modify the host system's &fstab; file to automatically
|
2022-09-22 22:17:48 +01:00
|
|
|
remount it when you reboot. For example, you might add this line to your
|
2022-09-24 11:56:45 +01:00
|
|
|
&fstab; file:
|
2018-01-26 20:37:11 +00:00
|
|
|
|
|
|
|
<screen role="nodump">/dev/<replaceable><xxx></replaceable> /mnt/lfs ext4 defaults 1 1</screen>
|
|
|
|
|
|
|
|
If you use additional optional partitions, be sure to add them also.
|
|
|
|
|
|
|
|
</para></warning>
|
|
|
|
|
|
|
|
|
2006-08-03 20:29:29 +01:00
|
|
|
<para>If you are using a <systemitem
|
|
|
|
class="filesystem">swap</systemitem> partition, ensure that it is enabled
|
|
|
|
using the <command>swapon</command> command:</para>
|
|
|
|
|
|
|
|
<screen role="nodump"><userinput>/sbin/swapon -v /dev/<replaceable><zzz></replaceable></userinput></screen>
|
|
|
|
|
|
|
|
<para>Replace <replaceable><zzz></replaceable> with the name of the
|
|
|
|
<systemitem class="filesystem">swap</systemitem> partition.</para>
|
|
|
|
|
2022-09-22 22:17:48 +01:00
|
|
|
<para>Now that the new LFS partition is open for business, it's time to
|
2006-01-11 20:21:38 +00:00
|
|
|
download the packages.</para>
|
2004-12-19 19:08:13 +00:00
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
</sect1>
|
2005-02-19 22:16:42 +00:00
|
|
|
|