📄 mounting.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=gb2312" />
<title>
2.4. Mounting the New Partition
</title>
<link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1" />
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print" />
</head>
<body id="lfs" class="6.1">
<div class="navheader">
<div class="headertitles">
<h4>
Linux From Scratch - Version 6.1
</h4>
<h3>
Chapter 2. 创建一个新的分区
</h3>
</div>
<ul class="headerlinks">
<li class="prev">
<a accesskey="p" href="creatingfilesystem.html" title="Creating a File System on the Partition">后退</a>
<p>
Creating a File System on the Partition
</p>
</li>
<li class="next">
<a accesskey="n" href="../part2.html" title="Preparing for the Build">前进</a>
<p>
Preparing for the Build
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter02.html" title="Chapter 2. 创建一个新的分区">上一级</a>.
</li>
<li class="home">
<a accesskey="h" href="../index.html" title="Linux From Scratch - Version 6.1">回首页</a>
</li>
</ul>
</div>
<div class="sect1" lang="zh_cn" xml:lang="zh_cn">
<div class="titlepage">
<h1 class="sect1">
2.4. 挂载新的分区
</h1>
</div>
<p>
创建文件系统之后,要让分区可以存取,需要把分区挂载到一个选定的挂载点上。考虑在本书的目的,我们假定文件系统挂载到 <tt class="filename">/mnt/lfs</tt>,但是您也可以选择别的目录。
</p>
<p>
选定一个挂载点,并指定给 <tt class="envar">LFS</tt>环境变量,请运行命令:
</p>
<pre class="userinput"><kbd class="command">export LFS=/mnt/lfs</kbd></pre>
<p>
下一步,创建这个挂载点,并挂载 LFS 文件系统,请运行命令:
</p>
<pre class="userinput"><kbd class="command">mkdir -p $LFS
mount /dev/<em class="replaceable"><tt>[xxx]</tt></em> $LFS</kbd></pre>
<p>
用您创建的 LFS 分区名称替换<em class="replaceable"><tt>[xxx]</tt></em>
</p>
<p>
如果 LFS 装在多个分区上(比如一个分区用于<tt class="filename">/</tt> 目录,另一个分区用于 <tt class="filename">/usr</tt> 目录),用下面的命令挂载它们:
</p>
<pre class="userinput"><kbd class="command">mkdir -p $LFS
mount /dev/<em class="replaceable"><tt>[xxx]</tt></em> $LFS
mkdir $LFS/usr
mount /dev/<em class="replaceable"><tt>[yyy]</tt></em> $LFS/usr</kbd></pre>
<p>
用相应的分区名称替换 <em class="replaceable"><tt>[xxx]</tt></em> 和 <em class="replaceable"><tt>[yyy]</tt></em>
</p>
<p>
请确认挂载新分区的时候没有使用太多的限制选项(如 nosuid、nodev 或者 noatime 选项)。运行不带参数的 <span><strong class="command">mount</strong></span>命令看看挂载的 LFS 分区都设置了什么选项,如果出现了 <em class="parameter"><tt>nosuid</tt></em>, <em class="parameter"><tt>nodev</tt></em>, <em class="parameter"><tt>noatime</tt></em> 之一,您就需要重新挂载这个分区。 </p>
<p>
现在工作的空间已经建立好了,接下来要下载所需的软件包。
</p>
</div>
<div class="navfooter">
<ul>
<li class="prev">
<a accesskey="p" href="creatingfilesystem.html" title="Creating a File System on the Partition">后退</a>
<p>
Creating a File System on the Partition
</p>
</li>
<li class="next">
<a accesskey="n" href="../part2.html" title="Preparing for the Build">前进</a>
<p>
Preparing for the Build
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter02.html" title="Chapter 2. 创建一个新的分区">上一级</a>.
</li>
<li class="home">
<a accesskey="h" href="../index.html" title="Linux From Scratch - Version 6.1">回首页</a>.
</li>
</ul>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -