📄 fstab.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=iso-8859-1" /> <title> 7.14. Creating the ${LFS}/etc/fstab File </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-x86"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86 </h4> <h3> Chapter 7. If You Are Going to Boot </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="settingenvironment.html" title= "Setting Up the Environment">Prev</a> <p> Setting Up the Environment </p> </li> <li class="next"> <a accesskey="n" href="bootscripts.html" title= "CLFS-Bootscripts-0.1">Next</a> <p> CLFS-Bootscripts-0.1 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86"> Home</a> </li> </ul> </div> <div class="sect1" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 7.14. Creating the ${LFS}/etc/fstab File </h1> </div> <p> The <tt class="filename">${LFS}/etc/fstab</tt> file is used by some programs to determine where file systems are to be mounted by default, which must be checked, and in which order. Create a new file systems table like this: </p> <pre class="userinput"><kbd class="command">cat > ${LFS}/etc/fstab << "EOF"<tt class="literal"># Begin /etc/fstab# file system mount-point type options dump fsck# order/dev/<em class="replaceable"><tt>[xxx]</tt></em> / <em class="replaceable"><tt>[fff]</tt></em> defaults 1 1/dev/<em class="replaceable"><tt>[yyy]</tt></em> swap swap pri=1 0 0proc /proc proc defaults 0 0sysfs /sys sysfs defaults 0 0devpts /dev/pts devpts gid=10,mode=620 0 0shm /dev/shm tmpfs defaults 0 0# End /etc/fstab</tt>EOF</kbd></pre> <p> Replace <em class="replaceable"><tt>[xxx]</tt></em>, <em class= "replaceable"><tt>[yyy]</tt></em>, and <em class= "replaceable"><tt>[fff]</tt></em> with the values appropriate for the system, for example, <tt class="filename">hda2</tt>, <tt class= "filename">hda5</tt>, and <tt class="systemitem">ext2</tt>. For details on the six fields in this file, see <span><strong class= "command">man 5 fstab</strong></span>. </p> <p> The <tt class="filename">/dev/shm</tt> mount point for <tt class= "systemitem">tmpfs</tt> is included to allow enabling POSIX-shared memory. The kernel must have the required support built into it for this to work (more about this is in the next section). Please note that very little software currently uses POSIX-shared memory. Therefore, consider the <tt class="filename">/dev/shm</tt> mount point optional. For more information, see <tt class= "filename">Documentation/filesystems/tmpfs.txt</tt> in the kernel source tree. </p> </div> <div class="navfooter"> <ul> <li class="prev"> <a accesskey="p" href="settingenvironment.html" title= "Setting Up the Environment">Prev</a> <p> Setting Up the Environment </p> </li> <li class="next"> <a accesskey="n" href="bootscripts.html" title= "CLFS-Bootscripts-0.1">Next</a> <p> CLFS-Bootscripts-0.1 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86"> Home</a>. </li> </ul> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -