⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fstab.html

📁 lfs3.1 从源代码构建linux。html版本。
💻 HTML
字号:
<HTML><HEAD><TITLE>Creating the /etc/fstab file</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.63"><LINKREL="HOME"TITLE="Linux From Scratch"HREF="../index.html"><LINKREL="UP"TITLE="Making the LFS system bootable"HREF="../chapter08/chapter08.html"><LINKREL="PREVIOUS"TITLE="Introduction"HREF="../chapter08/introduction.html"><LINKREL="NEXT"TITLE="Installing a kernel"HREF="../chapter08/kernel.html"></HEAD><BODYCLASS="sect1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Linux From Scratch: Version 3.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="../chapter08/introduction.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 8. Making the LFS system bootable</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="../chapter08/kernel.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="sect1"><H1CLASS="sect1"><ANAME="ch08-fstab">8.2. Creating the /etc/fstab file</A></H1><P>In order for certain programs to be able to determine where certainpartitions are supposed to be mounted by default, the /etc/fstab file isused. Create a new file <TTCLASS="filename">/etc/fstab</TT> containing thefollowing:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>cat &#62; /etc/fstab &#60;&#60; "EOF"</B></TT># Begin /etc/fstab# location of filesystem	mount point	fs-type		options/dev/*LFS-partition device*	/		*fs-type*	defaults 1 1/dev/*swap-partition device*  	swap 		swap		defaults 0 0proc 				/proc 		proc 		defaults 0 0# End /etc/fstab<TTCLASS="userinput"><B>EOF</B></TT></PRE></FONT></TD></TR></TABLE></P><P><TTCLASS="userinput"><B>*LFS-partition device*</B></TT>, <TTCLASS="userinput"><B>*swap-partition device*</B></TT>and <TTCLASS="userinput"><B>*fs-type*</B></TT> have to be replaced with the appropriate values (/dev/hda2, /dev/hda5 and reiserfs for example).</P><P>When adding a reiserfs partition, the <TTCLASS="userinput"><B>1 1</B></TT> at the end of the line should be replaced with <TTCLASS="userinput"><B>0 0</B></TT>.</P><P>For more information on the various fields which are in the fstabfile, see <TTCLASS="userinput"><B>man 5 fstab</B></TT>.</P><P>There are other lines which you may consider adding to your fstabfile.  One example is the line which you must have if you are usingdevpts:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen">devpts		/dev/pts	devpts   gid=4,mode=620  0 0</PRE></FONT></TD></TR></TABLE></P><P>Another example is a line to use if you intend to use USBdevices:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen">usbdevfs		/proc/bus/usb	usbdevfs defaults        0 0</PRE></FONT></TD></TR></TABLE></P><P>Both of these options will only work if you have the relevantsupport compiled into your kernel.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="../chapter08/introduction.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../index.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="../chapter08/kernel.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Introduction</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../chapter08/chapter08.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Installing a kernel</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -