doc/zh_TW.Big5/books/handbook/install/chapter.sgml
Chin-San Huang 433c2d97a4 - Update some section of translation
Obtained from:		The FreeBSD Traditional Chinese Project
			https://opensvn.csie.org/traccgi/freebsddoc/wiki
2008-01-13 15:45:38 +00:00

4564 lines
157 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--
The FreeBSD Documentation Project
$FreeBSD$
Original revision: 1.381
-->
<chapter id="install">
<chapterinfo>
<authorgroup>
<author>
<firstname>Jim</firstname>
<surname>Mock</surname>
<contrib>Restructured, reorganized, and parts
rewritten by </contrib>
</author>
</authorgroup>
<authorgroup>
<author>
<firstname>Randy</firstname>
<surname>Pratt</surname>
<contrib>The sysinstall walkthrough, screenshots, and general
copy by </contrib>
</author>
</authorgroup>
<!-- January 2000 -->
</chapterinfo>
<title>安裝 FreeBSD</title>
<sect1 id="install-synopsis">
<title>概述</title>
<indexterm><primary>installation</primary></indexterm>
<para>FreeBSD 提供一個簡單好用的文字介面安裝程式,叫做
<application>sysinstall</application>。 這是 FreeBSD 預設使用的安裝程式
。協力廠商若有意願的話,也可以改用自己的安裝程式。
本章將說明如何使用 <application>sysinstall</application> 來安裝
FreeBSD。</para>
<para>讀完這章,您將了解︰</para>
<itemizedlist>
<listitem>
<para>如何製作 FreeBSD 安裝片</para>
</listitem>
<listitem>
<para>FreeBSD 對硬碟的使用及配置。</para>
</listitem>
<listitem>
<para>如何啟動 <application>sysinstall</application> 程式。</para>
</listitem>
<listitem>
<para>在執行 <application>sysinstall</application>
時會問的相關問題有哪些、這些問題的意思為何、以及該如何回答。</para>
</listitem>
</itemizedlist>
<para>在開始閱讀這章之前,您需要︰</para>
<itemizedlist>
<listitem>
<para>閱讀要安裝的 FreeBSD 版本所附之硬體支援表,
以確定您的硬體有沒有被支援。</para>
</listitem>
</itemizedlist>
<note>
<para>一般來說,此安裝說明是針對 &i386; (相容的 PC 機種)
架構的電腦。 如果有其他架構(比如 Alpha)的安裝說明,我們會一併列出。
雖然本文件會常常更新,但有可能與您安裝版本上所附的說明文件有些許出入。
在此,我們建議您把本說明文章當作一般的安裝參考原則就好。</para>
</note>
</sect1>
<sect1 id="install-hardware">
<title>硬體需求</title>
<sect2 id="install-hardware-minimal">
<title>最低需求</title>
<para>安裝 &os; 的硬體方面最低需求,依各 &os;
版本與硬體架構差別而有所不同。</para>
<para>關於安裝所需的最低需求,可在 &os; 網站的 <ulink
url="http://www.FreeBSD.org/releases/index.html">Release
Information</ulink> 找相關的 Installation Notes 說明。
接下來的章節會有相關說明整理。
根據安裝 &os; 的方式不同,可能會需要軟碟機或光碟機,
或某些情況則是要網路卡。 這些部份會在 <xref
linkend="install-floppies"> 有介紹。</para>
<sect3>
<title>&os;/&arch.i386; 及 &os;/&arch.pc98; 架構</title>
<para>&os;/&arch.i386; 及 &os;/&arch.pc98; 兩種版本均須 486 或更好的處理器,
以及至少 24&nbsp;MB 的 RAM、至少 150&nbsp;MB 的硬碟空間,
才能進行最小安裝。</para>
<note>
<para>對老舊硬體而言,在大部份情況裝更多的 RAM
與更大的硬碟空間,會比使用更快的 CPU 更有用。</para>
</note>
</sect3>
<sect3>
<title>&os;/&arch.alpha; 架構</title>
<para>若要裝 &os;/&arch.alpha;,則需確認該機型是否有支援
(請參閱 <xref linkend="install-hardware-supported">)
且必須整顆硬碟皆給 &os; 使用。
目前無法同時與其他作業系統共存。 這硬碟須接到 SRM
韌體有支援的 SCSI controller 上,或者 IDE 硬碟
(該機型的 SRM 有支援可從 IDE 硬碟開機)。</para>
<para>此外,還需該機型的 SRM console firmware。
有些機型可以選擇 AlphaBIOS (or ARC) firmware 或 SRM 來用。
若沒有的話,則需從硬體廠商的網站去下載新的韌體。</para>
<note>
<para>從 &os;&nbsp;7.0 就不再支援 Alpha。
&os;&nbsp;6.<replaceable>X</replaceable> 系列則是此架構的最後支援
。</para>
</note>
</sect3>
<sect3>
<title>&os;/&arch.amd64; 架構</title>
<para>有兩種 CPU 能跑 &os;/&arch.amd64;。 第一種是包括 &amd.athlon;64
、&amd.athlon;64-FX、&amd.opteron; 或更好的 CPU。</para>
<para>第二種則是 &intel; EM64T 架構的 CPU這些也可以用
&os;/&arch.amd64;。 這些 CPU 包括了 &intel;&nbsp;&core;&nbsp;2 Duo
、Quad、Extreme 系列以及 &intel;&nbsp;&xeon; 3000、5000、7000
相關系列的 CPU。</para>
<para>若主機板晶片組為 nVidia nForce3 Pro-150
<emphasis>必須</emphasis> 調整 BIOS 設定,將 IO APIC 停用才行。
若找不到這選項,那可能就是找 ACPI 停用。
因為 Pro-150 晶片組有個 bug目前我們尚無找到堪解之道。</para>
</sect3>
<sect3>
<title>&os;/&arch.sparc64; 架構</title>
<para>若要裝 &os;/&arch.sparc64;,則需確認該機型是否有支援
(請參閱 <xref
linkend="install-hardware-supported">)。</para>
<para>&os;/&arch.sparc64; 必須使用整顆硬碟,
因為無法同時與其他作業系統共存。</para>
</sect3>
</sect2>
<sect2 id="install-hardware-supported">
<title>有支援的硬體</title>
<para>&os; 每次 release 時都會有附上 &os; Hardware Notes
來說明有支援的硬體列表。
通常這份文件可在光碟或 FTP 的最上層目錄找到,也就是名為
<filename>HARDWARE.TXT</filename> 的檔案。
此外,在 <application>sysinstall</application> 的 documentation
選項內也可以看到。
每次 &os; release 時該列表會依各不同架構,
而列出相關已知有支援的硬體。 在 &os; 網站的 <ulink
url="http://www.FreeBSD.org/releases/index.html">Release
Information</ulink> 頁可以找到各不同 release
版本與各架構上的硬體支援列表。</para>
</sect2>
</sect1>
<sect1 id="install-pre">
<title>安裝前的準備工作</title>
<sect2 id="install-inventory">
<title>列出您電腦的硬體清單</title>
<para>在安裝 FreeBSD 之前,您應該試著將您電腦中的硬體清單列出來。
FreeBSD 安裝程式會將這些硬體(硬碟、網路卡、光碟機等等)
以型號及製造廠商列出來。
FreeBSD 也會嘗試為這些硬體找出最適當的 IRQ 及 IO port 的設定。
但是因為 PC 的硬體種類實在太過複雜,這個步驟不一定保證絕對成功。
這時,您就可能需要手動更改有問題的設定值哩。</para>
<para>如果您已裝了其它的作業系統,如:
&windows; 或 Linux那麼可先由這些系統所提供的工具
來查看這些硬體設定值是怎麼設定的。
若真的沒辦法確定某些卡用什麼設定值,
那麼可以檢查看看卡上面所標示的東西,說不定它的設定已有標示在卡上。
常用的 IRQ 號碼為 3、5 以及 7而 IO 埠的值通常以 16 進位表示,
例如 0x330。</para>
<para>建議您在安裝 FreeBSD 之前,把這些資料列印或抄錄下來做成表格,
也許會較有用喔,例如:</para>
<table pgwide="1" frame="none">
<title>硬體清單(舉例)</title>
<tgroup cols="4">
<colspec colwidth="2*">
<colspec colwidth="1*">
<colspec colwidth="1*">
<colspec colwidth="4*">
<thead>
<row>
<entry>硬體名稱</entry>
<entry>IRQ</entry>
<entry>IO port(s)</entry>
<entry>備註</entry>
</row>
</thead>
<tbody>
<row>
<entry>第一顆 IDE 硬碟</entry>
<entry>N/A</entry>
<entry>N/A</entry>
<entry>40&nbsp;GBSeagate 製造,接在第一條 IDE 排線的 master
</entry>
</row>
<row>
<entry>CDROM</entry>
<entry>N/A</entry>
<entry>N/A</entry>
<entry>接在第一條 IDE 排線的 slave</entry>
</row>
<row>
<entry>第二顆硬碟</entry>
<entry>N/A</entry>
<entry>N/A</entry>
<entry>20&nbsp;GBIBM 製造,接在第二條 IDE 排線的 master</entry>
</row>
<row>
<entry>第一個 IDE controller</entry>
<entry>14</entry>
<entry>0x1f0</entry>
<entry></entry>
</row>
<row>
<entry>網路卡</entry>
<entry>N/A</entry>
<entry>N/A</entry>
<entry>&intel; 10/100</entry>
</row>
<row>
<entry>數據機</entry>
<entry>N/A</entry>
<entry>N/A</entry>
<entry>&tm.3com; 56K faxmodem接在 COM1</entry>
</row>
<row>
<entry>&hellip;</entry>
</row>
</tbody>
</tgroup>
</table>
<para>硬體清單完成之後,就需針對你所要裝的 &os; 版本之硬體需求,
來檢查是否有支援。</para>
</sect2>
<sect2>
<title>備份您的資料</title>
<para>如果要裝的電腦上面存有重要資料,那麼在安裝 FreeBSD 前,
請確定您已經將這些資料備份了,並且先測試過這些備份檔是否沒有問題。
FreeBSD 安裝程式在要寫入任何資料到您的硬碟前,都會先提醒您確認,
一旦您確定要寫入,那麼之後就再也沒有反悔的機會囉。</para>
</sect2>
<sect2 id="install-where">
<title>決定要將 FreeBSD 安裝到哪裡</title>
<para>如果您想讓 FreeBSD 直接使用整顆硬碟,那麼請直接跳到下一節。</para>
<para>然而,如果您想要 FreeBSD 跟既有的系統並存,那麼,
您必須對硬碟的資料分佈方式有深入的了解,以及其所造成的影響。</para>
<sect3 id="install-where-i386">
<title>&os;/&arch.i386; 架構的硬碟配置模式</title>
<para>PC 上的硬碟可以被細分為許多分散區(chunk)。這些區域叫做
<firstterm>分割區(Partitions)</firstterm>。
由於 &os; 內部也有 partition名稱可能很容易造成混淆
因此通常在 &os; 這邊會稱呼這些磁碟分散區為 disk slices 或簡稱
slices。 舉例來說FreeBSD 的 <command>fdisk</command>
的對象是針對 PC 硬碟的 slice 而非 partition。 因為
PC 本身先天設計,每個硬碟最多可以有 4 個分割區,而這些分割叫做
<firstterm>主要分割區(Primary Partitions)</firstterm>。
為了突破這個限制,以便能使用更多的分割區,就有了新的分割區類型,叫作:
<firstterm>延伸分割區(Extended Partition)</firstterm>。
每個硬碟就只能有一個延伸分割區。
然而,在延伸分割區裡面可以建立許多個特殊分割區,叫作
<firstterm>邏輯分割區(Logical Partitions)</firstterm>。</para>
<para>每種分割區都有其 <firstterm>分割區代號(Partition ID)</firstterm>
用以區別每種分割區的資料類型。
而 FreeBSD 分割區代號是 <literal>165</literal>。</para>
<para>一般來講,每種作業系統都會有自己獨特的方式來區別分割區。
舉例: DOS 及其之後的作業系統,比如 &windows;
會分配給每個主要分割區及邏輯分割區 1 個
<firstterm>磁碟代號(drive letter)</firstterm>,從
<devicename>C:</devicename> 開始。</para>
<para>FreeBSD 必須安裝在主要分割區。
FreeBSD 可以在這個分割區上面存放資料或是您建立的任何檔案。
然而,如果您有很多顆硬碟,也可以在這些(或部份)硬碟建立 FreeBSD 分割區。
安裝 FreeBSD 的時候,必須至少要有 1 個分割區給 FreeBSD 使用,
這個分割區可以是尚未使用的分割區,或是現存的分割區
(但上面的資料不打算繼續使用)。</para>
<para>如果已經用完了磁碟上所有的分割區,
那麼您必須使用其他作業系統所提供的工具
(像是 DOS or &windows; 上的 <command>fdisk</command>)
來騰出一個分割區給 FreeBSD 用。</para>
<para>如果有多餘的分割區,也可以使用它。
但使用前,您可能需要先整理一下這些分割區。</para>
<para>FreeBSD最小安裝需要約 100&nbsp;MB 的空間,但是這只是『最小安裝』,
幾乎沒剩下多少空間來存放您自己的檔案。
較理想的(不含圖形介面)最小安裝是約
250&nbsp;MB或者是 350&nbsp;MB 左右(包含圖形介面)。
還需要安裝其他的套件軟體,那麼將需要更多的硬碟空間。</para>
<para>您可以使用商業軟體像是
<application>&partitionmagic;</application> 或免費自由工具像是
<application>GParted</application> 來重新調整分割區空間,
來給 FreeBSD 用的空間。FreeBSD 光碟、FTP 上面的
<filename>tools</filename> 目錄包含兩個免費的工具,
也可以達成這個工作,叫作:<application>FIPS</application> 及
<application>PResizer</application>。
這些工具的說明文件可以在同個目錄內找到。
<application>FIPS</application>、
<application>PResizer</application> 和
<application>&partitionmagic;</application> 可以重新調整在 &ms-dos; 到
&windows; ME 所使用的 <acronym>FAT16</acronym> 及
<acronym>FAT32</acronym> 分割區大小。 目前已知可更改
<acronym>NTFS</acronym> 分割區的有
<application>&partitionmagic;</application> 及
<application>GParted</application> 這兩種工具程式。
<application>GParted</application>在許多 Linux distributions 的 Live CD
都有提供,像是 <ulink
url="http://www.sysresccd.org/">SystemRescueCD</ulink>。</para>
<para>目前已知 &microsoft; Vista 分割區的重新調整大小會有問題。
在做上述類似動作時,請記得手邊要有 Vista 安裝光碟以免萬一。
此外,強烈建議先做磁碟維護,以及現有資料備份。</para>
<warning>
<para>不當的使用這些工具,可能會刪除所有硬碟上的資料。
在使用這些工具前,請確定您已有先備份好資料。</para>
</warning>
<example>
<title>使用現有的分割區</title>
<para>假設您只有一個 4&nbsp;GB 的硬碟,而且已經裝了 &windows;
,然後將這顆硬碟分成兩個磁碟代號:<devicename>C:</devicename> 及
<devicename>D:</devicename>,每個大小為 2&nbsp;GB 。
<devicename>C:</devicename> 槽上放了 1&nbsp;GB 的資料,
而 <devicename>D:</devicename> 槽上放了 0.5&nbsp;GB 的資料。</para>
<para>這表示硬碟上有兩個分割區,每個磁碟代號槽都是分割區。
您可以把所有放在 <devicename>D:</devicename> 的資料,都移動到
<devicename>C:</devicename>,這樣就空出了第二個分割區可以給
FreeBSD 使用。</para>
</example>
<example>
<title>縮減現有的分割區</title>
<para>假設您只有一個 4&nbsp;GB 硬碟,而且已經裝了 &windows;。
在安裝 &windows; 時把 4&nbsp;GB 都給 <devicename>C:</devicename>
槽,並且現在已經用了 1.5&nbsp;GB 空間,而你想將剩下空間的
2&nbsp;GB 給 FreeBSD 使用。</para>
<para>如此一來,為了裝 FreeBSD你必須在以下兩種方式二選一</para>
<orderedlist>
<listitem>
<para>備份 &windows; 資料,然後重裝 &windows;
並在安裝 &windows; 時給 2&nbsp;GB 的分割空間。</para>
</listitem>
<listitem>
<para>使用上述的工具,像是
<application>&partitionmagic;</application>,來重新調整 &windows;
所用的分割區大小。</para>
</listitem>
</orderedlist>
</example>
</sect3>
<sect3>
<title>Alpha 架構的磁碟配置模式</title>
<para>在 Alpha 上,您必須使用一整顆硬碟給 FreeBSD
沒有辦法在同顆硬碟上跟其他作業系統共存。 依不同型號的 Alpha
機器,您的硬碟可以是 SCSI 或 IDE 硬碟,
只要您的機器可以從這些硬碟開機就可以。</para>
<para>按照 Digital / Compaq 使用手冊的編排風格,
所有 SRM 輸入的部分都用大寫表示。 注意SRM 大小寫有別。</para>
<para>要得知您磁碟的名稱以及型號,可以在 SRM console 提示下使用
<literal>SHOW DEVICE</literal> 命令:</para>
<screen>&gt;&gt;&gt;<userinput>SHOW DEVICE</userinput>
dka0.0.0.4.0 DKA0 TOSHIBA CD-ROM XM-57 3476
dkc0.0.0.1009.0 DKC0 RZ1BB-BS 0658
dkc100.1.0.1009.0 DKC100 SEAGATE ST34501W 0015
dva0.0.0.0.1 DVA0
ewa0.0.0.3.0 EWA0 00-00-F8-75-6D-01
pkc0.7.0.1009.0 PKC0 SCSI Bus ID 7 5.27
pqa0.0.0.4.0 PQA0 PCI EIDE
pqb0.0.1.4.0 PQB0 PCI EIDE</screen>
<para>例子中機器為 Digital Personal Workstation 433au
並且顯示出此機器有連接三個磁碟機。 第一個是 CDROM叫做
<devicename>DKA0</devicename> ;另外兩個是磁碟機, 分別叫做:
<devicename>DKC0</devicename> 及 <devicename>DKC100</devicename>。
</para>
<para>磁碟機的名稱中有 <devicename>DKx</devicename>
字樣的是 SCSI 硬碟。例如: <devicename>DKA100</devicename>
表示是 SCSI 硬碟,其 SCSI ID 為 1 位在第一個 SCSI 匯流排(A)
而 <devicename>DKC300</devicename> 表示是 SCSI 硬碟,
其 SCSI ID 為 3位於第三個 SCSI 匯流排(C)。
裝置名稱 <devicename>PKx</devicename> 則為 SCSI 控制卡。
由上述 <literal>SHOW DEVICE</literal> 的結果看來,
SCSI 光碟機也被視為是 SCSI 硬碟的一種。</para>
<para>若為 IDE 硬碟的話,名稱會有 <devicename>DQx</devicename> 字樣,
而 <devicename>PQx</devicename> 則表示相對應的 IDE 磁碟控制器。
</para>
</sect3>
</sect2>
<sect2>
<title>整理你的網路設定資料</title>
<para>如果想透過網路( FTP 站或 NFS)安裝 FreeBSD
那麼就必須知道您的網路設定。
在安裝 FreeBSD 的過程中將會提示您輸入這些資訊,以順利完成安裝過程。
</para>
<sect3>
<title>使用乙太網路(Ethernet)或 Cable/DSL 數據機上網</title>
<para>若使用乙太網路,或是要透過 Cable/DSL 數據機上網,
那麼您必須準備下面的資訊:</para>
<orderedlist>
<listitem>
<para>IP 位址</para>
</listitem>
<listitem>
<para>預設 Gateway(閘道) 的 IP 位址</para>
</listitem>
<listitem>
<para>Hostname(機器名稱)</para>
</listitem>
<listitem>
<para>DNS 伺服器的 IP 位址</para>
</listitem>
<listitem>
<para>Subnet Mask</para>
</listitem>
</orderedlist>
<para>若不知道這些資訊,您可以詢問系統管理者或是您的 ISP 業者。
他們可能會說這些資訊會由 <firstterm>DHCP</firstterm> 自動指派;
如果是這樣的話,請記住這一點就可以了。</para>
</sect3>
<sect3>
<title>使用數據機上網</title>
<para>若由一般的數據機撥接上網,您仍然可以安裝 FreeBSD
只是會需要很長的時間。</para>
<para>您必須知道:</para>
<orderedlist>
<listitem>
<para>撥接到 ISP 的電話號碼。</para>
</listitem>
<listitem>
<para>您的數據機是連到哪個 COM 埠。</para>
</listitem>
<listitem>
<para>您撥接到 ISP 所用的帳號跟密碼。</para>
</listitem>
</orderedlist>
</sect3>
</sect2>
<sect2>
<title>查閱 FreeBSD 勘誤表(Errata)</title>
<para>雖然我們盡力使得每個 FreeBSD 發行版本都很穩定,
但是過程中仍然不免有時會發生錯誤。
在某些很罕見的情形下,這些錯誤會影響到安裝的過程。
當發現這些錯誤且修正後,會將它們列在
<ulink url="http://www.FreeBSD.org/releases/&rel.current;R/errata.html">
FreeBSD 勘誤表(Errata)</ulink> 中。 在您安裝 FreeBSD
前,應該先看看勘誤表中有沒有什麼問題會影響到您的安裝。</para>
<para>關於所有發行版本的資訊(包括勘誤表),可以在 <ulink
url="&url.base;/index.html">FreeBSD 網站</ulink> 的
<ulink
url="&url.base;/releases/index.html">發行情報(release information)
</ulink> 找到。</para>
</sect2>
<sect2>
<title>準備好 FreeBSD 安裝檔案</title>
<para>FreeBSD 可以透過下面任何一種安裝來源進行安裝︰</para>
<itemizedlist>
<title>Local Media</title>
<listitem>
<para>CDROM 或 DVD</para>
</listitem>
<listitem>
<para>現有的 DOS 分割區</para>
</listitem>
<listitem>
<para>SCSI 或 QIC 磁帶。</para>
</listitem>
<listitem>
<para>軟碟磁片</para>
</listitem>
</itemizedlist>
<itemizedlist>
<title>Network</title>
<listitem>
<para>FTP 站、支援 Passvie 模式的 FTP 站(若您機器在 NAT 內)
、甚至 HTTP proxy 都可以。</para>
</listitem>
<listitem>
<para>NFS 伺服器</para>
</listitem>
<listitem>
<para>專用(dedicated)的 parallel 或 serial 連線</para>
</listitem>
</itemizedlist>
<para>若已經有 FreeBSD 的 CD 或 DVD但機器不支援從光碟開機的話
那麼請直接進下一節 (<xref linkend="install-floppies">)。</para>
<para>若沒有 FreeBSD 安裝片的話,那麼請先看 <xref
linkend="install-diff-media"> 這裡會介紹如何準備所需要的安裝片,
照該節步驟弄好後,就可以繼續下一步 <xref linkend="install-start">。
</para>
</sect2>
<sect2 id="install-floppies">
<title>準備好開機磁片</title>
<para>FreeBSD 安裝流程是要從電腦開機後,進入 FreeBSD 安裝畫面 ——
而不是在其他作業系統上執行程式。
一般來講,電腦都是用裝在硬碟上的作業系統來開機,
也可以用開機磁片來開機;
此外,現在大多數電腦都可以從光碟開機。</para>
<tip>
<para>如果您有 FreeBSD 的 CDROM 或 DVD(無論是用買現成的或是自己燒錄的)
且您的電腦可支援由光碟開機,(通常在 BIOS 中會有
<quote>Boot Order</quote> 或類似選項),那麼您就可以跳過此小節。
因為 FreeBSD CDROM 或 DVD 都可以用來開機。</para>
</tip>
<para>請按照下面步驟,以製作開機片:</para>
<procedure>
<step>
<title>取得開機片的映像檔(images)</title>
<para>開機磁片用的映像檔(images)通常會放在光碟片上的
<filename>floppies/</filename> 目錄內,
另外也可以從像是下面 FTP 站的 floppies 目錄下載:
<literal>ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/<replaceable>&lt;arch&gt;</replaceable>/<replaceable>&lt;version&gt;</replaceable>-RELEASE/floppies/</literal>
。請將『arch』、『version』替換為打算安裝的電腦架構、OS 版本。
例如:想裝的是 &os;/&arch.i386;&nbsp;&rel.current;-RELEASE
,那麼可以到 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/floppies/">
</ulink> 下載。</para>
<para>映像檔(images)的附檔名都是 <filename>.flp</filename>。而
<filename>floppies/</filename> 目錄內包含一些不同用途的映像檔
(images),這取決於您要裝的 FreeBSD 版本、需求、硬體配備為何。
通常要 4 個映像檔,也就是: <filename>boot.flp</filename>、
<filename>kern1.flp</filename>、<filename>kern2.flp</filename>、
<filename>kern3.flp</filename>。 若有疑問的話,請翻閱同一目錄下的
<filename>README.TXT</filename> 文件檔,以瞭解相關最新注意事項。
</para>
<important>
<para>在使用 FTP 下載時,必須使用 <emphasis>binary 模式</emphasis>
進行傳輸。 有些瀏覽器預設是以 <emphasis>text</emphasis> (或
<emphasis>ASCII</emphasis>) 模式來傳輸資料,
所以這些錯誤傳輸模式下載的映像檔所做成的磁片,會無法使用。</para>
</important>
</step>
<step>
<title>準備開機磁片</title>
<para>每個映像檔都需要一張磁片,並且請避免使用到壞的磁片。
最簡單的檢測方式就是自己先把這些磁片再重新格式化(format)
而不要相信所謂的已格式化的磁片,&windows; 內的 format
在格式化時,並不會告訴你是否有壞軌,
而只會直接將它們標示壞軌而不使用壞軌部分而已。
此外,建議採用全新的磁片來製作安裝片比較保險。</para>
<important>
<para>若在安裝 FreeBSD 的過程中發生當機、
畫面凍結或是其他怪異的現象,首先要懷疑的就是開機磁片是否壞掉。
請用其他的磁片製作映像檔再試試看。</para>
</important>
</step>
<step>
<title>將映像檔(images)寫入到磁片內</title>
<para><filename>.flp</filename> 檔並非一般檔案,
不能直接把它複製到磁片上。
事實上它是包含整張磁片所有內容的映像檔(image)。
也就是說,不能純粹複製檔案到磁片上,
而必須使用特別的工具程式,來將映像檔直接寫到磁片上。</para>
<indexterm><primary>DOS</primary></indexterm>
<para>若要用 &ms-dos;/&windows; 來作安裝片的話,那麼可以用
<command>fdimage</command> 工具程式來將映像檔,寫到磁片上。</para>
<para>若您用的是 FreeBSD 光碟的話(假設光碟機代號為
<devicename>E:</devicename> ,那麼請執行類似下面的指令:</para>
<screen><prompt>E:\&gt;</prompt> <userinput>tools\fdimage floppies\boot.flp A:</userinput></screen>
<para>請針對每個需要用到的 <filename>.flp</filename> 映像檔,
重複上述的指令(記得更改相關檔名),每次的映像檔完成後,
都需要換另外一片來裝新的映像檔; 請記得:
在作好的磁片上註明是使用哪個映像檔作的。
若 <filename>.flp</filename> 映像檔放在不同地方,
請自行修改上述指令。若沒有 FreeBSD 光碟的話,
可以到 FTP 上面的 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/tools/"><filename class="directory">tools</filename>
目錄</ulink> 下載 <command>fdimage</command> 使用。</para>
<para>如果要用 &unix; 系統(比如其他台 FreeBSD 機器)
來製作開機片的話,可以用 &man.dd.1; 指令來把映像檔直接寫入到磁片上。
在 FreeBSD上的話可以打類似下面的指令</para>
<screen>&prompt.root; <userinput>dd if=boot.flp of=/dev/fd0</userinput></screen>
<para>在 FreeBSD 中,<filename>/dev/fd0</filename>
就是指第一台軟碟機(即一般 &ms-dos;/&windows;
上的 <devicename>A:</devicename> 磁碟機)
而 <filename>/dev/fd1</filename> 指 <devicename>B:</devicename>
磁碟機,其餘的依此類推。 不過其他的 &unix;
系統可能會用不同的名稱,這時就要查閱該系統的說明文件了。</para>
</step>
</procedure>
<para>現在起,我們可以開始安裝 FreeBSD 囉!</para>
</sect2>
</sect1>
<sect1 id="install-start">
<title>開始安裝</title>
<important>
<para>預設的情況下,安裝過程並不會改變您磁碟機中的任何資料,
除非您看到下面的訊息:</para>
<literallayout class="monospaced">Last Chance: Are you SURE you want continue the installation?
If you're running this on a disk with data you wish to save then WE
STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before proceeding!
We can take no responsibility for lost disk contents!</literallayout>
<para>在看到這最後的警告訊息前,
您都可以隨時離開安裝程式而不會變更您的硬碟。
如果您發現有任何設定錯誤,
這時您可以直接將電源關掉而不會造成任何傷害。</para>
</important>
<sect2 id="install-starting">
<title>開機啟動流程篇</title>
<sect3 id="install-starting-i386">
<title>&i386; 平台的開機流程</title>
<procedure>
<step>
<para>在一開始,電腦電源開關是關閉的。</para>
</step>
<step>
<para>打開電腦電源開關。剛開始的時候,
它應該會顯示進入系統設定選單或 BIOS 要按哪個鍵,
常見的有: <keycap>F2</keycap>, <keycap>F10</keycap>,
<keycap>Del</keycap> 或 <keycombo action="simul">
<keycap>Alt</keycap> <keycap>S</keycap>
</keycombo>。(按鍵請依據實際情況決定) 不論是要按哪個鍵,
請按它進入 BIOS 設定畫面。
有時您的電腦可能會顯示一個圖形畫面,
通常做法是按 <keycap>Esc</keycap> 鍵將離開這個圖形畫面,
以使您能夠看到必要的設定訊息。</para>
</step>
<step>
<para>找出可以設定『開機順序(Boot Order)』的選項,
通常該選項會列出一些設備讓您選擇,例如︰
<literal>Floppy</literal>, <literal>CDROM</literal>,
<literal>First Hard Disk</literal> 等等。</para>
<para>如果要用軟碟安裝,請確定 floppy disk 要列為開機順序的第一個;
若要用光碟安裝,記得 CDROM 要列為開機順序的第一個。
為了避免不必要的疑惑,請參考機器、主機板說明手冊。</para>
<para>儲存設定並離開,系統應該會重新啟動。</para>
</step>
<step>
<para>若要用磁片安裝,請把在
<xref linkend="install-floppies">一節中製作好的
<filename>boot.flp</filename> 那張安裝磁片放到第一台軟碟機中。
</para>
<para>如果是從光碟安裝,那麼開機後請將 FreeBSD 光碟放入光碟機中。
</para>
<para>如果,開機後如往常一樣而沒有從軟碟或光碟開機,請檢查︰</para>
<orderedlist>
<listitem>
<para>是不是磁片或光碟太晚放入而錯失開機時間。
如果是,請將它們放入,然後重新開機。</para>
</listitem>
<listitem>
<para>BIOS 設定不對或忘了儲存設定,請重新檢查 BIOS 的設定。</para>
</listitem>
<listitem>
<para>您的電腦 BIOS 不支援從光碟開機。</para>
</listitem>
</orderedlist>
</step>
<step>
<para>此時FreeBSD 就開始啟動了。
如果是從光碟開機,會見到類似下面的畫面(版本部分省略)</para>
<screen>Booting from CD-Rom...
CD Loader 1.2
Building the boot loader arguments
Looking up /BOOT/LOADER... Found
Relocating the loader and the BTX
Starting the BTX loader
BTX loader 1.00 BTX version is 1.01
Console: internal video/keyboard
BIOS CD is cd0
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS 639kB/261120kB available memory
FreeBSD/i386 bootstrap loader, Revision 1.1
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x64daa0 data=0xa4e80+0xa9e40 syms=[0x4+0x6cac0+0x4+0x88e9d]
\</screen>
<para>如果您從軟碟開機,會看到類似下面的畫面(版本部分省略)</para>
<screen>Booting from Floppy...
Uncompressing ... done
BTX loader 1.00 BTX version is 1.01
Console: internal video/keyboard
BIOS drive A: is disk0
BIOS drive C: is disk1
BIOS 639kB/261120kB available memory
FreeBSD/i386 bootstrap loader, Revision 1.1
Loading /boot/defaults/loader.conf
/kernel text=0x277391 data=0x3268c+0x332a8 |
Insert disk labelled "Kernel floppy 1" and press any key...</screen>
<para>請根據提示將 <filename>boot.flp</filename> 磁片取出,
並放入 <filename>kern1.flp</filename> 這張磁片,
然後按 <keycap>Enter</keycap> 鍵。
總之,您只需從第一張磁片啟動,然後根據提示,再放入相關磁片即可。
</para>
</step>
<step>
<para>無論從軟碟或光碟開機,接下來會進入 &os; boot loader
選單畫面:</para>
<figure id="boot-loader-menu">
<title>&os; Boot Loader 選單</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/boot-loader-menu" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>您可以等待 10 秒,或是按 <keycap>Enter</keycap> 鍵。</para>
</step>
</procedure>
</sect3>
<sect3>
<title>Alpha 平台的開機流程</title>
<indexterm><primary>Alpha</primary></indexterm>
<procedure>
<step>
<para>在一開始,電腦電源開關是關閉的。</para>
</step>
<step>
<para>打開電腦電源開關,然後等開機畫面出現。</para>
</step>
<step>
<para>若要用磁片安裝,請把在
<xref linkend="install-floppies">一節中製作好的
<filename>boot.flp</filename> 那張安裝磁片放到第一台軟碟機中。
然後,打下列指令來從磁片開機
(請把下列軟碟機代號改為你電腦的軟碟機代號)</para>
<screen>&gt;&gt;&gt;<userinput>BOOT DVA0 -FLAGS '' -FILE ''</userinput></screen>
<para>若要用光碟安裝,請把做好的安裝片放入光碟機,
然後打下列指令來從光碟開機
(請把下列光碟機代號改為你電腦的光碟機代號)</para>
<screen>&gt;&gt;&gt;<userinput>BOOT DKA0 -FLAGS '' -FILE ''</userinput></screen>
</step>
<step>
<para>接著 FreeBSD 開機片就會開始了。若是由軟碟開機的話,
這時會看到以下訊息:</para>
<screen>Insert disk labelled "Kernel floppy 1" and press any key...</screen>
<para>請照指示,拿走 <filename>boot.flp</filename> 片,改放
<filename>kern1.flp</filename> 片,
然後按 <keycap>Enter</keycap>。</para>
</step>
<step>
<para>無論從軟碟或光碟開機,您都會看到下面這段訊息:</para>
<screen>Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [kernel] in 9 seconds... _</screen>
<para>您可以等待 10 秒,或是按 <keycap>Enter</keycap> 鍵。
接下來就會進入kernel configuration 選單。</para>
</step>
</procedure>
</sect3>
<sect3>
<title>&sparc64; 平台的開機流程</title>
<para>大多數的 &sparc64; 機器預設會自動從硬碟開機。 因此要裝 &os;
的話,則需要進入 PROM(OpenFirmware) 設定由網路或光碟開機才可。</para>
<para>請先重開機,然後等待直到開機訊息出現。 這部分可能會隨機器型號不同
,而有所差異,但大概會出現像下列這樣:</para>
<screen>Sun Blade 100 (UltraSPARC-IIe), Keyboard Present
Copyright 1998-2001 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.2, 128 MB memory installed, Serial #51090132.
Ethernet address 0:3:ba:b:92:d4, Host ID: 830b92d4.</screen>
<para>若您機器此時會先由硬碟開機,那麼需要按
<keycombo action="simul"><keycap>L1</keycap><keycap>A</keycap></keycombo>
<keycombo action="simul"><keycap>Stop</keycap><keycap>A</keycap></keycombo>
或者是透過 serial console (用法請參閱 &man.tip.1; 或 &man.cu.1;
內有關 <command>~#</command> 的說明) 送出 <command>BREAK</command>
指令來進入 PROM prompt。 大概會像下面:</para>
<screenco>
<areaspec>
<area id="prompt-single" coords="1 5">
<area id="prompt-smp" coords="2 5">
</areaspec>
<screen><prompt>ok </prompt>
<prompt>ok {0} </prompt></screen>
<calloutlist>
<callout arearefs="prompt-single">
<para>這是適用於只有單一 CPU 的機器。</para>
</callout>
<callout arearefs="prompt-smp">
<para>這是適用於 SMP 機器,數字部分是指目前在使用中的 CPU
編號。</para>
</callout>
</calloutlist>
</screenco>
<para>此時請把安裝光碟放入光碟機內,然後在 PROM prompt 打
<command>boot cdrom</command> 即可。</para>
</sect3>
</sect2>
<sect2 id="view-probe">
<title>那要怎麼去翻閱偵測硬體的結果呢?</title>
<para>先前在螢幕上所顯示的最後幾百行字,會存在暫存區(buffer)
以便您翻閱。</para>
<para>若要翻閱暫存區,請按 <keycap>Scroll Lock</keycap> 鍵,
這會開啟捲動畫面功能。
然後就可以使用方向鍵,或是 <keycap>PageUp</keycap>、
<keycap>PageDown</keycap> 鍵來上下翻閱。
再按一次 <keycap>Scroll Lock</keycap> 鍵,就會停止畫面捲動。</para>
<para>現在就請試試看,翻閱一下偵測硬體的畫面吧,
你應該會看到類似 <xref linkend="install-dev-probe"> 的畫面,
真正畫面會依你的電腦設備而有所不同。</para>
<figure id="install-dev-probe">
<title>偵測硬體的例子</title>
<screen>avail memory = 253050880 (247120K bytes)
Preloaded elf kernel "kernel" at 0xc0817000.
Preloaded mfs_root "/mfsroot" at 0xc0817084.
md0: Preloaded image &lt;/mfsroot&gt; 4423680 bytes at 0xc03ddcd4
md1: Malloc disk
Using $PIR table, 4 entries at 0xc00fde60
npx0: &lt;math processor&gt; on motherboard
npx0: INT 16 interface
pcib0: &lt;Host to PCI bridge&gt; on motherboard
pci0: &lt;PCI bus&gt; on pcib0
pcib1:&lt;VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge&gt; at device 1.0 on pci0
pci1: &lt;PCI bus&gt; on pcib1
pci1: &lt;Matrox MGA G200 AGP graphics accelerator&gt; at 0.0 irq 11
isab0: &lt;VIA 82C586 PCI-ISA bridge&gt; at device 7.0 on pci0
isa0: &lt;iSA bus&gt; on isab0
atapci0: &lt;VIA 82C586 ATA33 controller&gt; port 0xe000-0xe00f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0 &lt;VIA 83C572 USB controller&gt; port 0xe400-0xe41f irq 10 at device 7.2 on pci
0
usb0: &lt;VIA 83572 USB controller&gt; on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr1
uhub0: 2 ports with 2 removable, self powered
pci0: &lt;unknown card&gt; (vendor=0x1106, dev=0x3040) at 7.3
dc0: &lt;ADMtek AN985 10/100BaseTX&gt; port 0xe800-0xe8ff mem 0xdb000000-0xeb0003ff ir
q 11 at device 8.0 on pci0
dc0: Ethernet address: 00:04:5a:74:6b:b5
miibus0: &lt;MII bus&gt; on dc0
ukphy0: &lt;Generic IEEE 802.3u media interface&gt; on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ed0: &lt;NE2000 PCI Ethernet (RealTek 8029)&gt; port 0xec00-0xec1f irq 9 at device 10.
0 on pci0
ed0 address 52:54:05:de:73:1b, type NE2000 (16 bit)
isa0: too many dependant configs (8)
isa0: unexpected small tag 14
orm0: &lt;Option ROM&gt; at iomem 0xc0000-0xc7fff on isa0
fdc0: &lt;NEC 72065B or clone&gt; at port 0x3f0-0x3f5,0x3f7 irq 6 drq2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: &lt;1440-KB 3.5" drive&gt; on fdc0 drive 0
atkbdc0: &lt;Keyboard controller (i8042)&gt; at port 0x60,0x64 on isa0
atkbd0: &lt;AT Keyboard&gt; flags 0x1 irq1 on atkbdc0
kbd0 at atkbd0
psm0: &lt;PS/2 Mouse&gt; irq 12 on atkbdc0
psm0: model Generic PS/@ mouse, device ID 0
vga0: &lt;Generic ISA VGA&gt; at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: &lt;System console&gt; at flags 0x100 on isa0
sc0: VGA &lt;16 virtual consoles, flags=0x300&gt;
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: &lt;Parallel port&gt; at port 0x378-0x37f irq 7 on isa0
pppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/15 bytes threshold
plip0: &lt;PLIP network interface&gt; on ppbus0
ad0: 8063MB &lt;IBM-DHEA-38451&gt; [16383/16/63] at ata0-master UDMA33
acd0: CD-RW &lt;LITE-ON LTR-1210B&gt; at ata1-slave PIO4
Mounting root from ufs:/dev/md0c
/stand/sysinstall running as init on vty0</screen>
</figure>
<para>請仔細檢查每項檢測結果,以確定 FreeBSD 有正確偵測到每項硬體。
若沒偵測到硬體的話,那畫面就不會列出來了。 <link
linkend="kernelconfig">自訂 kernel</link> 可以讓您加上原本預設的
<filename>GENERIC</filename> kernel 所不支援的硬體,像是音效卡之類。
</para>
<para>而 &os;&nbsp;6.2 起的版本,在偵測硬體後會看到 <xref
linkend="config-country">,請用方向鍵選擇你的國別、地區或群組。
然後按 <keycap>Enter</keycap> 鍵就會幫你設定相關國別、鍵盤對應。
此外,要離開、重啟 <application>sysinstall</application>
程式,也很簡單。</para>
<figure id="config-country">
<title>選擇國別</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/config-country" format="PNG">
</imageobject>
</mediaobject>
</figure>
<figure id="sysinstall-exit">
<title>離開 Sysinstall 程式</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/sysinstall-exit" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>在主畫面選擇 <guimenuitem>Exit Install</guimenuitem>
接下來應該會出現以下訊息:</para>
<screen> User Confirmation Requested
Are you sure you wish to exit? The system will reboot
(be sure to remove any floppies/CDs/DVDs from the drives).
[ Yes ] No</screen>
<para>若按下 &gui.yes; 之後,卻忘了把光碟退出來的話,
那麼等下重開機後又會再次啟動安裝程式了。</para>
<para>若你是用磁片開機的話,那麼重開機之前,請記得先退出
<filename>boot.flp</filename> 片吧。</para>
</sect2>
</sect1>
<sect1 id="using-sysinstall">
<title>介紹 Sysinstall</title>
<para><application>sysinstall</application>
是 FreeBSD 計劃所提供的安裝程式。
它是以文字模式操作方式為主,分為幾層選單、畫面,以讓您進行安裝。</para>
<para><application>sysinstall</application> 選單主要由方向鍵、
<keycap>Enter</keycap>、<keycap>Tab</keycap>、<keycap>Space</keycap>
以及其他按鍵來進行操作,
在 <application>sysinstall</application> 主畫面的 Usage
內有這些鍵盤操作上的說明。</para>
<para>要查閱這些說明,請將游標移到
<guimenuitem>Usage</guimenuitem>,然後選
<guibutton>[Select]</guibutton> ,這時你畫面應該會長像 <xref
linkend="sysinstall-main3">,接著請按 <keycap>Enter</keycap> 鍵。</para>
<para>接下來,會出現安裝的使用說明,閱讀完畢請按
<keycap>Enter</keycap> 以跳回主畫面。</para>
<figure id="sysinstall-main3">
<title>選擇 Sysinstall 主畫面的『Usage(快速說明)』</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/main1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<sect2 id="select-doc">
<title>選擇『 Documentation(說明文件)』選單</title>
<para>在主畫面用方向鍵選擇 <guimenuitem>Doc</guimenuitem>,然後按
<keycap>Enter</keycap> 鍵。</para>
<figure id="main-doc">
<title>選擇『Documentation(說明文件)』選單</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/main-doc" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>這時會出現說明文件的選單。</para>
<figure id="docmenu1">
<title>Sysinstall 的說明文件(Documentation)選單</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/docmenu1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>閱讀這些說明文件很重要。</para>
<para>要閱讀文件的話,請用方向鍵選取要閱讀的文件然後按
<keycap>Enter</keycap> 鍵。讀完後,再按一次
<keycap>Enter</keycap> 鍵就會回到說明文件畫面了。</para>
<para>若要回到主畫面,用方向鍵選擇
<guimenuitem>Exit</guimenuitem> 然後按下
<keycap>Enter</keycap> 鍵即可。</para>
</sect2>
<sect2 id="keymap">
<title>選擇『鍵盤對應』選單</title>
<para>如果要改變鍵盤按鍵的對應模式,請在主選單選取
<guimenuitem>Keymap</guimenuitem> 然後按
<keycap>Enter</keycap> 鍵即可。 一般情況下是不用去改,
除非你用的鍵盤不是一般標準或非美式鍵盤。</para>
<figure id="sysinstall-keymap">
<title>Sysinstall 主選單</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/main-keymap" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>您可以使用上下鍵移動到您想使用的鍵盤對應方式,然後按下
<keycap>Space</keycap> 鍵以選取它;再按一下
<keycap>Space</keycap> 鍵可以取消選取。當您完成後,請選擇
&gui.ok; 然後按
<keycap>Enter</keycap> 鍵即可。</para>
<para>在這個畫面顯示的只是其中一小部分;
若只要用預設鍵盤對應方式就好的話,可以用 <keycap>Tab</keycap>
來選 &gui.cancel; 這樣就會返回主畫面。</para>
<figure id="sysinstall-keymap-menu">
<title>Sysinstall 鍵盤對應選單</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/keymap" format="PNG">
</imageobject>
</mediaobject>
</figure>
</sect2>
<sect2 id="viewsetoptions">
<title>安裝選項的設定畫面</title>
<para>請選 <guimenuitem>Options</guimenuitem> 然後按
<keycap>Enter</keycap> 鍵。</para>
<figure id="sysinstall-options">
<title>Sysinstall 主選單</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/main-options" format="PNG">
</imageobject>
</mediaobject>
</figure>
<figure id="options">
<title>Sysinstall 選項設定</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/options" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>通常,使用者大多用預設值就可以了,而不用修改它們。
而 Release Name 的地方則依你所安裝的版本而有所不同。</para>
<para>而目前所選的的項目,會在畫面下方以藍底白字顯示說明。
注意:其中右邊最後的選項是
<guimenuitem>Use Defaults(使用預設值)</guimenuitem>
,您可以藉由此選項將所有的設定還原為預設值。</para>
<para>另外,可以按 <keycap>F1</keycap> 鍵來閱讀各選項的說明。</para>
<para>而按 <keycap>Q</keycap> 鍵則是可以回到主畫面。</para>
</sect2>
<sect2 id="start-install">
<title>開始進行標準安裝</title>
<para><guimenuitem>Standard(標準)</guimenuitem>安裝適用於那些初探 &unix;
或 FreeBSD 的使用者。用方向鍵選擇 <guimenuitem>Standard</guimenuitem>
然後按 <keycap>Enter</keycap> 鍵即可開始進入標準安裝。</para>
<figure id="sysinstall-standard">
<title>開始進行標準安裝</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/main-std" format="PNG">
</imageobject>
</mediaobject>
</figure>
</sect2>
</sect1>
<sect1 id="install-steps">
<title>硬碟空間的分配</title>
<para>您的第一個任務就是要決定分配給 FreeBSD 用的磁碟空間、label
以便 <application>sysinstall</application> 幫你做相關準備動作。
因此,你必須先對 FreeBSD 是如何確認磁碟的流程有個概念。</para>
<sect2 id="install-drive-bios-numbering">
<title>BIOS 磁碟機編號</title>
<para>在安裝、設定 FreeBSD 之前,有很重要的一點必須注意,
尤其當您有許多顆硬碟的時候。</para>
<indexterm><primary>DOS</primary></indexterm>
<indexterm><primary>Microsoft Windows</primary></indexterm>
<para>在 PC 架構,當您跑像 &ms-dos; 或 &microsoft.windows;
這種跟 BIOS 設定相關的作業系統,
BIOS 那邊可以調整正常的磁碟機順序,然後這些作業系統會跟著 BIOS 做改變。
這讓使用者不一定非得要由所謂的 <quote>primary master</quote> 硬碟開機。
有人發現最簡單、便宜的備份系統方式,就是再去買一顆一模一樣的硬碟,
然後定期使用 <application>
<trademark class="registered">Ghost</trademark></application> 或
<application>XCOPY</application>
以將資料從第一顆硬碟複製到第二顆硬碟上面去。
所以,當第一顆硬碟掛了(可能是病毒或壞軌造成的)
就可以輕鬆透過調整 BIOS 中的開機順序,
而直接用第二顆硬碟開機。
這跟將機殼拆開,把第二顆硬碟跟第一顆對調(要調 jumper)有同樣的效果,
差別就是:不用拆機殼。</para>
<indexterm><primary>SCSI</primary></indexterm>
<indexterm><primary>BIOS</primary></indexterm>
<para>此外,若裝有比較貴的 SCSI 卡系統,通常本身也有 BIOS 的功能來讓
SCSI 設備(最多可到 7 個)達到類似改變順序的功能。</para>
<para>習慣上述方式的使用者很可能會感到驚訝,因為在 FreeBSD 中並非如此,
FreeBSD 不會參考 BIOS 設定值,而且也不能偵測 <quote>logical BIOS
drive mapping</quote> 設定。 這會讓人感覺很疑惑,明明就是一樣的硬碟,
而且資料也完全從另一顆複製過來,結果卻沒辦法像以前那樣用。</para>
<para>使用 FreeBSD 的時候,請將 BIOS 中的硬碟開機順序調回原本正常的順序,
並且以後不要再改這設定。如果您需要切換硬碟順序的話,那請用硬體方式,
直接打開機殼,調 jumper 及排線即可。</para>
<sidebar>
<title>一段小故事Bill 及 Fred 的安裝歷險</title>
<para>比爾(Bill)打算幫佛列德(Fred)把舊的 Wintel 機器灌 FreeBSD。
他在一顆 SCSI 硬碟(ID 是 0)裝上 FreeBSD。</para>
<para>於是佛列德開始用他新的 FreeBSD 系統;但是過了幾天,他發現這顆
SCSI 老硬碟發生許多小問題。 之後,他就跟比爾說起這件事。</para>
<para>此事經過幾天後,比爾決定是該解決問題的時候了,
所以他從後面房間的硬碟 <quote>收藏區</quote>
內拿出一個一模一樣的硬碟,並且經過初步 surface 掃瞄測試後,
顯示這顆硬碟還可堪用,因此,比爾將它的 ID 調成 4
然後安裝到佛列德的機器,
並且將資料從磁碟 0 複製到磁碟 4。
現在新硬碟裝好了,而且看起來好像一切正常;
所以,比爾認為現在應該可以開始用它了。
於是到 SCSI BIOS 中設定 SCSI ID 4 為開機碟,
用磁碟 4 重新開機後FreeBSD 一切跑得很順利。</para>
<para>佛列德繼續用了幾天後,比爾跟佛列德決定要來玩點新的:
試著升級 FreeBSD 看看。
比爾將 ID 0 的硬碟移除(因為有問題)並且又從 <quote>收藏區</quote>
中拿了一顆一樣的硬碟來。
然後他用佛列德的開機磁片透過 FTP 方式將在這顆硬碟上裝了新版的
FreeBSD安裝過程都很順利。</para>
<para>佛列德用了這新版本幾天後,覺得它很適合用在工程部門...
是時候將以前放在舊系統的工作資料複製過來了。
因此,佛列德將 ID 4 的 SCSI 硬碟
(裡面有放從舊系統中複製過來的最新資料)先 mount 起來,
結果竟然發現在 ID 4 的硬碟上,他以前的所有資料都不見了!</para>
<para>奇怪,資料到底是跑到哪裡去了呢?</para>
<para>原來,當初比爾將 ID 0 硬碟的資料複製到 ID 4 硬碟的時候,
ID 4 就變成 <quote>新的複製品(new clone)</quote>。
而當他調 SCSI BIOS 設定 ID 4 為開機碟,想讓系統從 ID 4 開機,
這步驟其實只是他自己搞混了,
因為大部分的作業系統可以藉由調 BIOS 設定以改變開機順序,
但是 FreeBSD 卻會把開機順序還原成正常的模式,
因此,佛列德的 FreeBSD 還是從最初的那顆 ID 0 硬碟開機的。
事實上,所有的資料都還在故事最初的那顆硬碟上,
而不是在他想像中的 ID 4 硬碟。</para>
<para>我們很高興在發現這件事時,那些資料都還在,
我們把資料從最初的那顆 ID 0 硬碟取出來並交還給佛列德
(而且比爾也從此瞭解了 0 的重要....)。</para>
<para>雖然我們這邊的例子是用 SCSI 硬碟,
但是相同的觀念也可以套用在 IDE 硬碟上。</para>
</sidebar>
</sect2>
<sect2 id="main-fdisk">
<title>以 FDisk 來建立分割磁區(Slices)</title>
<note>
<para>在這時候您所做的變更都還不會真正寫入硬碟中。
如果你發現弄錯了,想要重來一遍的話,
可以用選單來離開 <application>sysinstall</application>
或是按 <keycap>U</keycap> 鍵來
<guimenuitem>Undo(回復)</guimenuitem> 所有設定。
如果你弄亂了而且不知道怎麼離開,你可以直接將電腦電源關掉再重來。
</para>
</note>
<para>在 <application>sysinstall</application> 主畫面選擇使用標準安裝後,
應該會看到下面的訊息:</para>
<screen> Message
In the next menu, you will need to set up a DOS-style ("fdisk")
partitioning scheme for your hard disk. If you simply wish to devote
all disk space to FreeBSD (overwriting anything else that might be on
the disk(s) selected) then use the (A)ll command to select the default
partitioning scheme followed by a (Q)uit. If you wish to allocate only
free space to FreeBSD, move to a partition marked "unused" and use the
(C)reate command.
[ OK ]
[ Press enter or space ]</screen>
<para>這時請依畫面說明,按 <keycap>Enter</keycap> 鍵。
然後會看到一個列表,上面會列出所有在偵測硬體時所找到的硬碟。
<xref linkend="sysinstall-fdisk-drive1"> 範例顯示的是有找到兩個
IDE 磁碟機的情形,這兩個磁碟機分別為:
<devicename>ad0</devicename> 與 <devicename>ad2</devicename>。</para>
<figure id="sysinstall-fdisk-drive1">
<title>選擇 FDisk 要分割的硬碟</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/fdisk-drive1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>你可能會好奇,為何 <devicename>ad1</devicename> 沒列在這裡。
為什麼會不見了呢?</para>
<para>試想,如果您有兩顆 IDE 硬碟,一個是 primary master一個是 secondary
master這樣會發生什麼事呢 如果 FreeBSD 依照找到的順序來為他們命名,
比如首先是 <devicename>ad0</devicename> 再來是
<devicename>ad1</devicename> 那麼就不會出現困擾。</para>
<para>但是,現在問題來了。如果您現在想在 primary slave 加裝第三顆硬碟,
那麼這顆硬碟的名稱就會是 <devicename>ad1</devicename>,之前原本的
<devicename>ad1</devicename> 就會變成 <devicename>ad2</devicename>。
這樣會造成什麼問題呢? 因為硬體設備的名稱(像是
<devicename>ad1s1a</devicename>)是用來尋找檔案系統的,
因此您可能會突然發現,有些檔案系統從此無法正常顯示,
必須修改 FreeBSD 設定(<filename>/etc/fstab</filename>)才可以正確顯示。
</para>
<para>為了解決這個問題,在設定 kernel 時可以採用 IDE
硬碟所在的位置來命名,而非根據找到的順序。 使用這種方式的話,
在 secondary master 的 IDE
硬碟就<emphasis>永遠</emphasis>會是 <devicename>ad2</devicename>
即使系統中並沒有 <devicename>ad0</devicename> 或
<devicename>ad1</devicename> 也不受影響。</para>
<para>由於此為 FreeBSD kernel 預設設定,也就是為何上述畫面只顯示
<devicename>ad0</devicename> 及 <devicename>ad2</devicename> 之故。
畫面上這台機器的兩顆硬碟是分別裝在 primary 以及 secondary 排線上的
master這兩顆都沒有裝在 slave 上。</para>
<para>請選好想安裝 FreeBSD 的硬碟,然後按下 &gui.ok;。 接著就會開始
<application>FDisk</application>,然後會看到類似 <xref
linkend="sysinstall-fdisk1"> 的畫面。</para>
<para><application>FDisk</application> 的顯示畫面分為三個部分。</para>
<para>第一部份是畫面最上方的前兩行,這裡會顯示目前所選的硬碟資訊,
包括它在 FreeBSD 的名稱、硬碟 geometry、硬碟總容量。</para>
<para>第二部分會顯示目前所選的硬碟上有哪些 slice 以及各 slice 的起末位置、
所佔容量、FreeBSD 名稱、描述說明、子類別(sub-type)。 例子中顯示出有 2
個小的並且尚未使用的 slice這是受到 PC 的硬碟本身架構影響之故。 此外,
還有一個大的 <acronym>FAT</acronym> slice(通常是 &ms-dos; /
&windows; 中的 <devicename>C:</devicename>),以及一個延伸磁碟分割區
(在 &ms-dos; / &windows; 內的其他磁碟代號)。</para>
<para>第三部分則顯示 <application>FDisk</application> 可用的指令。</para>
<figure id="sysinstall-fdisk1">
<title>(舉例)未編輯前的 Fdisk 分割區(Partition)</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/fdisk-edit1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>接下來要做的事,跟您要怎麼分割硬碟有關。</para>
<para>若要讓 FreeBSD 使用整顆硬碟(稍後的安裝會再要您確認以
<application>sysinstall</application> 來繼續安裝,
就會清除該硬碟內上的資料),那麼就可以按 <keycap>A</keycap> 鍵(
<guimenuitem>Use Entire Disk</guimenuitem>),以刪除所有既存的 slice
取而代之的是一個小的並標示為 <literal>unused</literal>(同樣的,這也是
PC 硬碟架構所造成)的 slice以及一個大的 FreeBSD slice。 之後,
請用方向鍵把光棒移至該 FreeBSD slice然後按 <keycap>S</keycap>
鍵以便將此 slice 標為開機 slice。
此時的畫面應該類似 <xref linkend="sysinstall-fdisk2">。 請注意:
在 <literal>Flags</literal> 欄位的 <literal>A</literal> 值表示該 slice
屬於 <emphasis>active</emphasis>,也會由此 slice 來開機。</para>
<para>若要刪除現有 slice 以挪出空間給 FreeBSD 使用,可以把光棒移到要刪除的
slice 後按 <keycap>D</keycap> 鍵,然後再按 <keycap>C</keycap> 鍵,
此時會出現對話框,請輸入要新增的 slice 大小為何,輸入合適大小之後按
<keycap>Enter</keycap> 鍵即可。 該預設值為可分配空間的最大值,
可以是最大的或尚未分配的整顆硬碟大小。</para>
<para>若已建立完畢給 FreeBSD 的空間(透過類似
<application>&partitionmagic;</application> 之類的工具),那麼可以按
<keycap>C</keycap> 鍵以新增 slice。同樣也會有對話框出現來問想要新增的
slice 大小為何。</para>
<figure id="sysinstall-fdisk2">
<title>Fdisk 採用整顆硬碟作分割區(Partition)</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/fdisk-edit2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>完畢後請按 <keycap>Q</keycap> 鍵。 這些更改會暫存給
<application>sysinstall</application> 使用,但還不會真正寫入到硬碟
。</para>
</sect2>
<sect2 id="bootmgr">
<title>安裝 Boot Manager</title>
<para>現在可以選擇是否要裝 boot manager。 一般而言,
遇到下列情況才會需要裝 boot manager</para>
<itemizedlist>
<listitem>
<para>有一個以上的硬碟,而 FreeBSD 並非裝在第一個硬碟上。</para>
</listitem>
<listitem>
<para>同一顆硬碟上除了有裝 FreeBSD 之外,還有裝其他作業系統,
所以需要在開機時選擇要進入哪個作業系統。</para>
</listitem>
</itemizedlist>
<para>若只裝 FreeBSD並且是裝在第一顆硬碟那麼選
<guimenuitem>Standard</guimenuitem> 即可。 若已經有使用其他的
boot manager 可開機進入 FreeBSD 那麼請選 <guimenuitem>None</guimenuitem>
即可。</para>
<para>請依自身需求與情況做抉擇,然後按 <keycap>Enter</keycap> 鍵。</para>
<figure id="sysinstall-bootmgr">
<title>Sysinstall 的 Boot Manager 選單</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/boot-mgr" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>按 <keycap>F1</keycap> 會有不同作業系統共存時,
有可能遇到的相關問題說明。</para>
</sect2>
<sect2>
<title>在其他硬碟上建立分割磁區(Slices)</title>
<para>若有一個以上的硬碟,那麼在選完 boot manager
之後會再回到選擇硬碟的畫面。 若要把 FreeBSD 裝在多個硬碟上,
那麼可以在此選擇其他硬碟,並重複使用 <application>FDisk</application>
來建立 slice 。</para>
<important>
<para>若第一顆硬碟不是裝 FreeBSD 的話,那麼每一顆就要都裝 FreeBSD boot
manager 才可以。</para>
</important>
<figure id="sysinstall-fdisk-drive2">
<title>離開『選擇硬碟』畫面</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/fdisk-drive2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para><keycap>Tab</keycap> 鍵可以在最後選擇的硬碟以及 &gui.ok;、
&gui.cancel; 之間進行切換。</para>
<para>先按一次 <keycap>Tab</keycap> 會先移到 &gui.ok;,然後再按
<keycap>Enter</keycap> 鍵以繼續安裝。</para>
</sect2>
<sect2 id="bsdlabeleditor">
<title>以 <application>Disklabel</application> 來建立分割區(Partitions)
</title>
<para>現在必須在剛建立好的 slice 規劃一些分割區。 請注意:
每個分割區的代號是從 <literal>a</literal> 到 <literal>h</literal>
此外 <literal>b</literal>、<literal>c</literal>、<literal>d</literal>
通常是特殊用途,不該隨意變動。</para>
<para>有些程式可以透過特殊的分割方式而達到更好的效果,
尤其是分割區是分散在不同硬碟上的時候。 但是,現在是您第一次裝 FreeBSD
所以請不要去煩惱該如何分割硬碟才好。 最重要的是,裝好 FreeBSD
然後學習如何善用之。 當對 FreeBSD 有一定程度的熟悉之後,可以隨時重裝
FreeBSD並改變分割的方式。</para>
<para>下面例子有四個分割區 &mdash; 其中一個是 swap 空間i
其他三個是檔案系統。</para>
<table frame="none" pgwide="1">
<title>第一顆硬碟的分割區(Partition)配置</title>
<tgroup cols="4">
<colspec colwidth="1*">
<colspec colwidth="1*">
<colspec colwidth="1*">
<colspec colwidth="4*">
<thead>
<row>
<entry>分割區</entry>
<entry>檔案系統</entry>
<entry>大小</entry>
<entry>介紹</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>a</literal></entry>
<entry><filename>/</filename></entry>
<entry>128&nbsp;MB</entry>
<entry>此為根目錄檔案系統(root filesystem)。
其他的檔案系統都會掛載在根目錄之下。 128&nbsp;MB
對於此檔案系統來說是相當合理的大小,
因為通常這裡並不會放太多資料,而在 FreeBSD 裝完後會用到約
40&nbsp;MB 的根目錄空間。 剩下的空間是放臨時資料用的,
此外也應該要預留一些空間,因為日後的 FreeBSD
版本可能會需要更多的 <filename>/</filename>(根目錄) 空間
。</entry>
</row>
<row>
<entry><literal>b</literal></entry>
<entry>N/A</entry>
<entry>RAM 的 2~3 倍</entry>
<entry><para>系統的 swap 空間是放在 <literal>b</literal> 分割區。
如何選擇適合的 swap 空間大小可是一門學問。 一般來說,
swap 空間應該是記憶體(RAM)大小的 2 或 3 倍。 此外swap
至少需要 64&nbsp;MB因此若 RAM 小於 32&nbsp;MB 的話,請把
swap 大小設為 64&nbsp;MB。</para><para>
若有一個以上的硬碟,則可以在每個硬碟都配置 swap 空間。
FreeBSD 會善用每個硬碟上的 swap 空間,如此一來便能有效提高
swap 的性能。 若您屬這類情況,請先算出總共需要的 swap 總大小
(比如128&nbsp;MB),然後除以全部的硬碟數量(比如:兩顆硬碟)
這樣算出來的結果就是每個硬碟上所需配置的 swap 大小,
在這個例子中,則每個硬碟所需之 swap 空間為 64&nbsp;MB
。</para></entry>
</row>
<row>
<entry><literal>e</literal></entry>
<entry><filename>/var</filename></entry>
<entry>256&nbsp;MB</entry>
<entry><filename>/var</filename> 目錄會放的檔案有很多種,像是 log
檔案以及其他的系統管理檔案。 這些檔案大部分都是 FreeBSD
每日運作所會讀、寫。 把這些檔案另外放到專門的檔案系統(即
<filename>/var</filename>) 則可以最佳化這些檔案的存取,
而不致於影響其他目錄的存取。</entry>
</row>
<row>
<entry><literal>f</literal></entry>
<entry><filename>/usr</filename></entry>
<entry>剩餘的硬碟空間</entry>
<entry>所有其他檔案通常會存在 <filename>/usr</filename>
及其子目錄內。</entry>
</row>
</tbody>
</tgroup>
</table>
<para>若要把 FreeBSD 裝在多個硬碟上,那麼必須在您所配置的其他 slice
上新增分割區。 最簡單的方式,就是在每個硬碟上建立分割區,一個給 swap
空間,另一個則是檔案系統。</para>
<table frame="none" pgwide="1">
<title>其他硬碟的分割區(Partition)配置</title>
<tgroup cols="4">
<colspec colwidth="1*">
<colspec colwidth="1*">
<colspec colwidth="2*">
<colspec colwidth="3*">
<thead>
<row>
<entry>分割區</entry>
<entry>檔案系統</entry>
<entry>大小</entry>
<entry>介紹</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>b</literal></entry>
<entry>N/A</entry>
<entry>請參閱右側的介紹</entry>
<entry>前面有提過swap 空間是可以跨各硬碟。 即使沒有使用
<literal>a</literal> 分割區,但習慣上還是會把 swap 空間設為
<literal>b</literal> 分割區。</entry>
</row>
<row>
<entry><literal>e</literal></entry>
<entry>/disk<replaceable>n</replaceable></entry>
<entry>剩餘的硬碟空間</entry>
<entry>剩下的空間是一個大的分割區,最簡單的做法是將之規劃為
<literal>a</literal> 分割區,而不是 <literal>e</literal>
分割區。 然而,習慣上 <literal>a</literal> 分割區是保留給
根目錄(<filename>/</filename>)所使用的。 當然,
您不一定要遵循此習慣,但 <application>sysinstall</application>
本身會,所以照它既有的方式會讓你安裝更加清爽、潔淨。
你可以把這些檔案系統掛載在任何地方,本範例是建議把它們掛載於
<filename>/disk<replaceable>n</replaceable></filename> 目錄,
其中的 <replaceable>n</replaceable> 的數字,
則依各硬碟的順序而有所變化。 但若您高興,
也可以把它們掛載於其他地方。</entry>
</row>
</tbody>
</tgroup>
</table>
<para>完成分割區配置之後,就可以用 <application>sysinstall</application>
來建立之。 您會看到如下訊息:</para>
<screen> Message
Now, you need to create BSD partitions inside of the fdisk
partition(s) just created. If you have a reasonable amount of disk
space (200MB or more) and don't have any special requirements, simply
use the (A)uto command to allocate space automatically. If you have
more specific needs or just don't care for the layout chosen by
(A)uto, press F1 for more information on manual layout.
[ OK ]
[ Press enter or space ]</screen>
<para>請按 <keycap>Enter</keycap> 鍵以進入 FreeBSD 分割區編輯器,叫做
<application>Disklabel</application>。</para>
<para><xref linkend="sysinstall-label"> 顯示第一次執行
<application>Disklabel</application> 的畫面,
這畫面可區分為三個區塊。</para>
<para>前幾行顯示的是正在編輯的硬碟,以及目前正在建立的 slice 位於哪個
分割區上。(在此處,<application>Disklabel</application> 是使用
<literal>Partition name</literal>(分割區名稱),而非 slice 名稱)。
此畫面也會顯示目前 slice 還有多少空間可供使用,
換句話說就是尚未指定分割區的多餘空間。</para>
<para>在畫面中間,則顯示已建立的分割區、每個分割區的檔案系統名稱、
所佔大小,以及一些參數。</para>
<para>在畫面下方,則顯示 <application>Disklabel</application>
可用的按鍵。</para>
<figure id="sysinstall-label">
<title>Sysinstall 的 Disklabel 編輯器</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-ed1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para><application>Disklabel</application> 可自動分配分割區,
並賦予預設值大小,按 <keycap>A</keycap> 即可自動完成。 您會看到類似
<xref linkend="sysinstall-label2"> 的畫面。 不過,
由於所用的硬碟大小不一,所以自動分配所設定的大小不一定合用,不要緊,
您不一定得使用預設大小才可以。</para>
<note>
<para>預設會給 <filename>/tmp</filename> 目錄作為獨立分割區,
而非附屬於 <filename>/</filename> 之下。 如此一來,
可避免 <filename>/</filename> 會被一堆臨時檔案塞爆。</para>
</note>
<figure id="sysinstall-label2">
<title>Sysinstall 的 Disklabel 編輯器 — 使用自動分配</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-auto" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>如果您不想用自動分配分割區而希望自行設定,
請用方向鍵選擇第一個分割區,並按下 <keycap>D</keycap> 刪除之。
重複此動作直到刪除所有分割區。</para>
<para>建立第一個分割區(<literal>a</literal>,掛載為
<filename>/</filename> &mdash; 根目錄)
請在畫面最上方選擇正確的磁碟分割磁區(slice)並按下
<keycap>C</keycap>。 接下來將出現對話框,
會要求輸入新的分割區大小(如 <xref linkend="sysinstall-label-add"> 所示)
。 這邊可以直接輸入以 block 為單位,
或者是以 <literal>M</literal>(MB)為單位、
或以 <literal>G</literal>(GB)為單位,
或者以 <literal>C</literal>(磁柱cylinders) 為單位。</para>
<note><para>自 FreeBSD&nbsp;5.X 起,則可使用
<literal>Custom Newfs</literal> 選項來用 <acronym>UFS2</acronym>
(從 &os;&nbsp;5.1 起,此即為預設值)。 若是使用
<literal>Auto Defaults</literal> 自動預設的情況下,則可以再用
<literal>Custom Newfs</literal> 選項,或者在建立檔案系統時指定
<option>-O 2</option> 參數亦可。 若用 <literal>Custom Newfs</literal>
選項的話,則別忘了要加上 <option>-U</option> 來啟用 SoftUpdates
功能! </para></note>
<figure id="sysinstall-label-add">
<title>根目錄的空間分配</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>此處預設顯示的大小,會是整個 slice 的所有空間。
若要採用先前例子所介紹的劃分大小,則按 <keycap>Backspace</keycap>
鍵來消除這些數字,並輸入例子中的 <userinput>128M</userinput>,如
<xref linkend="sysinstall-label-add2"> 所示。
接著按下 &gui.ok;。</para>
<figure id="sysinstall-label-add2">
<title>修改根目錄的空間分配</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>在輸入之後會問所要建立的是檔案系統(file system)或者是 swap 空間,
如 <xref linkend="sysinstall-label-type"> 所示。
第一個選項為檔案系統,所以選擇 <guimenuitem>FS</guimenuitem>
後按下<keycap>Enter</keycap>。</para>
<figure id="sysinstall-label-type">
<title>選擇分割區的類型</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-fs" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>最後,因為要新增的是檔案系統,所以必須告訴
<application>Disklabel</application> 要將其掛載至何處。 如 <xref
linkend="sysinstall-label-mount"> 所示。 根目錄檔案系統
的掛載點為 <filename>/</filename>,所以請輸入 <userinput>/</userinput>
,然後按下 <keycap>Enter</keycap>。</para>
<figure id="sysinstall-label-mount">
<title>選擇根目錄的掛載點</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root3" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>剛所建立的分割區會顯示在畫面上,可以用上述類似動作來建立其他分割區。
然而在建立 swap 分割區時,系統並不會問要掛載於哪邊,因為 swap
空間是不必額外掛載的。 此外在建立最後分割區 <filename>/usr</filename>
時,可以直接採用預設大小,也就是該 slice 剩餘的所有空間。</para>
<para>最後 FreeBSD 上的 DiskLabel 編輯器畫面會類似 <xref
linkend="sysinstall-label4">,實際數字則依安裝選擇而有所不同。
請按下 <keycap>Q</keycap> 即可完成分割區規劃。</para>
<figure id="sysinstall-label4">
<title>Sysinstall Disklabel 編輯器</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-ed2" format="PNG">
</imageobject>
</mediaobject>
</figure>
</sect2>
</sect1>
<sect1 id="install-choosing">
<title>選擇想要安裝的</title>
<sect2 id="distset">
<title>選擇要安裝的套件集(Distribution Set)</title>
<para>要裝哪些套件,主要取決於該系統的用途為何及磁碟空間而定。
預置的套件,從最小安裝到完整安裝都有。 若是 &unix; 或 FreeBSD
新手,通常直接選其中之一即可。
而自訂套件比較適合有經驗的人來用。</para>
<para>若要瞭解各套件的選項細節資訊,請按 <keycap>F1</keycap> 鍵。
看完之後按 <keycap>Enter</keycap> 即會回到剛才的套件選擇畫面。</para>
<para>若需要 GUI 介面,那必需加選 <literal>X</literal>
開頭的相關套件。 至於 X server 的設定及要用哪一類的桌面管理,必須在
&os; 裝好之後才能進行。 X server 設定細節部分請參閱 <xref
linkend="x11">。</para>
<para>預設安裝的 X11 版本為 <application>&xorg;</application>。</para>
<para>若需要自訂 kernel那麼需加選有含 source code 的選項。
至於為何需自訂 kernel 及相關細節,請參閱
<xref linkend="kernelconfig">。</para>
<para>很明顯地,全部都裝就不用困擾需要裝什麼了。 若硬碟夠大,請以方向鍵選
<xref linkend="distribution-set1"> 圖下的 <guimenuitem>All</guimenuitem>
選項,並按下 <keycap>Enter</keycap> 即可。
若硬碟空間不夠,請依自身需求選擇安裝。 當然在安裝完畢後,
還是可以依需求再加裝其他套件。</para>
<figure id="distribution-set1">
<title>選擇要裝的套件集(Distributions)</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/dist-set" format="PNG">
</imageobject>
</mediaobject>
</figure>
</sect2>
<sect2 id="portscol">
<title>安裝 Ports Collection</title>
<para>在裝完套件集之後,接著會問是否要裝 FreeBSD Ports 套件。 Ports
套件可以讓您輕鬆安裝各種常見的軟體,它本身並不含那些軟體的原始碼,
而是一個包含如何自動下載、編譯、安裝 third-party 軟體的檔案集合。
<xref linkend="ports"> 會介紹如何使用 ports。</para>
<para>安裝程式並不會檢查是否有足夠空間來放 ports tree
所以請先確認有足夠空間。 目前 FreeBSD &rel.current; 的 FreeBSD
Ports Collection 大約需要 &ports.size; 的空間。 因此,
可以推估更新版的 FreeBSD 會需要更多的空間來裝。</para>
<screen> User Confirmation Requested
Would you like to install the FreeBSD ports collection?
This will give you ready access to over &os.numports; ported software packages,
at a cost of around &ports.size; of disk space when "clean" and possibly much
more than that if a lot of the distribution tarballs are loaded
(unless you have the extra CDs from a FreeBSD CD/DVD distribution
available and can mount it on /cdrom, in which case this is far less
of a problem).
The Ports Collection is a very valuable resource and well worth having
on your /usr partition, so it is advisable to say Yes to this option.
For more information on the Ports Collection & the latest ports,
visit:
http://www.FreeBSD.org/ports
[ Yes ] No</screen>
<para>用方向鍵選 &gui.yes; 就會裝 Ports Collection否則就選
&gui.no; 以略過。 選好後按 <keycap>Enter</keycap> 繼續,
然後會再次回到選擇套件集的畫面。</para>
<figure id="distribution-set2">
<title>確認要安裝的套件集</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/dist-set2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>若要勾選的項目都確認沒問題的話,就以方向鍵選
<guimenuitem>Exit</guimenuitem> 退出並確認 &gui.ok; 有選到然後按I
<keycap>Enter</keycap> 繼續。</para>
</sect2>
</sect1>
<sect1 id="install-media">
<title>選擇安裝來源</title>
<para>若要從 CDROM 或 DVD 安裝,用方向鍵將游標移到
<guimenuitem>Install from a FreeBSD CD/DVD</guimenuitem>,並確定
選 &gui.ok; 後按下 <keycap>Enter</keycap> 就會開始裝了。</para>
<para>若是要用其他的方式安裝的話,請選擇適當的安裝來源,
然後遵照螢幕指示進行安裝即可。</para>
<para>按 <keycap>F1</keycap> 可以顯示針對此部分(安裝來源)的線上說明。
按一下 <keycap>Enter</keycap> 就會回到『選擇安裝來源』的畫面了。</para>
<figure id="choose-media">
<title>選擇安裝來源</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/media" format="PNG">
</imageobject>
</mediaobject>
</figure>
<note>
<title>FTP 安裝模式</title>
<indexterm>
<primary>installation</primary>
<secondary>network</secondary>
<tertiary>FTP</tertiary>
</indexterm>
<para>使用 FTP 安裝的話,有分三種模式︰主動式(active)FTP、
被動式(passive)FTP 或是透過 HTTP proxy server。</para>
<variablelist>
<varlistentry>
<term>主動式 FTP<guimenuitem>從 FTP server 安裝</guimenuitem></term>
<listitem>
<para>該選項會透過 <quote>Active</quote> 模式作 FTP 傳輸動作。
這會無法穿過防火牆,但可用在那些較古早、不支援被動模式的 FTP
站。 若 FTP 連線會卡住(預設為被動模式)
那請改換主動模式看看!</para>
</listitem>
</varlistentry>
<varlistentry>
<term>被動式 FTP<guimenuitem>透過防火牆,從 FTP server
安裝</guimenuitem></term>
<listitem>
<indexterm>
<primary>FTP</primary>
<secondary>passive mode</secondary>
</indexterm>
<para>該選項會讓 <application>sysinstall</application> 全程使用
<quote>Passive(被動式)</quote> 來進行 FTP 連線,
就可以穿過只允許使用固定 TCP port 連入的防火牆。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>透過 HTTP proxy 的 FTP<guimenuitem>透過 http proxy 來從 FTP
站安裝</guimenuitem></term>
<listitem>
<indexterm>
<primary>FTP</primary>
<secondary>via a HTTP proxy</secondary>
</indexterm>
<para>該選項會讓 <application>sysinstall</application> 的 FTP 連線,
先透過 HTTP 協定(就像網頁瀏覽器一樣)連到 proxy server而 proxy
server 會解譯送過來的的請求,然後轉送給 FTP server。
這可以穿透只允許 HTTP 連線但不允許 FTP 連線的防火牆。
但記得要用之時,必須指定 proxy server 的位址。</para>
</listitem>
</varlistentry>
</variablelist>
<para>對 proxy FTP server 而言,通常要在登入用的帳號名稱後面,
加上 <quote>@</quote> 符號再加上要登入的 server 名稱。 然後,
proxy server 就會 <quote>fakes(偽裝)</quote> 為真的 server 樣子。
舉個例子,若要到 <hostid role="fqdn">ftp.FreeBSD.org</hostid> 來裝,
但中間透過 proxy FTP server 也就是
<hostid role="fqdn">foo.example.com</hostid> 並且使用 port 1234。</para>
<para>在此情況下,可以到 options 選單,將 FTP username 設為
<literal>ftp@ftp.FreeBSD.org</literal>,密碼則設為自己的 email 信箱。
安裝來源部分,則使用 FTP (或 proxy 有支援的話,就用 passive FTP)
而 URL 則用
<literal>ftp://foo.example.com:1234/pub/FreeBSD</literal>。</para>
<para>因為 <hostid role="fqdn">ftp.FreeBSD.org</hostid> 的
<filename>/pub/FreeBSD</filename> 會被 porxy 到
<hostid role="fqdn">foo.example.com</hostid>,所以就可以從
<hostid role="fqdn">foo.example.com</hostid> <emphasis>這台</emphasis>
機器(這台會從 <hostid role="fqdn">ftp.FreeBSD.org</hostid> 抓檔回來給您)
安裝。</para>
</note>
</sect1>
<sect1 id="install-final-warning">
<title>開始進行安裝</title>
<para>到此為止,可以開始進行安裝了,
這也是您避免更動到硬碟的最後機會。</para>
<screen> User Confirmation Requested
Last Chance! Are you SURE you want to continue the installation?
If you're running this on a disk with data you wish to save then WE
STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before proceeding!
We can take no responsibility for lost disk contents!
[ Yes ] No</screen>
<para>選擇 &gui.yes; 並按下
<keycap>Enter</keycap>以確認真的要開始安裝</para>
<para>安裝所需時間會依據所選擇安裝的套件集(distribution)
、安裝來源以及電腦速度而有所不同。
在安裝的過程中,會有一些訊息顯示目前的安裝進度。</para>
<para>當您看到下面的訊息表示已經安裝完成了︰</para>
<screen> Message
Congratulations! You now have FreeBSD installed on your system.
We will now move on to the final configuration questions.
For any option you do not wish to configure, simply select No.
If you wish to re-enter this utility after the system is up, you may
do so by typing: /usr/sbin/sysinstall.
[ OK ]
[ Press enter or space ]</screen>
<para>請按 <keycap>Enter</keycap> 鍵來進行相關的後續設定。</para>
<para>如果剛選的是 &gui.no; 並按下
<keycap>Enter</keycap> 鍵,那麼會中斷安裝(就不會動到你的原有系統)。
接著,會出現以下訊息:</para>
<screen> Message
Installation complete with some errors. You may wish to scroll
through the debugging messages on VTY1 with the scroll-lock feature.
You can also choose "No" at the next prompt and go back into the
installation menus to retry whichever operations have failed.
[ OK ]</screen>
<para>這段訊息乃是因為都沒裝任何東西之故,請按 <keycap>Enter</keycap> 以跳回主畫面。</para>
</sect1>
<sect1 id="install-post">
<title>後續安裝</title>
<para>安裝系統成功之後,可以在新裝好的 FreeBSD
重開機之前,或者是事後再透過 <command>sysinstall</command>
(&os; 5.2 之前版本則是 <command>/stand/sysinstall</command>) 然後選擇
<guimenuitem>Configure</guimenuitem> 選項以進行後續設定。</para>
<sect2 id="inst-network-dev">
<title>設定網路</title>
<para>如果您之前有設定用 PPP 連線透過 FTP 安裝,那麼這個畫面將不會出現;
正如上面剛所說的,您可以稍後再做更改。</para>
<para>有關 LAN 或把 FreeBSD 設定為 gateway 或 router 請參閱使用手冊中有關
<link linkend="advanced-networking">網路進階運用</link> 的章節。</para>
<screen> User Confirmation Requested
Would you like to configure any Ethernet or SLIP/PPP network devices?
[ Yes ] No</screen>
<para>如果要設定網路卡,請選擇 &gui.yes; 然後按 <keycap>Enter</keycap>。
否則請選 &gui.no; 以繼續。</para>
<figure id="ed-config1">
<title>選擇網路卡</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/ed0-conf" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>用方向鍵選擇您要設定的網路卡,然後按 <keycap>Enter</keycap>。</para>
<screen> User Confirmation Requested
Do you want to try IPv6 configuration of the interface?
Yes [ No ]</screen>
<para>在私人區域網路的情況,由於目前的 Internet 協定
(<acronym>IPv4</acronym>)還算夠用,
所以請選 &gui.no; 不設定 <acronym>IPv6</acronym>,然後按
<keycap>Enter</keycap>。</para>
<para>若是透過 <acronym>RA</acronym> server 連到既有的
<acronym>IPv6</acronym> 環境,那麼就選 &gui.yes; 並按
<keycap>Enter</keycap>,之後系統會花幾秒鐘去搜尋 RA server。</para>
<screen> User Confirmation Requested
Do you want to try DHCP configuration of the interface?
Yes [ No ]</screen>
<para>接下來,若不需要 DHCP (Dynamic Host Configuration Protocol)請選
&gui.no; 並按<keycap>Enter</keycap>。</para>
<para>選擇 &gui.yes; 的話,則會執行
<application>dhclient</application>,若成功要到 IP
則其會自動填上相關的環境設定,細節請參閱 <xref
linkend="network-dhcp">。</para>
<para>下面的網路設定圖顯示如何在區域網路(LAN)中,
將該機器設定為 gateway 的方式:</para>
<figure id="ed-config2">
<title>設定 ed0 這張網路卡的網路設定</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/ed0-conf2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>可用 <keycap>Tab</keycap> 鍵在各欄位間作切換,
並填上適合的資料:</para>
<variablelist>
<varlistentry>
<term>Host(機器名稱)</term>
<listitem>
<para>完整的機器名稱,例如本例中的
<hostid role="fqdn">k6-2.example.com</hostid>。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Domain(網域)</term>
<listitem>
<para>機器所屬的網域名稱,例如本例中的
<hostid role="domainname">example.com</hostid>。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>IPv4 Gateway</term>
<listitem>
<para>這裡請輸入 Gateway 的 IP 位址,其可負責將封包轉遞到遠端網路。
只有在該 gateway 屬於該網路其中節點之一時,才要輸入。
若這機器本身要做為該區域網路的 gateway 的話,
<emphasis>請保持本欄為空白</emphasis>。 此外,
通常 IPv4 Gateway 也會被認為是 default gateway 或
default route。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Name server(Name server 或 DNS server)</term>
<listitem>
<para>該網路所用的 DNS server 之 IP。 本例假設該機器所在的網路沒有
DNS故填上的是該 ISP 所提供的 DNS server
(<hostid role="ipaddr">208.163.10.2</hostid>)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>IPv4 address</term>
<listitem>
<para>The IP address to be used for this interface was
<hostid role="ipaddr">192.168.0.1</hostid></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Netmask</term>
<listitem>
<para>The address block being used for this local area
network is a Class C block
(<hostid role="ipaddr">192.168.0.0</hostid> -
<hostid role="ipaddr">192.168.0.255</hostid>).
The default netmask is for a Class C network
(<hostid role="netmask">255.255.255.0</hostid>).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Extra options to ifconfig</term>
<listitem>
<para>Any interface-specific options to <command>ifconfig</command>
you would like to add. There were none in this case.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Use <keycap>Tab</keycap> to select &gui.ok;
when finished and press <keycap>Enter</keycap>.</para>
<screen> User Confirmation Requested
Would you like to Bring Up the ed0 interface right now?
[ Yes ] No</screen>
<para>Choosing &gui.yes; and pressing
<keycap>Enter</keycap> will bring
the machine up on the network and be ready for use. However,
this does not accomplish much during installation, since
the machine still needs to be rebooted.</para>
</sect2>
<sect2 id="gateway">
<title>Configure Gateway</title>
<screen> User Confirmation Requested
Do you want this machine to function as a network gateway?
[ Yes ] No</screen>
<para>If the machine will be acting as the gateway for a local area
network and forwarding packets between other machines then select
&gui.yes; and press <keycap>Enter</keycap>.
If the machine is a node on a network then
select &gui.no; and press
<keycap>Enter</keycap> to continue.</para>
</sect2>
<sect2 id="inetd-services">
<title>Configure Internet Services</title>
<screen> User Confirmation Requested
Do you want to configure inetd and the network services that it provides?
Yes [ No ]</screen>
<para>If &gui.no; is selected, various services
such <application>telnetd</application> will not be enabled. This
means that remote users will not be able to
<application>telnet</application> into this machine. Local users
will still be able to access remote machines with
<application>telnet</application>.</para>
<para>These services can be enabled after installation by editing
<filename>/etc/inetd.conf</filename> with your favorite text editor.
See <xref linkend="network-inetd-overview"> for more information.</para>
<para>Select &gui.yes; if you wish to
configure these services during install. An additional
confirmation will display:</para>
<screen> User Confirmation Requested
The Internet Super Server (inetd) allows a number of simple Internet
services to be enabled, including finger, ftp and telnetd. Enabling
these services may increase risk of security problems by increasing
the exposure of your system.
With this in mind, do you wish to enable inetd?
[ Yes ] No</screen>
<para>Select &gui.yes; to continue.</para>
<screen> User Confirmation Requested
inetd(8) relies on its configuration file, /etc/inetd.conf, to determine
which of its Internet services will be available. The default FreeBSD
inetd.conf(5) leaves all services disabled by default, so they must be
specifically enabled in the configuration file before they will
function, even once inetd(8) is enabled. Note that services for
IPv6 must be separately enabled from IPv4 services.
Select [Yes] now to invoke an editor on /etc/inetd.conf, or [No] to
use the current settings.
[ Yes ] No</screen>
<para>Selecting &gui.yes; will allow adding
services by deleting the <literal>#</literal> at the beginning
of a line.</para>
<figure id="inetd-edit">
<title>Editing <filename>inetd.conf</filename></title>
<mediaobject>
<imageobject>
<imagedata fileref="install/edit-inetd-conf" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>After adding the desired services, pressing <keycap>Esc</keycap>
will display a menu which will allow exiting and saving
the changes.</para>
</sect2>
<sect2 id="ssh-login">
<title>啟用 SSH 登入</title>
<indexterm>
<primary>SSH</primary>
<secondary>sshd</secondary>
</indexterm>
<screen> User Confirmation Requested
Would you like to enable SSH login?
Yes [ No ]</screen>
<para>選擇 &gui.yes; 就會啟用 &man.sshd.8;,也就是
<application>OpenSSH</application> 的 daemon 程式。
這會允許該機器可從遠端安全登入。 關於
<application>OpenSSH</application> 請參閱 <xref
linkend="openssh"> 部分的說明。</para>
</sect2>
<sect2 id="ftpanon">
<title>Anonymous FTP</title>
<indexterm>
<primary>FTP</primary>
<secondary>anonymous</secondary>
</indexterm>
<screen> User Confirmation Requested
Do you want to have anonymous FTP access to this machine?
Yes [ No ]</screen>
<sect3 id="deny-anon">
<title>Deny Anonymous FTP</title>
<para>Selecting the default &gui.no; and pressing
<keycap>Enter</keycap> will still allow users who have accounts
with passwords to use FTP to access the machine.</para>
</sect3>
<sect3 id="ftpallow">
<title>Allow Anonymous FTP</title>
<para>Anyone can access your machine if you elect to allow
anonymous FTP connections. The security implications should be
considered before enabling this option. For more information
about security see <xref linkend="security">.</para>
<para>To allow anonymous FTP, use the arrow keys to select
&gui.yes; and press <keycap>Enter</keycap>.
The following screen (or similar) will display:</para>
<figure id="anon-ftp2">
<title>Default Anonymous FTP Configuration</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/ftp-anon1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Pressing <keycap>F1</keycap> will display the help:</para>
<screen>This screen allows you to configure the anonymous FTP user.
The following configuration values are editable:
UID: The user ID you wish to assign to the anonymous FTP user.
All files uploaded will be owned by this ID.
Group: Which group you wish the anonymous FTP user to be in.
Comment: String describing this user in /etc/passwd
FTP Root Directory:
Where files available for anonymous FTP will be kept.
Upload subdirectory:
Where files uploaded by anonymous FTP users will go.</screen>
<para>The ftp root directory will be put in <filename>/var</filename>
by default. If you do not have enough room there for the
anticipated FTP needs, the <filename>/usr</filename> directory
could be used by setting the FTP Root Directory to
<filename>/usr/ftp</filename>.</para>
<para>When you are satisfied with the values, press
<keycap>Enter</keycap> to continue.</para>
<screen> User Confirmation Requested
Create a welcome message file for anonymous FTP users?
[ Yes ] No</screen>
<para>If you select &gui.yes; and press
<keycap>Enter</keycap>, an editor will automatically start
allowing you to edit the message.</para>
<figure id="anon-ftp4">
<title>Edit the FTP Welcome Message</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/ftp-anon2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>This is a text editor called <command>ee</command>. Use the
instructions to change the message or change the message later
using a text editor of your choice. Note the file name/location
at the bottom of the editor screen.</para>
<para>Press <keycap>Esc</keycap> and a pop-up menu will default
to <guimenuitem>a) leave editor</guimenuitem>. Press
<keycap>Enter</keycap> to exit and continue. Press
<keycap>Enter</keycap> again to save changes if you made
any.</para>
</sect3>
</sect2>
<sect2 id="nfsconf">
<title>Configure Network File System</title>
<para>Network File System (NFS) allows sharing of files across a
network. A machine can be configured as a server, a client, or
both. Refer to <xref linkend="network-nfs"> for a more information.</para>
<sect3 id="nsf-server-options">
<title>NFS Server</title>
<screen> User Confirmation Requested
Do you want to configure this machine as an NFS server?
Yes [ No ]</screen>
<para>If there is no need for a Network File System server,
select &gui.no; and press
<keycap>Enter</keycap>.</para>
<para>If &gui.yes; is chosen, a message will
pop-up indicating that the <filename>exports</filename> file must be
created.</para>
<screen> Message
Operating as an NFS server means that you must first configure an
/etc/exports file to indicate which hosts are allowed certain kinds of
access to your local filesystems.
Press [Enter] now to invoke an editor on /etc/exports
[ OK ]</screen>
<para>Press <keycap>Enter</keycap> to continue. A text editor will
start allowing the <filename>exports</filename> file to be created
and edited.</para>
<figure id="nfs-server-edit">
<title>Editing <filename>exports</filename></title>
<mediaobject>
<imageobject>
<imagedata fileref="install/nfs-server-edit" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Use the instructions to add the actual exported filesystems
now or later using a text editor of your choice. Note the
file name/location at the bottom of the editor screen.</para>
<para>Press <keycap>Esc</keycap> and a pop-up menu will default to
<guimenuitem>a) leave editor</guimenuitem>. Press
<keycap>Enter</keycap> to exit and continue.</para>
</sect3>
<sect3 id="nfs-client-options">
<title>NFS Client</title>
<para>The NFS client allows your machine to access NFS servers.</para>
<screen> User Confirmation Requested
Do you want to configure this machine as an NFS client?
Yes [ No ]</screen>
<para>With the arrow keys, select &gui.yes;
or &gui.no; as appropriate and
press <keycap>Enter</keycap>.</para>
</sect3>
</sect2>
<sect2 id="console">
<title>System Console Settings</title>
<para>There are several options available to customize the system
console.</para>
<screen> User Confirmation Requested
Would you like to customize your system console settings?
[ Yes ] No</screen>
<para>To view and configure the options, select
&gui.yes; and press
<keycap>Enter</keycap>.</para>
<figure id="saver-options">
<title>System Console Configuration Options</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/console-saver1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>A commonly used option is the screen saver. Use the arrow keys
to select <guimenuitem>Saver</guimenuitem> and then press
<keycap>Enter</keycap>.</para>
<figure id="saver-select">
<title>Screen Saver Options</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/console-saver2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Select the desired screen saver using the arrow keys
and then press <keycap>Enter</keycap>. The System Console
Configuration menu will redisplay.</para>
<para>The default time interval is 300 seconds. To change the time
interval, select <guimenuitem>Saver</guimenuitem> again. At the
Screen Saver Options menu, select <guimenuitem>Timeout</guimenuitem>
using the arrow keys and press <keycap>Enter</keycap>. A pop-up
menu will appear:</para>
<figure id="saver-timeout">
<title>Screen Saver Timeout</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/console-saver3" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The value can be changed, then select &gui.ok;
and press <keycap>Enter</keycap> to return to the System Console
Configuration menu.</para>
<figure id="saver-exit">
<title>System Console Configuration Exit</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/console-saver4" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Selecting <guimenuitem>Exit</guimenuitem> and pressing
<keycap>Enter</keycap> will continue with the post-installation
configurations.</para>
</sect2>
<sect2 id="timezone">
<title>Setting the Time Zone</title>
<para>Setting the time zone for your machine will allow it to
automatically correct for any regional time changes and perform
other time zone related functions properly.</para>
<para>The example shown is for a machine located in the Eastern
time zone of the United States. Your selections will vary according
to your geographical location.</para>
<screen> User Confirmation Requested
Would you like to set this machine's time zone now?
[ Yes ] No</screen>
<para>Select &gui.yes; and press
<keycap>Enter</keycap> to set the time zone.</para>
<screen> User Confirmation Requested
Is this machine's CMOS clock set to UTC? If it is set to local time
or you don't know, please choose NO here!
Yes [ No ]</screen>
<para>Select &gui.yes;
or &gui.no; according to how the machine's
clock is configured and press <keycap>Enter</keycap>.</para>
<figure id="set-timezone-region">
<title>Select Your Region</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/timezone1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The appropriate region is selected using the arrow keys
and then pressing <keycap>Enter</keycap>.</para>
<figure id="set-timezone-country">
<title>Select Your Country</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/timezone2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Select the appropriate country using the arrow keys
and press <keycap>Enter</keycap>.</para>
<figure id="set-timezone-locality">
<title>Select Your Time Zone</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/timezone3" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The appropriate time zone is selected using the arrow
keys and pressing <keycap>Enter</keycap>.</para>
<screen> Confirmation
Does the abbreviation 'EDT' look reasonable?
[ Yes ] No</screen>
<para>Confirm the abbreviation for the time zone is correct.
If it looks okay, press <keycap>Enter</keycap> to continue with
the post-installation configuration.</para>
</sect2>
<sect2 id="linuxcomp">
<title>Linux Compatibility</title>
<screen> User Confirmation Requested
Would you like to enable Linux binary compatibility?
[ Yes ] No</screen>
<para>Selecting &gui.yes; and pressing
<keycap>Enter</keycap> will allow
running Linux software on FreeBSD. The install will add
the appropriate packages for Linux compatibility.</para>
<para>If installing by FTP, the machine will need to be connected to
the Internet. Sometimes a remote ftp site will not have all the
distributions like the Linux binary compatibility. This can
be installed later if necessary.</para>
</sect2>
<sect2 id="mouse">
<title>Mouse Settings</title>
<para>This option will allow you to cut and paste text in the
console and user programs with a 3-button mouse. If using a 2-button
mouse, refer to manual page, &man.moused.8;, after installation for
details on emulating the 3-button style. This example depicts a
non-USB mouse configuration (such as a PS/2 or COM port mouse):</para>
<screen> User Confirmation Requested
Does this system have a PS/2, serial, or bus mouse?
[ Yes ] No </screen>
<para>Select &gui.yes; for a PS/2, serial, or bus mouse, or
&gui.no; for a USB mouse and press
<keycap>Enter</keycap>.</para>
<figure id="mouse-protocol">
<title>Select Mouse Protocol Type</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/mouse1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Use the arrow keys to select <guimenuitem>Type</guimenuitem> and
press <keycap>Enter</keycap>.</para>
<figure id="set-mouse-protocol">
<title>Set Mouse Protocol</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/mouse2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The mouse used in this example is a PS/2 type, so the default
<guimenuitem>Auto</guimenuitem> was appropriate. To change protocol,
use the arrow keys to select another option. Ensure that &gui.ok; is
highlighted and press <keycap>Enter</keycap> to exit this menu.</para>
<figure id="config-mouse-port">
<title>Configure Mouse Port</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/mouse3" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Use the arrow keys to select <guimenuitem>Port</guimenuitem> and
press <keycap>Enter</keycap>.</para>
<figure id="set-mouse-port">
<title>Setting the Mouse Port</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/mouse4" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>This system had a PS/2 mouse, so the default
<guimenuitem>PS/2</guimenuitem> was appropriate. To change the port,
use the arrow keys and then press <keycap>Enter</keycap>.</para>
<figure id="test-daemon">
<title>Enable the Mouse Daemon</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/mouse5" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Last, use the arrow keys to select
<guimenuitem>Enable</guimenuitem>, and press
<keycap>Enter</keycap> to enable and test the mouse
daemon.</para>
<figure id="test-mouse-daemon">
<title>Test the Mouse Daemon</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/mouse6" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Move the mouse around the screen and verify the cursor
shown responds properly. If it does, select
&gui.yes; and press <keycap>Enter</keycap>. If
not, the mouse has not been configured correctly &mdash; select
&gui.no; and try using different configuration
options.</para>
<para>Select <guimenuitem>Exit</guimenuitem> with the arrow keys
and press <keycap>Enter</keycap> to return to continue with the
post-installation configuration.</para>
</sect2>
<sect2 id="packages">
<title>Install Packages</title>
<para>Packages are pre-compiled binaries and are a convenient
way to install software.</para>
<para>Installation of one package is shown for purposes of
illustration. Additional packages can also be added at this
time if desired. After installation
<command>sysinstall</command> can be used to add additional
packages.</para>
<screen> User Confirmation Requested
The FreeBSD package collection is a collection of hundreds of
ready-to-run applications, from text editors to games to WEB servers
and more. Would you like to browse the collection now?
[ Yes ] No</screen>
<para>Selecting &gui.yes; and pressing
<keycap>Enter</keycap> will be
followed by the Package Selection screens:</para>
<figure id="package-category">
<title>Select Package Category</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/pkg-cat" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Only packages on the current installation media are
available for installation at any given time.</para>
<para>All packages available will be displayed if
<guimenuitem>All</guimenuitem> is selected or you can select a
particular category. Highlight your selection with the arrow
keys and press <keycap>Enter</keycap>.</para>
<para>A menu will display showing all the packages available for
the selection made:</para>
<figure id="package-select">
<title>Select Packages</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/pkg-sel" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The <application>bash</application> shell is shown selected.
Select as many as desired by highlighting the package and pressing the
<keycap>Space</keycap> key. A short description of each package will
appear in the lower left corner of the screen.</para>
<para>Pressing the <keycap>Tab</keycap> key will toggle between the last
selected package, &gui.ok;, and &gui.cancel;.</para>
<para>When you have finished marking the packages for installation,
press <keycap>Tab</keycap> once to toggle to the &gui.ok; and press
<keycap>Enter</keycap> to return to the Package Selection menu.</para>
<para>The left and right arrow keys will also toggle between &gui.ok;
and &gui.cancel;. This method can also be used to select &gui.ok; and
press <keycap>Enter</keycap> to return to the Package Selection
menu.</para>
<figure id="package-install">
<title>Install Packages</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/pkg-install" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Use the <keycap>Tab</keycap> and arrow keys to select <guibutton>[&nbsp;Install&nbsp;]</guibutton>
and press <keycap>Enter</keycap>. You will then need to confirm
that you want to install the packages:</para>
<figure id="package-install-confirm">
<title>Confirm Package Installation</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/pkg-confirm" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Selecting &gui.ok; and pressing <keycap>Enter</keycap> will start
the package installation. Installing messages will appear until
completed. Make note if there are any error messages.</para>
<para>The final configuration continues after packages are
installed. If you end up not selecting any packages, and wish
to return to the final configuration, select
<guibutton>Install</guibutton> anyways.</para>
</sect2>
<sect2 id="addusers">
<title>Add Users/Groups</title>
<para>You should add at least one user during the installation so
that you can use the system without being logged in as
<username>root</username>. The root partition is generally small
and running applications as <username>root</username> can quickly
fill it. A bigger danger is noted below:</para>
<screen> User Confirmation Requested
Would you like to add any initial user accounts to the system? Adding
at least one account for yourself at this stage is suggested since
working as the "root" user is dangerous (it is easy to do things which
adversely affect the entire system).
[ Yes ] No</screen>
<para>Select &gui.yes; and press
<keycap>Enter</keycap> to continue with adding a user.</para>
<figure id="add-user2">
<title>Select User</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/adduser1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Select <guimenuitem>User</guimenuitem> with the arrow keys
and press <keycap>Enter</keycap>.</para>
<figure id="add-user3">
<title>Add User Information</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/adduser2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The following descriptions will appear in the lower part of
the screen as the items are selected with <keycap>Tab</keycap>
to assist with entering the required information:</para>
<variablelist>
<varlistentry>
<term>Login ID</term>
<listitem>
<para>The login name of the new user (mandatory).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>UID</term>
<listitem>
<para>The numerical ID for this user (leave blank for
automatic choice).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Group</term>
<listitem>
<para>The login group name for this user (leave blank for
automatic choice).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Password</term>
<listitem>
<para>The password for this user (enter this field with
care!).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Full name</term>
<listitem>
<para>The user's full name (comment).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Member groups</term>
<listitem>
<para>The groups this user belongs to (i.e. gets access
rights for).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Home directory</term>
<listitem>
<para>The user's home directory (leave blank for
default).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Login shell</term>
<listitem>
<para>The user's login shell (leave blank for
default, e.g. <filename>/bin/sh</filename>).</para>
</listitem>
</varlistentry>
</variablelist>
<para>The login shell was changed from <filename>/bin/sh</filename> to
<filename>/usr/local/bin/bash</filename> to use the
<application>bash</application> shell that was previously installed as
a package. Do not try to use a shell that does not exist or you will
not be able to login. The most common shell used in the
BSD-world is the C shell, which can be indicated as
<filename>/bin/tcsh</filename>.</para>
<para>The user was also added to the <groupname>wheel</groupname> group
to be able to become a superuser with <username>root</username>
privileges.</para>
<para>When you are satisfied, press &gui.ok; and
the User and Group Management menu will redisplay:</para>
<figure id="add-user4">
<title>Exit User and Group Management</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/adduser3" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Groups can also be added at this time if specific needs
are known. Otherwise, this may be accessed through using
<command>sysinstall</command> (<command>/stand/sysinstall</command>
in &os; versions older than 5.2) after installation is
completed.</para>
<para>When you are finished adding users, select
<guimenuitem>Exit</guimenuitem> with the arrow keys and press
<keycap>Enter</keycap> to continue the installation.</para>
</sect2>
<sect2 id="rootpass">
<title>Set the <username>root</username> Password</title>
<screen> Message
Now you must set the system manager's password.
This is the password you'll use to log in as "root".
[ OK ]
[ Press enter or space ]</screen>
<para>Press <keycap>Enter</keycap> to set the <username>root</username>
password.</para>
<para>The password will need to be typed in twice correctly. Needless to
say, make sure you have a way of finding the password if you
forget. Notice that the password you type in is not echoed, nor
are asterisks displayed.</para>
<screen>New password :
Retype new password :</screen>
<para>The installation will continue after the password is
successfully entered.</para>
</sect2>
<sect2 id="exit-inst">
<title>Exiting Install</title>
<para>If you need to configure <link linkend="network-services">additional network devices</link> or
any other configuration, you can do it at this point or
after installation with <command>sysinstall</command>
(<command>/stand/sysinstall</command> in &os; versions older
than 5.2).</para>
<screen> User Confirmation Requested
Visit the general configuration menu for a chance to set any last
options?
Yes [ No ]</screen>
<para>Select &gui.no; with the arrow keys
and press <keycap>Enter</keycap> to return to the Main
Installation Menu.</para>
<figure id="final-main">
<title>Exit Install</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/mainexit" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Select <guibutton>[X Exit Install]</guibutton> with the arrow
keys and press <keycap>Enter</keycap>. You will be asked to
confirm exiting the installation:</para>
<screen> User Confirmation Requested
Are you sure you wish to exit? The system will reboot (be sure to
remove any floppies/CDs/DVDs from the drives).
[ Yes ] No</screen>
<para>Select &gui.yes; and remove the floppy if
booting from the floppy. The CDROM drive is locked until the machine
starts to reboot. The CDROM drive is then unlocked and the disk can
be removed from drive (quickly).</para>
<para>The system will reboot so watch for any error messages that
may appear, see <xref linkend="freebsdboot">
details.</para>
</sect2>
<sect2 id="network-services">
<sect2info>
<authorgroup>
<author>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
<contrib>Contributed by </contrib>
</author>
</authorgroup>
</sect2info>
<title>Configure Additional Network Services</title>
<para>Configuring network services can be a daunting
task for new users if they lack previous
knowledge in this area. Networking, including the Internet,
is critical to all modern operating systems including &os;;
as a result, it is very useful to have some understanding
&os;'s extensive networking capabilities. Doing this
during the installation will ensure users have some
understanding of the various services available to them.</para>
<para>Network services are programs that accept input from
anywhere on the network. Every effort is made to make sure
these programs will not do anything <quote>harmful</quote>.
Unfortunately, programmers are not perfect and through time
there have been cases where bugs in network services have been
exploited by attackers to do bad things. It is important that
you only enable the network services you know that you need. If
in doubt it is best if you do not enable a network service until
you find out that you do need it. You can always enable it
later by re-running <application>sysinstall</application> or by
using the features provided by the
<filename>/etc/rc.conf</filename> file.</para>
<para>Selecting the <guimenu>Networking</guimenu> option will display
a menu similar to the one below:</para>
<figure id="network-configuration">
<title>Network Configuration Upper-level</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/net-config-menu1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The first option, <guimenuitem>Interfaces</guimenuitem>, was previously covered during
the <xref linkend="inst-network-dev">, thus this option can
safely be ignored.</para>
<para>Selecting the <guimenuitem>AMD</guimenuitem> option adds
support for the <acronym>BSD</acronym> automatic mount utility.
This is usually used in conjunction with the
<acronym>NFS</acronym> protocol (see below)
for automatically mounting remote file systems.
No special configuration is required here.</para>
<para>Next in line is the <guimenuitem>AMD Flags</guimenuitem>
option. When selected, a menu will pop up for you
to enter specific <acronym>AMD</acronym> flags.
The menu already contains a set of default options:</para>
<screen>-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map</screen>
<para>The <option>-a</option> option sets the default mount
location which is specified here as
<filename>/.amd_mnt</filename>. The <option>-l</option>
option specifies the default <filename>log</filename> file;
however, when <literal>syslogd</literal> is used all log
activity will be sent to the system log daemon. The
<filename class="directory">/host</filename> directory is used
to mount an exported file system from a remote
host, while <filename class="directory">/net</filename>
directory is used to mount an exported file system from an
<acronym>IP</acronym> address. The
<filename>/etc/amd.map</filename> file defines the default
options for <acronym>AMD</acronym> exports.</para>
<indexterm>
<primary>FTP</primary>
<secondary>anonymous</secondary>
</indexterm>
<para>The <guimenuitem>Anon FTP</guimenuitem> option permits anonymous
<acronym>FTP</acronym> connections. Select this option to
make this machine an anonymous <acronym>FTP</acronym> server.
Be aware of the security risks involved with this option.
Another menu will be displayed to explain the security risks
and configuration in depth.</para>
<para>The <guimenuitem>Gateway</guimenuitem> configuration menu will set
the machine up to be a gateway as explained previously. This
can be used to unset the <guimenuitem>Gateway</guimenuitem> option if you accidentally
selected it during the installation process.</para>
<para>The <guimenuitem>Inetd</guimenuitem> option can be used to configure
or completely disable the &man.inetd.8; daemon as discussed
above.</para>
<para>The <guimenuitem>Mail</guimenuitem> option is used to configure the system's
default <acronym>MTA</acronym> or Mail Transfer Agent.
Selecting this option will bring up the following menu:</para>
<figure id="mta-selection">
<title>Select a default MTA</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/mta-main" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Here you are offered a choice as to which
<acronym>MTA</acronym> to install
and set as the default. An <acronym>MTA</acronym> is nothing
more than a mail server which delivers email to users on the
system or the Internet.</para>
<para>Selecting <guimenuitem>Sendmail</guimenuitem> will install
the popular <application>sendmail</application> server which
is the &os; default. The <guimenuitem>Sendmail local</guimenuitem> option
will set <application>sendmail</application> to be the default
<acronym>MTA</acronym>, but disable its ability to receive
incoming email from the Internet. The other options here,
<guimenuitem>Postfix</guimenuitem> and
<guimenuitem>Exim</guimenuitem> act similar to
<guimenuitem>Sendmail</guimenuitem>. They both deliver
email; however, some users prefer these alternatives to the
<application>sendmail</application>
<acronym>MTA</acronym>.</para>
<para>After selecting an <acronym>MTA</acronym>, or choosing
not to select an MTA, the network configuration menu will appear
with the next option being <guimenuitem>NFS client</guimenuitem>.</para>
<para>The <guimenuitem>NFS client</guimenuitem> option will
configure the system to communicate with a server via
<acronym>NFS</acronym>. An <acronym>NFS</acronym> server
makes file systems available to other machines on the
network via the <acronym>NFS</acronym> protocol. If this is
a stand-alone machine, this option can remain unselected.
The system may require more configuration later; see
<xref linkend="network-nfs"> for more
information about client and server configuration.</para>
<para>Below that option is the <guimenuitem>NFS server</guimenuitem>
option, permitting you to set the system up as an
<acronym>NFS</acronym> server. This adds the required
information to start up the <acronym>RPC</acronym> remote
procedure call services. <acronym>RPC</acronym> is used to
coordinate connections between hosts and programs.</para>
<para>Next in line is the <guimenuitem>Ntpdate</guimenuitem> option,
which deals with time synchronization. When selected, a menu
like the one below shows up:</para>
<figure id="Ntpdate-config">
<title>Ntpdate Configuration</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/ntp-config" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>From this menu, select the server which is the closest
to your location. Selecting a close one will make the time
synchronization more accurate as a server further from your
location may have more connection latency.</para>
<para>The next option is the <acronym>PCNFSD</acronym> selection.
This option will install the
<filename role="package">net/pcnfsd</filename> package from
the Ports Collection. This is a useful utility which provides
<acronym>NFS</acronym> authentication services for systems which
are unable to provide their own, such as Microsoft's
&ms-dos; operating system.</para>
<para>Now you must scroll down a bit to see the other
options:</para>
<figure id="Network-configuration-cont">
<title>Network Configuration Lower-level</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/net-config-menu2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The &man.rpcbind.8;, &man.rpc.statd.8;, and
&man.rpc.lockd.8; utilities are all used for Remote Procedure
Calls (<acronym>RPC</acronym>).
The <command>rpcbind</command> utility manages communication
between <acronym>NFS</acronym> servers and clients, and is
required for <acronym>NFS</acronym> servers to operate
correctly. The <application>rpc.statd</application> daemon interacts
with the <application>rpc.statd</application> daemon on other hosts to
provide status monitoring. The reported status is usually held
in the <filename>/var/db/statd.status</filename> file. The
next option listed here is the <guimenuitem>rpc.lockd</guimenuitem>
option, which, when selected, will provide file locking
services. This is usually used with
<application>rpc.statd</application> to monitor what hosts are
requesting locks and how frequently they request them.
While these last two options are marvelous for debugging, they
are not required for <acronym>NFS</acronym> servers and clients
to operate correctly.</para>
<para>As you progress down the list the next item here is
<guimenuitem>Routed</guimenuitem>, which is the routing daemon. The
&man.routed.8; utility manages network routing tables,
discovers multicast routers, and supplies a copy of the routing
tables to any physically connected host on the network upon
request. This is mainly used for machines which act as a
gateway for the local network. When selected, a menu will be
presented requesting the default location of the utility.
The default location is already defined for you and can be
selected with the <keycap>Enter</keycap> key. You will then
be presented with yet another menu, this time asking for the
flags you wish to pass on to <application>routed</application>. The
default is <option>-q</option> and it should already appear
on the screen.</para>
<para>Next in line is the <guimenuitem>Rwhod</guimenuitem> option which,
when selected, will start the &man.rwhod.8; daemon
during system initialization. The <command>rwhod</command>
utility broadcasts system messages across the network
periodically, or collects them when in <quote>consumer</quote>
mode. More information can be found in the &man.ruptime.1; and
&man.rwho.1; manual pages.</para>
<para>The next to the last option in the list is for the
&man.sshd.8; daemon. This is the secure shell server for
<application>OpenSSH</application> and it is highly recommended
over the standard <application>telnet</application> and
<acronym>FTP</acronym> servers. The <application>sshd</application>
server is used to create a secure connection from one host to
another by using encrypted connections.</para>
<para>Finally there is the <guimenuitem>TCP Extensions</guimenuitem>
option. This enables the <acronym>TCP</acronym> Extensions
defined in <acronym>RFC</acronym>&nbsp;1323 and
<acronym>RFC</acronym>&nbsp;1644. While on many hosts this can
speed up connections, it can also cause some connections to be
dropped. It is not recommended for servers, but may be
beneficial for stand alone machines.</para>
<para>Now that you have configured the network services, you can
scroll up to the very top item which is <guimenuitem>X Exit</guimenuitem>
and continue on to the next configuration item or simply exit
<application>sysinstall</application> in selecting
<guimenuitem>X Exit</guimenuitem> twice then <guibutton>[X
Exit Install]</guibutton>.</para>
</sect2>
<sect2 id="freebsdboot">
<title>&os; 開機流程</title>
<sect3 id="freebsdboot-i386">
<title>&os;/&arch.i386; 的開機流程</title>
<para>If everything went well, you will see messages scroll
off the screen and you will arrive at a login prompt. You can view
the content of the messages by pressing <keycap>Scroll-Lock</keycap>
and using <keycap>PgUp</keycap> and <keycap>PgDn</keycap>.
Pressing <keycap>Scroll-Lock</keycap> again will return
to the prompt.</para>
<para>The entire message may not display (buffer limitation) but
it can be viewed from the command line after logging in by typing
<command>dmesg</command> at the prompt.</para>
<para>Login using the username/password you set during installation
(<username>rpratt</username>, in this example). Avoid logging in as
<username>root</username> except when necessary.</para>
<para>Typical boot messages (version information omitted):</para>
<screen>Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
Timecounter "i8254" frequency 1193182 Hz
CPU: AMD-K6(tm) 3D processor (300.68-MHz 586-class CPU)
Origin = "AuthenticAMD" Id = 0x580 Stepping = 0
Features=0x8001bf&lt;FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX&gt;
AMD Features=0x80000800&lt;SYSCALL,3DNow!&gt;
real memory = 268435456 (262144K bytes)
config&gt; di sn0
config&gt; di lnc0
config&gt; di le0
config&gt; di ie0
config&gt; di fe0
config&gt; di cs0
config&gt; di bt0
config&gt; di aic0
config&gt; di aha0
config&gt; di adv0
config&gt; q
avail memory = 256311296 (250304K bytes)
Preloaded elf kernel "kernel" at 0xc0491000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc049109c.
md0: Malloc disk
Using $PIR table, 4 entries at 0xc00fde60
npx0: &lt;math processor&gt; on motherboard
npx0: INT 16 interface
pcib0: &lt;Host to PCI bridge&gt; on motherboard
pci0: &lt;PCI bus&gt; on pcib0
pcib1: &lt;VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge&gt; at device 1.0 on pci0
pci1: &lt;PCI bus&gt; on pcib1
pci1: &lt;Matrox MGA G200 AGP graphics accelerator&gt; at 0.0 irq 11
isab0: &lt;VIA 82C586 PCI-ISA bridge&gt; at device 7.0 on pci0
isa0: &lt;ISA bus&gt; on isab0
atapci0: &lt;VIA 82C586 ATA33 controller&gt; port 0xe000-0xe00f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: &lt;VIA 83C572 USB controller&gt; port 0xe400-0xe41f irq 10 at device 7.2 on pci0
usb0: &lt;VIA 83C572 USB controller&gt; on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
chip1: &lt;VIA 82C586B ACPI interface&gt; at device 7.3 on pci0
ed0: &lt;NE2000 PCI Ethernet (RealTek 8029)&gt; port 0xe800-0xe81f irq 9 at
device 10.0 on pci0
ed0: address 52:54:05:de:73:1b, type NE2000 (16 bit)
isa0: too many dependant configs (8)
isa0: unexpected small tag 14
fdc0: &lt;NEC 72065B or clone&gt; at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: &lt;1440-KB 3.5" drive&gt; on fdc0 drive 0
atkbdc0: &lt;keyboard controller (i8042)&gt; at port 0x60-0x64 on isa0
atkbd0: &lt;AT Keyboard&gt; flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: &lt;PS/2 Mouse&gt; irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
vga0: &lt;Generic ISA VGA&gt; at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: &lt;System console&gt; at flags 0x1 on isa0
sc0: VGA &lt;16 virtual consoles, flags=0x300&gt;
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: &lt;Parallel port&gt; at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/15 bytes threshold
ppbus0: IEEE1284 device found /NIBBLE
Probing for PnP devices on ppbus0:
plip0: &lt;PLIP network interface&gt; on ppbus0
lpt0: &lt;Printer&gt; on ppbus0
lpt0: Interrupt-driven port
ppi0: &lt;Parallel I/O&gt; on ppbus0
ad0: 8063MB &lt;IBM-DHEA-38451&gt; [16383/16/63] at ata0-master using UDMA33
ad2: 8063MB &lt;IBM-DHEA-38451&gt; [16383/16/63] at ata1-master using UDMA33
acd0: CDROM &lt;DELTA OTC-H101/ST3 F/W by OIPD&gt; at ata0-slave using PIO4
Mounting root from ufs:/dev/ad0s1a
swapon: adding /dev/ad0s1b as swap device
Automatic boot in progress...
/dev/ad0s1a: FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s1a: clean, 48752 free (552 frags, 6025 blocks, 0.9% fragmentation)
/dev/ad0s1f: FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s1f: clean, 128997 free (21 frags, 16122 blocks, 0.0% fragmentation)
/dev/ad0s1g: FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s1g: clean, 3036299 free (43175 frags, 374073 blocks, 1.3% fragmentation)
/dev/ad0s1e: filesystem CLEAN; SKIPPING CHECKS
/dev/ad0s1e: clean, 128193 free (17 frags, 16022 blocks, 0.0% fragmentation)
Doing initial network setup: hostname.
ed0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::5054::5ff::fede:731b%ed0 prefixlen 64 tentative scopeid 0x1
ether 52:54:05:de:73:1b
lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
Additional routing options: IP gateway=YES TCP keepalive=YES
routing daemons:.
additional daemons: syslogd.
Doing additional network setup:.
Starting final network daemons: creating ssh RSA host key
Generating public/private rsa1 key pair.
Your identification has been saved in /etc/ssh/ssh_host_key.
Your public key has been saved in /etc/ssh/ssh_host_key.pub.
The key fingerprint is:
cd:76:89:16:69:0e:d0:6e:f8:66:d0:07:26:3c:7e:2d root@k6-2.example.com
creating ssh DSA host key
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
f9:a1:a9:47:c4:ad:f9:8d:52:b8:b8:ff:8c:ad:2d:e6 root@k6-2.example.com.
setting ELF ldconfig path: /usr/lib /usr/lib/compat /usr/X11R6/lib
/usr/local/lib
a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout
starting standard daemons: inetd cron sshd usbd sendmail.
Initial rc.i386 initialization:.
rc.i386 configuring syscons: blank_time screensaver moused.
Additional ABI support: linux.
Local package initialization:.
Additional TCP options:.
FreeBSD/i386 (k6-2.example.com) (ttyv0)
login: rpratt
Password:</screen>
<para>Generating the RSA and DSA keys may take some time on slower
machines. This happens only on the initial boot-up of a new
installation. Subsequent boots will be faster.</para>
<para>If the X server has been configured and a Default Desktop
chosen, it can be started by typing <command>startx</command> at
the command line.</para>
</sect3>
<sect3>
<title>&os;/&arch.alpha; 開機流程</title>
<indexterm><primary>Alpha</primary></indexterm>
<para>Once the install procedure has finished, you will be
able to start FreeBSD by typing something like this to the
SRM prompt:</para>
<screen>&gt;&gt;&gt;<userinput>BOOT DKC0</userinput></screen>
<para>This instructs the firmware to boot the specified
disk. To make FreeBSD boot automatically in the future, use
these commands:</para>
<screen><prompt>&gt;&gt;&gt;</prompt> <userinput>SET BOOT_OSFLAGS A</userinput>
<prompt>&gt;&gt;&gt;</prompt> <userinput>SET BOOT_FILE ''</userinput>
<prompt>&gt;&gt;&gt;</prompt> <userinput>SET BOOTDEF_DEV DKC0</userinput>
<prompt>&gt;&gt;&gt;</prompt> <userinput>SET AUTO_ACTION BOOT</userinput></screen>
<para>The boot messages will be similar (but not identical) to
those produced by FreeBSD booting on the &i386;.</para>
</sect3>
</sect2>
<sect2 id="shutdown">
<title>FreeBSD Shutdown</title>
<para>It is important to properly shutdown the operating
system. Do not just turn off power. First, become a superuser by
typing <command>su</command> at the command line and entering the
<username>root</username> password. This will work only if the user
is a member of the <groupname>wheel</groupname> group.
Otherwise, login as <username>root</username> and use
<command>shutdown -h now</command>.</para>
<screen>The operating system has halted.
Please press any key to reboot.</screen>
<para>It is safe to turn off the power after the shutdown command
has been issued and the message <quote>Please press any key to reboot</quote>
appears. If any key is pressed instead of turning off the power
switch, the system will reboot.</para>
<para>You could also use the
<keycombo action="simul">
<keycap>Ctrl</keycap>
<keycap>Alt</keycap>
<keycap>Del</keycap>
</keycombo>
key combination to reboot the system, however this is not recommended
during normal operation.</para>
</sect2>
</sect1>
<sect1 id="install-trouble">
<title>安裝的疑難雜症解決</title>
<indexterm>
<primary>installation</primary>
<secondary>troubleshooting</secondary>
</indexterm>
<para>The following section covers basic installation troubleshooting,
such as common problems people have reported. There are also a few
questions and answers for people wishing to dual-boot FreeBSD with
&ms-dos; or &windows;.</para>
<sect2>
<title>What to Do If Something Goes Wrong</title>
<para>Due to various limitations of the PC architecture, it is
impossible for probing to be 100% reliable, however, there are a
few things you can do if it fails.</para>
<para>Check the <ulink
url="http://www.FreeBSD.org/releases/index.html">Hardware Notes
</ulink> document for your version of &os; to make sure
your hardware is supported.</para>
<para>若硬體有在支援清單內,但使用 <filename>GENERIC</filename> kernel
仍有問題,那麼就可能需要 <link
linkend="kernelconfig">自訂 kernel</link>,以加入有支援的硬體。
The kernel on the boot disks is configured
assuming that most hardware devices are in their factory default
configuration in terms of IRQs, IO addresses, and DMA channels. If
your hardware has been reconfigured, you will most likely need to
edit the kernel configuration and recompile to tell
&os; where to find things.</para>
<para>It is also possible that a probe for a device not present will
cause a later probe for another device that is present to fail. In
that case, the probes for the conflicting driver(s) should be
disabled.</para>
<note>
<para>Some installation problems can be avoided or alleviated
by updating the firmware on various hardware components, most notably
the motherboard. The motherboard firmware may also be referred to
as <acronym>BIOS</acronym> and most of the motherboard or computer
manufactures have a website where the upgrades and upgrade information
may be located.</para>
<para>Most manufacturers strongly advise against upgrading the motherboard
<acronym>BIOS</acronym> unless there is a good reason for doing so, which
could possibly be a critical update of sorts. The upgrade process
<emphasis>can</emphasis> go wrong, causing permanent damage to the
<acronym>BIOS</acronym> chip.</para>
</note>
</sect2>
<sect2>
<title>Using &ms-dos; and &windows; File Systems</title>
<para>At this time, &os; does not support file systems compressed with the
<application>Double Space&trade;</application> application. Therefore the file
system will need to be uncompressed before &os; can access the data. This
can be done by running the <application>Compression Agent</application>
located in the <guimenuitem>Start</guimenuitem>&gt; <guimenuitem>Programs</guimenuitem> &gt;
<guimenuitem>System Tools</guimenuitem> menu.</para>
<para>&os; can support &ms-dos; based file systems(FAT16 and FAT32).
This requires you use the &man.mount.msdosfs.8; command
with the required parameters. The utility most common usage is:</para>
<screen>&prompt.root; <userinput>mount -t msdosfs /dev/ad0s1 /mnt</userinput></screen>
<para>In this example, the &ms-dos; file system is located on the first partition of
the primary hard disk. Your situation may be different, check the output from
the <command>dmesg</command>, and <command>mount</command> commands. They should
produce enough information to give an idea of the partition layout.</para>
<note><para>Extended &ms-dos; file systems are usually mapped after the &os;
partitions. In other words, the slice number may be higher than the ones
&os; is using. For instance, the first &ms-dos; partition may be
<filename>/dev/ad0s1</filename>, the &os; partition may be
<filename>/dev/ad0s2</filename>, with the extended &ms-dos; partition being
located on <filename>/dev/ad0s3</filename>. To some, this can be confusing
at first.</para></note>
<para>NTFS partitions can also be mounted in a similar manner
using the &man.mount.ntfs.8; command.</para>
</sect2>
<sect2>
<title>Troubleshooting Questions and Answers</title>
<qandaset>
<qandaentry>
<question>
<para>My system hangs while probing hardware during boot,
or it behaves strangely during install, or the floppy
drive isn't probed.</para>
</question>
<answer>
<para>&os; 5.0 and above makes extensive use of the system
ACPI service on the i386, amd64 and ia64 platforms to
aid in system configuration if it's detected during
boot. Unfortunately, some bugs still exist in both the
ACPI driver and within system motherboards and BIOS.
The use of ACPI can be disabled by setting
the <literal>hint.acpi.0.disabled</literal> hint in the
third stage boot loader:</para>
<screen>set hint.acpi.0.disabled="1"</screen>
<para>This is reset each time the system is booted, so it
is necessary to
add <literal>hint.acpi.0.disabled="1"</literal> to the
file
<filename>/boot/loader.conf</filename>. More
information about the boot loader can be found
in <xref linkend="boot-synopsis">.</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>I go to boot from the hard disk for the first time
after installing &os;, the kernel loads and probes my
hardware, but stops with messages like:</para>
<screen>changing root device to ad1s1a panic: cannot mount root</screen>
<para>What is wrong? What can I do?</para>
<para>What is this
<literal>bios_drive:interface(unit,partition)kernel_name</literal>
thing that is displayed with the boot help?</para>
</question>
<answer>
<para>There is a longstanding problem in the case where
the boot disk is not the first disk in the system. The
BIOS uses a different numbering scheme to &os;, and
working out which numbers correspond to which is
difficult to get right.</para>
<para>In the case where the boot disk is not the first
disk in the system, &os; can need some help finding it.
There are two common situations here, and in both of
these cases, you need to tell &os; where the root
filesystem is. You do this by specifying the BIOS disk
number, the disk type and the &os; disk number for that
type.</para>
<para>The first situation is where you have two IDE disks,
each configured as the master on their respective IDE
busses, and wish to boot &os; from the second disk. The
BIOS sees these as disk 0 and disk 1, while &os; sees
them as <devicename>ad0</devicename> and
<devicename>ad2</devicename>.</para>
<para>&os; is on BIOS disk 1, of type
<literal>ad</literal> and the &os; disk number is 2, so
you would say:</para>
<screen><userinput>1:ad(2,a)kernel</userinput></screen>
<para>Note that if you have a slave on the primary bus,
the above is not necessary (and is effectively
wrong).</para>
<para>The second situation involves booting from a SCSI
disk when you have one or more IDE disks in the system.
In this case, the &os; disk number is lower than the
BIOS disk number. If you have two IDE disks as well as
the SCSI disk, the SCSI disk is BIOS disk 2,
type <literal>da</literal> and &os; disk number 0, so
you would say:</para>
<screen><userinput>2:da(0,a)kernel</userinput></screen>
<para>To tell &os; that you want to boot from BIOS disk 2,
which is the first SCSI disk in the system. If you only
had one IDE disk, you would use '1:' instead.</para>
<para>Once you have determined the correct values to use,
you can put the command exactly as you would have typed
it in the <filename>/boot.config</filename> file using a
standard text editor. Unless instructed otherwise, &os;
will use the contents of this file as the default
response to the <literal>boot:</literal> prompt.</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>I go to boot from the hard disk for the first time
after installing &os;, but the Boot Manager prompt just
prints <literal>F?</literal> at the boot menu each time
but the boot won't go any further.</para>
</question>
<answer>
<para>The hard disk geometry was set incorrectly in the
Partition editor when you installed &os;. Go back into
the partition editor and specify the actual geometry of
your hard disk. You must reinstall &os; again from the
beginning with the correct geometry.</para>
<para>If you are failing entirely in figuring out the
correct geometry for your machine, here's a tip: Install
a small DOS partition at the beginning of the disk and
install &os; after that. The install program will see
the DOS partition and try to infer the correct geometry
from it, which usually works.</para>
<para>The following tip is no longer recommended, but is
left here for reference:</para>
<blockquote>
<para>If you are setting up a truly dedicated &os;
server or workstation where you don't care for
(future) compatibility with DOS, Linux or another
operating system, you've also got the option to use
the entire disk (`A' in the partition editor),
selecting the non-standard option where &os; occupies
the entire disk from the very first to the very last
sector. This will leave all geometry considerations
aside, but is somewhat limiting unless you're never
going to run anything other than &os; on a
disk.</para>
</blockquote>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>The system finds my &man.ed.4; network card, but I
keep getting device timeout errors.</para>
</question>
<answer>
<para>Your card is probably on a different IRQ from what
is specified in
the <filename>/boot/device.hints</filename> file. The
ed driver does not use the `soft' configuration by
default (values entered using EZSETUP in DOS), but it
will use the software configuration if you
specify <literal>-1</literal> in the hints for the
interface.</para>
<para>Either move the jumper on the card to a hard
configuration setting (altering the kernel settings if
necessary), or specify the IRQ as <literal>-1</literal>
by setting the hint <quote>hint.ed.0.irq="-1"</quote>
This will tell the kernel to use the soft
configuration.</para>
<para>Another possibility is that your card is at IRQ 9,
which is shared by IRQ 2 and frequently a cause of
problems (especially when you have a VGA card using IRQ
2!). You should not use IRQ 2 or 9 if at all
possible.</para>
</answer>
</qandaentry>
</qandaset>
</sect2>
</sect1>
<sect1 id="install-advanced">
<sect1info>
<authorgroup>
<author>
<firstname>Valentino</firstname>
<surname>Vaschetto</surname>
<contrib>Contributed by </contrib>
</author>
<!-- May 2001 -->
</authorgroup>
</sect1info>
<title>進階安裝指南</title>
<para>This section describes how to install FreeBSD in exceptional
cases.</para>
<sect2 id="headless-install">
<title>Installing FreeBSD on a System without a Monitor or
Keyboard</title>
<indexterm>
<primary>installation</primary>
<secondary>headless (serial console)</secondary>
</indexterm>
<indexterm><primary>serial console</primary></indexterm>
<para>This type of installation is called a <quote>headless
install</quote>, because the machine that you are trying to install
FreeBSD on either does not have a monitor attached to it, or does not
even have a VGA output. How is this possible you ask? Using a
serial console. A serial console is basically using another
machine to act as the main display and keyboard for a
system. To do this, just follow the steps to create
installation floppies, explained in <xref
linkend="install-floppies">.</para>
<para>To modify these floppies to boot into a serial console, follow
these steps:</para>
<procedure>
<step>
<title>Enabling the Boot Floppies to Boot into a Serial Console</title>
<indexterm>
<primary><command>mount</command></primary>
</indexterm>
<para>If you were to boot into the floppies that you just
made, FreeBSD would boot into its normal install mode. We
want FreeBSD to boot into a serial console for our
install. To do this, you have to mount the
<filename>boot.flp</filename> floppy onto your FreeBSD
system using the &man.mount.8; command.</para>
<screen>&prompt.root; <userinput>mount /dev/fd0 /mnt</userinput></screen>
<para>Now that you have the floppy mounted, you must
change into the <filename class="directory">/mnt</filename> directory:</para>
<screen>&prompt.root; <userinput>cd /mnt</userinput></screen>
<para>Here is where you must set the floppy to boot into a
serial console. You have to make a file called
<filename>boot.config</filename> containing
<literal>/boot/loader -h</literal>. All this does is pass a flag to the bootloader to
boot into a serial console.</para>
<screen>&prompt.root; <userinput>echo "/boot/loader -h" > boot.config</userinput></screen>
<para>Now that you have your floppy configured correctly,
you must unmount the floppy using the &man.umount.8;
command:</para>
<screen>&prompt.root; <userinput>cd /</userinput>
&prompt.root; <userinput>umount /mnt</userinput></screen>
<para>Now you can remove the floppy from the floppy
drive.</para>
</step>
<step>
<title>Connecting Your Null-modem Cable</title>
<indexterm><primary>null-modem cable</primary></indexterm>
<para>You now need to connect a
<link linkend="term-cables-null">null-modem cable</link> between
the two machines. Just connect the cable to the serial
ports of the 2 machines. <emphasis>A normal serial cable
will not work here</emphasis>, you need a null-modem
cable because it has some of the wires inside crossed
over.</para>
</step>
<step>
<title>Booting Up for the Install</title>
<para>It is now time to go ahead and start the install. Put
the <filename>boot.flp</filename> floppy in the floppy
drive of the machine you are doing the headless install
on, and power on the machine.</para>
</step>
<step>
<title>Connecting to Your Headless Machine</title>
<indexterm>
<primary><command>cu</command></primary>
</indexterm>
<para>Now you have to connect to that machine with
&man.cu.1;:</para>
<screen>&prompt.root; <userinput>cu -l /dev/cuad0</userinput></screen>
<para>在 &os;&nbsp;5.X請改用
<filename>/dev/cuaa0</filename> 而非
<filename>/dev/cuad0</filename>。</para>
</step>
</procedure>
<para>That's it! You should now be able to control the headless machine
through your <command>cu</command> session. It will ask you to
put in the <filename>kern1.flp</filename>, and then it will come up
with a selection of what kind of terminal to use. Select the
FreeBSD color console and proceed with your install!</para>
</sect2>
</sect1>
<sect1 id="install-diff-media">
<title>製作安裝片</title>
<note>
<para>為避免重覆說明在文中所提到的「FreeBSD 光碟」,
在這裡指的是您所購買或自行燒錄的 FreeBSD CDROM 或 DVD。</para>
</note>
<para>There may be some situations in which you need to create your own
FreeBSD installation media and/or source. This might be physical media,
such as a tape, or a source that <application>sysinstall</application>
can use to retrieve the files, such as a local FTP site, or an &ms-dos;
partition.</para>
<para>For example:</para>
<itemizedlist>
<listitem>
<para>You have many machines connected to your local network, and one
FreeBSD disc. You want to create a local FTP site using the
contents of the FreeBSD disc, and then have your machines use this
local FTP site instead of needing to connect to the Internet.</para>
</listitem>
<listitem>
<para>You have a FreeBSD disc, and FreeBSD does not recognize your CD/DVD
drive, but &ms-dos;/&windows; does. You want to copy the FreeBSD
installation files to a DOS partition on the same computer, and
then install FreeBSD using those files.</para>
</listitem>
<listitem>
<para>The computer you want to install on does not have a CD/DVD
drive or a network card, but you can connect a
<quote>Laplink-style</quote> serial or parallel cable to a computer
that does.</para>
</listitem>
<listitem>
<para>You want to create a tape that can be used to install
FreeBSD.</para>
</listitem>
</itemizedlist>
<sect2 id="install-cdrom">
<title>Creating an Installation CDROM</title>
<para>As part of each release, the FreeBSD project makes available at least two
CDROM images (<quote>ISO images</quote>) per supported architecture. These images can be written
(<quote>burned</quote>) to CDs if you have a CD writer, and then used
to install FreeBSD. If you have a CD writer, and bandwidth is cheap,
then this is the easiest way to install FreeBSD.</para>
<procedure>
<step>
<title>Download the Correct ISO Images</title>
<para>The ISO images for each release can be downloaded from <filename>ftp://ftp.FreeBSD.org/pub/FreeBSD/ISO-IMAGES-<replaceable>arch</replaceable>/<replaceable>version</replaceable></filename> or the closest mirror.
Substitute <replaceable>arch</replaceable> and
<replaceable>version</replaceable> as appropriate.</para>
<para>That directory will normally contain the following images:</para>
<table frame="none">
<title>FreeBSD 5.<replaceable>X</replaceable> and 6.<replaceable>X</replaceable>
ISO Image Names and Meanings</title>
<tgroup cols="2">
<thead>
<row>
<entry>檔名</entry>
<entry>內容</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架構</replaceable>-bootonly.iso</filename></entry>
<entry>Everything you need to boot into a FreeBSD
kernel and start the installation interface.
The installable files have to be pulled over FTP
or some other supported source.</entry>
</row>
<row>
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架構</replaceable>-disc1.iso</filename></entry>
<entry>Everything you need to install &os; and a
<quote>live filesystem</quote>, which is used in
conjunction with the <quote>Repair</quote> facility
in <application>sysinstall</application>.</entry>
</row>
<row>
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架構</replaceable>-disc2.iso</filename></entry>
<entry>&os; 文件(&os; 6.2 之前的),以及許多 third-party
packages。</entry>
</row>
<row>
<entry><filename><replaceable>版本</replaceable>-RELEASE-<replaceable>架構</replaceable>-docs.iso</filename></entry>
<entry>&os; 文件(&os; 6.2 及之後)。</entry>
</tbody>
</tgroup>
</table>
<para>You <emphasis>must</emphasis> download one of either the bootonly
ISO image (if available), or the image of disc one. Do not download
both of them, since the disc one image contains everything that the
bootonly ISO image contains.</para>
<para>Use the bootonly ISO if Internet access is cheap for you. It will
let you install &os;, and you can then install third-party
packages by downloading them using the ports/packages system (see
<xref linkend="ports">) as
necessary.</para>
<para>Use the image of disc one if you want to install a &os;
release and want
a reasonable selection of third-party packages on the disc
as well.</para>
<para>The additional disc images are useful, but not essential,
especially if you have high-speed access to the Internet.</para>
</step>
<step>
<title>Write the CDs</title>
<para>You must then write the CD images to disc. If you will be
doing this on another FreeBSD system then see
<xref linkend="creating-cds"> for more information (in
particular, <xref linkend="burncd"> and
<xref linkend="cdrecord">).</para>
<para>If you will be doing this on another platform then you will
need to use whatever utilities exist to control your CD writer on
that platform. The images provided are in the standard ISO format,
which many CD writing applications support.</para>
</step>
</procedure>
<note><para>If you are interested in building a customized
release of FreeBSD, please see the <ulink
url="&url.articles.releng;">Release Engineering
Article</ulink>.</para></note>
</sect2>
<sect2 id="install-ftp">
<title>Creating a Local FTP Site with a FreeBSD Disc</title>
<indexterm>
<primary>installation</primary>
<secondary>network</secondary>
<tertiary>FTP</tertiary>
</indexterm>
<para>FreeBSD discs are laid out in the same way as the FTP site. This
makes it very easy for you to create a local FTP site that can be used
by other machines on your network when installing FreeBSD.</para>
<procedure>
<step>
<para>On the FreeBSD computer that will host the FTP site, ensure
that the CDROM is in the drive, and mounted on
<filename>/cdrom</filename>.</para>
<screen>&prompt.root; <userinput>mount /cdrom</userinput></screen>
</step>
<step>
<para>Create an account for anonymous FTP in
<filename>/etc/passwd</filename>. Do this by editing
<filename>/etc/passwd</filename> using &man.vipw.8; and adding
this line:</para>
<programlisting>ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent</programlisting>
</step>
<step>
<para>Ensure that the FTP service is enabled in
<filename>/etc/inetd.conf</filename>.</para>
</step>
</procedure>
<para>Anyone with network connectivity to your machine can now
chose a media type of FTP and type in
<userinput>ftp://<replaceable>your machine</replaceable></userinput>
after picking <quote>Other</quote> in the FTP sites menu during
the install.</para>
<note>
<para>If the boot media (floppy disks, usually) for your FTP
clients is not precisely the same version as that provided
by the local FTP site, then <application>sysinstall</application> will not let you
complete the installation. If the versions are not similar and
you want to override this, you must go into the <guimenu>Options</guimenu> menu
and change distribution name to
<guimenuitem>any</guimenuitem>.</para>
</note>
<warning>
<para>This approach is OK for a machine that is on your local network,
and that is protected by your firewall. Offering up FTP services to
other machines over the Internet (and not your local network)
exposes your computer to the attention of crackers and other
undesirables. We strongly recommend that you follow good security
practices if you do this.</para>
</warning>
</sect2>
<sect2>
<title>建立安裝用的磁片</title>
<indexterm>
<primary>installation</primary>
<secondary>floppies</secondary>
</indexterm>
<para>若您必須從磁片安裝(雖然我們<emphasis>不</emphasis>建議這樣做)
不論是因為硬體不支援或是您堅持要用這麼刻苦的方式,
您都必須先準備一些磁片以供安裝。</para>
<para>磁片至少得是 1.44&nbsp;MB
At a minimum, you will need as many 1.44&nbsp;MB floppies
as it takes to hold all the files in the
<filename>base</filename> (base distribution) directory. If
you are preparing the floppies from DOS, then they
<emphasis>must</emphasis> be formatted using the &ms-dos;
<command>FORMAT</command> command. If you are using &windows;,
use Explorer to format the disks (right-click on the
<devicename>A:</devicename> drive, and select <quote>Format</quote>).</para>
<para>Do <emphasis>not</emphasis> trust factory pre-formatted
floppies. Format them again yourself, just to be sure. Many
problems reported by our users in the past have resulted from
the use of improperly formatted media, which is why we are
making a point of it now.</para>
<para>If you are creating the floppies on another FreeBSD machine,
a format is still not a bad idea, though you do not need to put
a DOS filesystem on each floppy. You can use the
<command>disklabel</command> and <command>newfs</command>
commands to put a UFS filesystem on them instead, as the
following sequence of commands (for a 3.5" 1.44&nbsp;MB floppy)
illustrates:</para>
<screen>&prompt.root; <userinput>fdformat -f 1440 fd0.1440</userinput>
&prompt.root; <userinput>bsdlabel -w fd0.1440 floppy3</userinput>
&prompt.root; <userinput>newfs -t 2 -u 18 -l 1 -i 65536 /dev/fd0</userinput></screen>
<para>Then you can mount and write to them like any other
filesystem.</para>
<para>After you have formatted the floppies, you will need to copy
the files to them. The distribution files are split into chunks
conveniently sized so that five of them will fit on a conventional
1.44&nbsp;MB floppy. Go through all your floppies, packing as many
files as will fit on each one, until you have all of the
distributions you want packed up in this fashion. Each
distribution should go into a subdirectory on the floppy, e.g.:
<filename>a:\base\base.aa</filename>,
<filename>a:\base\base.ab</filename>, and so on.</para>
<important>
<para>The <filename>base.inf</filename> file also needs to go on the
first floppy of the <filename>base</filename> set since it is read
by the installation program in order to figure out how many
additional pieces to look for when fetching and concatenating the
distribution.</para>
</important>
<para>Once you come to the Media screen during the install
process, select <guimenuitem>Floppy</guimenuitem> and you
will be prompted for the rest.</para>
</sect2>
<sect2 id="install-msdos">
<title>從 &ms-dos; 分割區安裝</title>
<indexterm>
<primary>installation</primary>
<secondary>from MS-DOS</secondary>
</indexterm>
<para>若準備要從 &ms-dos; 分割區進行安裝,
請把所有安裝檔都複製到該分割區根目錄內的 <filename>freebsd</filename>
目錄。 比如:<filename>c:\freebsd</filename>。
此目錄結構必須與光碟或 FTP 內的目錄結構一致,
因此若是要從光碟複製檔案,建議使用 DOS 的 <command>xcopy</command>
指令。 例如,要複製 &os; 最小安裝所需的檔案:</para>
<screen><prompt>C:\&gt;</prompt> <userinput>md c:\freebsd</userinput>
<prompt>C:\&gt;</prompt> <userinput>xcopy e:\bin c:\freebsd\bin\ /s</userinput>
<prompt>C:\&gt;</prompt> <userinput>xcopy e:\manpages c:\freebsd\manpages\ /s</userinput></screen>
<para>假設 <devicename>C:</devicename> 槽有多餘空間,可以放 &os;
安裝檔;<devicename>E:</devicename>則是光碟機代號。</para>
<para>若沒有光碟機,可以到 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/">ftp.FreeBSD.org</ulink> 去下載安裝檔。
每個安裝套件都有其相對應的目錄;比如 <emphasis>base</emphasis>
是放在 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/base/">&rel.current;/base/</ulink>
目錄內。</para>
<para>請將您要安裝的套件(當然空間要夠)放到 &ms-dos; 分割區的
<filename>c:\freebsd</filename> 裡 &mdash; 因為這個
<literal>BIN</literal> 安裝套件僅供最精簡安裝而已。</para>
</sect2>
<sect2>
<title>製作安裝用的磁帶</title>
<indexterm>
<primary>installation</primary>
<secondary>from QIC/SCSI Tape</secondary>
</indexterm>
<para>從磁帶上安裝也許是最簡單的方式,比用 FTP 或光碟安裝還快。
安裝程式假設所有檔案都會壓縮放在磁帶上。 在取得所有要裝的安裝檔之後
,可以用下列指令把它們壓縮放在磁帶上:</para>
<screen>&prompt.root; <userinput>cd /freebsd/distdir</userinput>
&prompt.root; <userinput>tar cvf /dev/rwt0 dist1 ... dist2</userinput></screen>
<para>當要安裝時,必須先確認磁帶還有足夠空間,
以便讓安裝過程暫存空間(可以自行選擇要放在哪個目錄)
可以容納磁帶安裝時的<emphasis>全部</emphasis>檔案。
由於磁帶本身並不能隨機存取,因此用磁帶安裝會需要很大的暫存空間。
</para>
<note>
<para>在使用安裝磁片開機<emphasis> 之前</emphasis>
磁帶一定要先放入磁帶機內,否則在偵測硬體時可能會無法偵測到磁帶機。
</para>
</note>
</sect2>
<sect2>
<title>Before Installing over a Network</title>
<indexterm>
<primary>installation</primary>
<secondary>network</secondary>
<tertiary>serial (SLIP or PPP)</tertiary>
</indexterm>
<indexterm>
<primary>installation</primary>
<secondary>network</secondary>
<tertiary>parallel (PLIP)</tertiary>
</indexterm>
<indexterm>
<primary>installation</primary>
<secondary>network</secondary>
<tertiary>Ethernet</tertiary>
</indexterm>
<para>有三種網路安裝方式:
Ethernet (標準 Ethernet 晶片)、Serial port(SLIP 或 PPP)、
Parallel port (PLIP (laplink cable))。</para>
<para>透過網路安裝的最快方式,就是使用 Ethernet 網路卡!
&os; 支援大多數常見的 Ethernet 網路卡;
所有支援的網路卡(及其所需的設定)都有在各版本的 &os; 內的 Hardware
Note 說明文件內列出。 若您所用的是有支援的 PCMCIA 網路卡,
請務必在開機<emphasis>之前</emphasis>,先把該網路卡插上。 因為 &os;
的安裝過程,目前並不支援 PCMCIA 卡的熱插拔。</para>
<para>此外,還需要知道該用的 IP 位址以及相對應的 netmask 為何,
以及機器名稱。 若所用的是 PPP 連線,而且沒有固定 IP別擔心
因為您的 ISP 會自動分配 IP 給您。 關於這些網路的細部設定,
可以洽詢您網路環境的系統管理者。
若要能以機器名稱就能連到相對應的機器,而非直接使用 IP位址去連
那麼您還需要 DNS 以及 gateway 的位址(若用的是 PPP 連線,
gateway 位址就是 ISP 所分配給你的 IP 位址)。 若想透過 HTTP proxy
來使用 FTP 安裝,那麼必須知道 proxy 的網址為何。
若您對上述所需資訊不甚了解,那麼請在安裝<emphasis>之前</emphasis>
先詢問系統管理者或 ISP。</para>
<para>SLIP 的支援相當原始,並且主要受限於電腦之間的實體線路(hard-wired)
,比如筆記型電腦與其他電腦之間的 serial 線。
之所以得以電腦間以直接線路連結,乃是由於 SLIP
安裝目前並不支援撥接功能。 PPP 才有提供撥接功能,
所以請儘可能優先採用 PPP 而非 SLIP。</para>
<para>若要透過數據機(modem)來安裝,那 PPP 幾乎是您唯一選擇。
請先準備好 ISP 所提供的相關資料,因為在安裝之初就會用到。</para>
<para>若使用 PAP 或 CHAP 來連到 ISP(換句話說,若在 &windows;
可以不透過 script 就可以連線到 ISP),那麼您僅需在
<application>ppp</application> 提示符號下輸入 <command>dial</command>
指令即可撥號。 否則,您必須知道如何以該數據機所採用的
<quote>AT 指令集</quote>來連到 ISP因為 PPP 撥號程式僅提供非常陽春的
終端模擬器(terminal emulator)而起。 請參閱 Handbook 中 <link
linkend="userppp">user-ppp</link> 章節以及 <ulink
url="&url.books.faq;/ppp.html">FAQ</ulink> 中的相關項目。
若有操作上的疑問,可以打 <command>set log local ...</command>
指令,以便在螢幕上顯示相關記錄。</para>
<para>若可直接以 hard-wired 方式連到另外的 &os;(2.0-R 及之後) 機器,
那麼可以考慮透過 <quote>laplink</quote> 平行電纜來安裝。
平行埠的傳輸速率比序列埠高很多(最高可達每秒 50&nbsp;kbytes/sec)
所以安裝速度會更快一些。</para>
<sect3>
<title>Before Installing via NFS</title>
<indexterm>
<primary>installation</primary>
<secondary>network</secondary>
<tertiary>NFS</tertiary>
</indexterm>
<para>NFS 安裝方式相當簡便,只需將 FreeBSD 安裝檔案都放到某台 NFS
server 上,然後再指定使用這台 NFS 作為安裝來源即可。</para>
<para>若該 server 只允許 <quote>privileged port</quote>(通常這是 Sun
工作站的預設值),那麼在安裝之前,必須先到 <guimenu>Options</guimenu>
選單去指定 <literal>NFS Secure</literal> 設定值。</para>
<para>若網路卡的連線品質不佳,那可能需要調整一下
<literal>NFS Slow</literal> 設定。</para>
<para>為了讓 NFS 安裝能順利完成NFS 主機必須要可以支援子目錄的掛載
(mount),例如:&os;&nbsp;&rel.current; 安裝目錄是在:
<filename>ziggy:/usr/archive/stuff/FreeBSD</filename>,那麼
<hostid>ziggy</hostid> 必須允許直接掛載在
<filename>/usr/archive/stuff/FreeBSD</filename>,而非僅
<filename>/usr</filename> 或是
<filename>/usr/archive/stuff</filename>。</para>
<para>在 &os; 的 <filename>/etc/exports</filename> 檔,上述功能是由
<option>-alldirs</option> 選項所設定。 其他的 NFS server
可能會有不同的設定方式。 若看到
<errorname>permission denied</errorname> 錯誤訊息,
則表示可能由於沒有啟用這選項所造成的。</para>
</sect3>
</sect2>
</sect1>
</chapter>
<!--
Local Variables:
mode: sgml
sgml-declaration: "../chapter.decl"
sgml-indent-data: t
sgml-omittag: nil
sgml-always-quote-attributes: t
sgml-parent-document: ("../book.sgml" "part" "chapter")
End:
-->