mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 04:57:38 +00:00
89 lines
3.8 KiB
XML
89 lines
3.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
%general-entities;
|
|
]>
|
|
|
|
<sect1 id="ch-partitioning-mounting">
|
|
<?dbhtml filename="mounting.html"?>
|
|
|
|
<title>Mounting the New Partition</title>
|
|
|
|
<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.
|
|
</para>
|
|
|
|
<para>Strictly speaking, one cannot <quote>mount a partition.</quote> 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>
|
|
|
|
<para>Create the mount point and mount the LFS file system with these commands:</para>
|
|
|
|
<screen role="nodump"><userinput>mkdir -pv $LFS
|
|
mount -v -t ext4 /dev/<replaceable><xxx></replaceable> $LFS</userinput></screen>
|
|
|
|
<para>Replace <replaceable><xxx></replaceable> with the name of the LFS
|
|
partition.</para>
|
|
|
|
<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>
|
|
|
|
<screen role="nodump"><userinput>mkdir -pv $LFS
|
|
mount -v -t ext4 /dev/<replaceable><xxx></replaceable> $LFS
|
|
mkdir -v $LFS/home
|
|
mount -v -t ext4 /dev/<replaceable><yyy></replaceable> $LFS/home</userinput></screen>
|
|
|
|
<para>Replace <replaceable><xxx></replaceable> and
|
|
<replaceable><yyy></replaceable> with the appropriate partition
|
|
names.</para>
|
|
|
|
<para>Set the owner and permission mode of the
|
|
<filename class='directory'>$LFS</filename> directory (i.e. the root
|
|
directory in the newly created file system for the LFS system) to
|
|
&root; and <literal>755</literal> in case the host distro has been
|
|
configured to use a different default for <command>mkfs</command>:</para>
|
|
|
|
<screen role='nodump'><userinput>chown root:root $LFS
|
|
chmod 755 $LFS</userinput></screen>
|
|
|
|
<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
|
|
without any parameters to see what options are set for the mounted LFS
|
|
partition. If <option>nosuid</option> and/or <option>nodev</option> are set,
|
|
the partition must be remounted.</para>
|
|
|
|
<warning><para>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 &fstab; file to automatically
|
|
remount it when you reboot. For example, you might add this line to your
|
|
&fstab; file:
|
|
|
|
<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>
|
|
|
|
|
|
<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>
|
|
|
|
<para>Now that the new LFS partition is open for business, it's time to
|
|
download the packages.</para>
|
|
|
|
</sect1>
|
|
|