📄 x4069.html
字号:
<div class="INFORMALTABLE"><a id="AEN4197" name="AEN4197"></a><table border="0" frame="void" class="CALSTABLE"><col width="1*" /><col width="5*" /><thead><tr><th>Partition</th><th>Convention</th></tr></thead><tbody><tr><td><var class="LITERAL">a</var></td><td>Normally contains the root filesystem</td></tr><tr><td><var class="LITERAL">b</var></td><td>Normally contains swap space</td></tr><tr><td><var class="LITERAL">c</var></td><td>Normally the same size as the enclosing slice. This allows utilities that need towork on the entire slice (for example, a bad block scanner) to work on the <varclass="LITERAL">c</var> partition. You would not normally create a filesystem on thispartition.</td></tr><tr><td><var class="LITERAL">d</var></td><td>Partition <var class="LITERAL">d</var> used to have a special meaning associated withit, although that is now gone. To this day, some tools may operate oddly if told to workon partition <var class="LITERAL">d</var>, so <b class="APPLICATION">sysinstall</b> willnot normally create partition <var class="LITERAL">d</var>.</td></tr></tbody></table></div><p>Each partition-that-contains-a-filesystem is stored in what FreeBSD calls a <iclass="FIRSTTERM">slice</i>. Slice is FreeBSD's term for what were earlier calledpartitions, and again, this is because of FreeBSD's <span class="TRADEMARK">UNIX</span>background. Slices are numbered, starting at 1, through to 4.</p><p>Slice numbers follow the device name, prefixed with an <var class="LITERAL">s</var>,starting at 1. So ``da0<span class="emphasis"><i class="EMPHASIS">s1</i></span>'' is thefirst slice on the first SCSI drive. There can only be four physical slices on a disk,but you can have logical slices inside physical slices of the appropriate type. Theseextended slices are numbered starting at 5, so ``ad0<span class="emphasis"><iclass="EMPHASIS">s5</i></span>'' is the first extended slice on the first IDE disk. Thesedevices are used by file systems that expect to occupy a slice.</p><p>Slices, ``dangerously dedicated'' physical drives, and other drives contain <iclass="FIRSTTERM">partitions</i>, which are represented as letters from <varclass="LITERAL">a</var> to <var class="LITERAL">h</var>. This letter is appended to thedevice name, so ``da0<span class="emphasis"><i class="EMPHASIS">a</i></span>'' is the apartition on the first da drive, which is ``dangerously dedicated''. ``ad1s3<spanclass="emphasis"><i class="EMPHASIS">e</i></span>'' is the fifth partition in the thirdslice of the second IDE disk drive.</p><p>Finally, each disk on the system is identified. A disk name starts with a code thatindicates the type of disk, and then a number, indicating which disk it is. Unlikeslices, disk numbering starts at 0. Common codes that you will see are listed in <ahref="x4069.html#INSTALL-DEV-CODES">Table 3-1</a>.</p><p>When referring to a partition FreeBSD requires that you also name the slice and diskthat contains the partition, and when referring to a slice you should also refer to thedisk name. Do this by listing the disk name, <var class="LITERAL">s</var>, the slicenumber, and then the partition letter. Examples are shown in <ahref="x4069.html#INSTALL-DISK-SLICE-PART">Example 3-1</a>.</p><p><a href="x4069.html#INSTALL-CONCEPT-DISK-MODEL">Example 3-2</a> shows a conceptualmodel of the disk layout that should help make things clearer.</p><p>In order to install FreeBSD you must first configure the disk slices, then createpartitions within the slice you will use for FreeBSD, and then create a filesystem (orswap space) in each partition, and decide where that filesystem will be mounted.</p><div class="TABLE"><a id="INSTALL-DEV-CODES" name="INSTALL-DEV-CODES"></a><p><b>Table 3-1. Disk Device Codes</b></p><table border="0" frame="void" class="CALSTABLE"><col width="1*" /><col width="5*" /><thead><tr><th>Code</th><th>Meaning</th></tr></thead><tbody><tr><td><tt class="DEVICENAME">ad</tt></td><td>ATAPI (IDE) disk</td></tr><tr><td><tt class="DEVICENAME">da</tt></td><td>SCSI direct access disk</td></tr><tr><td><tt class="DEVICENAME">acd</tt></td><td>ATAPI (IDE) CDROM</td></tr><tr><td><tt class="DEVICENAME">cd</tt></td><td>SCSI CDROM</td></tr><tr><td><tt class="DEVICENAME">fd</tt></td><td>Floppy disk</td></tr></tbody></table></div><div class="EXAMPLE"><a id="INSTALL-DISK-SLICE-PART" name="INSTALL-DISK-SLICE-PART"></a><p><b>Example 3-1. Sample Disk, Slice, and Partition Names</b></p><div class="INFORMALTABLE"><a id="AEN4292" name="AEN4292"></a><table border="0" frame="void" class="CALSTABLE"><col width="1*" /><col width="5*" /><thead><tr><th>Name</th><th>Meaning</th></tr></thead><tbody><tr><td><var class="LITERAL">ad0s1a</var></td><td>The first partition (<var class="LITERAL">a</var>) on the first slice (<varclass="LITERAL">s1</var>) on the first IDE disk (<var class="LITERAL">ad0</var>).</td></tr><tr><td><var class="LITERAL">da1s2e</var></td><td>The fifth partition (<var class="LITERAL">e</var>) on the second slice (<varclass="LITERAL">s2</var>) on the second SCSI disk (<var class="LITERAL">da1</var>).</td></tr></tbody></table></div></div><div class="EXAMPLE"><a id="INSTALL-CONCEPT-DISK-MODEL"name="INSTALL-CONCEPT-DISK-MODEL"></a><p><b>Example 3-2. Conceptual Model of a Disk</b></p><p>This diagram shows FreeBSD's view of the first IDE disk attached to the system. Assumethat the disk is 4 GB in size, and contains two 2 GB slices (DOS partitions).The first slice contains a DOS disk, <tt class="DEVICENAME">C:</tt>, and the second slicecontains a FreeBSD installation. This example FreeBSD installation has three partitions,and a swap partition.</p><p>The three partitions will each hold a filesystem. Partition <varclass="LITERAL">a</var> will be used for the root filesystem, <varclass="LITERAL">e</var> for the <tt class="FILENAME">/var</tt> directory hierarchy, and<var class="LITERAL">f</var> for the <tt class="FILENAME">/usr</tt> directoryhierarchy.</p><p><img src="install/disk-layout.png" /></p></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="dirstructure.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="mount-unmount.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Directory Structure</td><td width="34%" align="center" valign="top"><a href="basics.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Mounting and Unmounting File Systems</td></tr></table></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -