From owner-svn-doc-all@freebsd.org Fri Feb 24 10:10:37 2017 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9113CEBD56; Fri, 24 Feb 2017 10:10:37 +0000 (UTC) (envelope-from rcyu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17A26B57; Fri, 24 Feb 2017 10:10:37 +0000 (UTC) (envelope-from rcyu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1OAAaHE084754; Fri, 24 Feb 2017 10:10:36 GMT (envelope-from rcyu@FreeBSD.org) Received: (from rcyu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OAAadu084752; Fri, 24 Feb 2017 10:10:36 GMT (envelope-from rcyu@FreeBSD.org) Message-Id: <201702241010.v1OAAadu084752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rcyu set sender to rcyu@FreeBSD.org using -f From: Ruey-Cherng Yu Date: Fri, 24 Feb 2017 10:10:36 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r50006 - head/zh_TW.UTF-8/books/handbook X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2017 10:10:37 -0000 Author: rcyu Date: Fri Feb 24 10:10:35 2017 New Revision: 50006 URL: https://svnweb.freebsd.org/changeset/doc/50006 Log: Update po file with newest handbook document. Update translate 4. Installing Applications: Packages and Ports Update translate 6.2. Browsers Fix translate (Gateway, MTA). Translated following chaptors or sectors: 11. Configuration and Tuning 11.13. Power and Resource Management 12. The FreeBSD Booting Process 12.1. Synopsis 12.2. FreeBSD Boot Process 12.3. Configuring Boot Time Splash Screens 12.4. Device Hints 12.5. Shutdown Sequence 13. Security 13.1. Synopsis 13.2. Introduction 17. Storage 17.8. Backup Basics 28. Network Servers 28.5. Lightweight Directory Access Protocol (LDAP) 28.6. Dynamic Host Configuration Protocol (DHCP) A. Obtaining FreeBSD A.2. FTP Sites A.3. Using Subversion A.4. Using rsync Submitted by: cwlin0416@gmail.com Differential Revision: https://reviews.freebsd.org/D9761 Modified: head/zh_TW.UTF-8/books/handbook/book.xml head/zh_TW.UTF-8/books/handbook/zh_TW.po Modified: head/zh_TW.UTF-8/books/handbook/book.xml ============================================================================== --- head/zh_TW.UTF-8/books/handbook/book.xml Thu Feb 23 20:55:53 2017 (r50005) +++ head/zh_TW.UTF-8/books/handbook/book.xml Fri Feb 24 10:10:35 2017 (r50006) @@ -241,6 +241,7 @@ + @@ -282,6 +283,7 @@ + @@ -342,6 +344,7 @@ + @@ -414,6 +417,7 @@ + @@ -494,6 +498,7 @@ + @@ -2255,7 +2260,7 @@ - 預設閘道器 IP 位址 + 預設通訊閘 IP 位址 @@ -3250,7 +3255,7 @@ Ethernet address 0:3:ba:b:92:d4, Host ID - 預設路由器 (Default Router) - IP 位址所在網段的預設閘道器。 + 預設路由器 (Default Router) - IP 位址所在網段的預設通訊閘。 @@ -3298,7 +3303,7 @@ Ethernet address 0:3:ba:b:92:d4, Host ID - 預設路由器 (Default Router) - IPv6 位址所在網段的預設閘道器。 + 預設路由器 (Default Router) - IPv6 位址所在網段的預設通訊閘。 @@ -4856,7 +4861,7 @@ root 5211 0.0 0.2 3620 1724 2 /etc/mail/ - MTA (Mail Transport Agent) 的相關設定檔,像是 sendmail8 + 郵件傳輸代理程式,像是 sendmail8 的相關設定檔。 @@ -5956,7 +5961,7 @@ Swap: 2048M Total, 2048M Free ports 套件 - FreeBSD 已內建豐富的系統工具,此外 FreeBSD 提供了 2 種安裝第三方軟體的套件管理技術︰由原始碼安的 FreeBSD Port 套件集,以及由預先編譯好的 Binary 安裝的 Binary 套件集。 無論要用哪一種方式,都可由本地的媒體或網路來安裝軟體。 + FreeBSD 內建豐富的系統工具集,此外 FreeBSD 提供了兩種安裝第三方軟體的套件管理技術︰由原始碼安裝的 FreeBSD Port 套件集,以及由預先編譯好的 Binary 安裝的 Binary 套件集。兩種方法都可使用本地的媒體或網路來安裝軟體。 讀完這章,您將了解︰ @@ -5998,7 +6003,7 @@ Swap: 2048M Total, 2048M Free - 解壓縮軟體。 發佈的格式通常會使用 tarball 並以 compress1, gzip1bzip21 壓縮。 + 自發佈的格式解壓縮軟體。 發佈的格式通常為 tarball 並以程式壓縮,如 compress1, gzip1, bzip21xz1 @@ -6014,17 +6019,19 @@ Swap: 2048M Total, 2048M Free - 如果軟體套件未被特意移植到 FreeBSD 或測試是否可運作。 那可能需要修改一下該軟體的原始碼才能正常使用。 在搛寫此篇文章時候, 已經有超過 24,000 個第三方應用程式已經被移植到 FreeBSD。 + FreeBSD Port 是指設計用來自動化從原始碼編譯應用程式整個程序的一系列檔案,組成 Port 的檔案包含了自動下載、解壓縮、修補、編譯與安裝應用程式的必要資訊。 - FreeBSD Binary 套件中包含了應用程式預先編譯好的指令、設定檔及文件。 套件可以使用 pkg 指令來管理,如 pkg install + 若軟體尚未被 FreeBSD 採用並測試,可能會需要經過一些修正才能正常安裝並執行。 - FreeBSD Port 套件則包含了已設計好從原始碼編譯成應用程式的自動化程序。 Port 套件中的檔案包含自動下載、解壓縮、修補、編譯及安裝應用程式流程中所有需要的資訊。 + 雖然如此,目前已有超過 24,000 個第三方應用程式已經被移植到 FreeBSD。當可行時,這些應用程式也會做成預先編譯好的 套件 (Package) 供下載。 - Port 系統可以透過 FreeBSD 套件管理指令來產生套件。 + 這些 Binary 套件可使用 FreeBSD 套件管理指令來管理。 - 不論是 Binary 套件或者 Port 套件都有相依的功能,若以 Binary 或 Port 套件安裝應用程式,且該應用程式有相依的程式庫尚未被安裝,則會自動先安裝該程式庫。 + 不論是 Binary 套件或者 Port 都有相依性,若用 Binary 套件或 Port 來安裝應用程式,且該應用程式若有相依的程式庫尚未被安裝,則會自動先安裝該程式庫。 - 雖然兩種技術非常相似,但 Binary 套件及 Port 套件有各自的優點。 要視您要安裝的應用程式需求來選擇。 + FreeBSD Binary 套件中含有一個應用程式中所有預先編譯好的指令、設定檔以及文件,Binary 套件可以使用 pkg8 指令來管理,如 pkg install + + 雖然兩種技術非常相似,但 Binary 套件及 Port 有各自的優點。 要視您要安裝的應用程式需求來選擇。 Binary 套件優點 @@ -6191,26 +6198,35 @@ Info: Lists information about open fil pkg 是新一代套件管理工具用來取代舊版工具,提供許多功能讓處理 Binary 套件更快更簡單。 - pkg 並不是用來取代 Port 管理工具如 ports-mgmt/portmasterports-mgmt/portupgrade,這些工具可用來安裝來自 Binary 與 Port 套件集的第三方軟體,而 pkg 僅能安裝 Binary 套件。 + 對於只想要使用在 FreeBSD 鏡像站上預先編譯 Binary 套件的站台,使用 pkg 管理套件便已足夠。 + + 但是,對於那些想要從原始碼或使用自己的檔案庫編譯的站台,則會需要 Port 管理工具。 + + 因為 pkg 僅能管理 Binary 套件,所以不能當做為替代 Port 管理工具,這些工具可用來安裝來自 Binary 與 Port 套件集的軟體,而 pkg 僅能安裝 Binary 套件。 開始使用 <application>pkg</application> - FreeBSD 內建啟動 (Bootstrap) 工具可用來下載並安裝 pkg 及其操作手冊。 + FreeBSD 內建啟動 (Bootstrap) 工具可用來下載並安裝 pkg 及其操作手冊。這個工具是設計在 FreeBSD 版本 10.X 之後使用。 + + + 不是所有 FreeBSD 版本及架構支援此啟動程序,目前支援的清單列於 ,對不支援的版本,必須改透過 Port 套件集或者 Binary 套件來安裝 pkg + + - 要啟動(Bootstrap)系統請執行: + 要啟動 (Bootstrap) 系統請執行: # /usr/sbin/pkg - 對較舊的 FreeBSD 版本,pkg 必須改透過 Port 套件集或者 Binary 套件來安裝。 + 您必須有網際網路連線供啟動程式使用。 - 要安裝 Port 套件,請執行: + 否則,要安裝 Port 套件,則須執行: # cd /usr/ports/ports-mgmt/pkg # make # make install clean - 當升級原使用舊版套件系統的既有系統時,必須將資料庫轉換成新的格式,因此新的工具才會知道有那些已安裝過的套件。一旦 pkg 已安裝,必須執行以下指令將套件資料庫從舊版格式轉換到新版格式: + 當升級原使用舊版 pkg_* 工具的既有系統時,必須將資料庫轉換成新的格式,如此新的工具才會知道有那些已安裝過的套件。pkg 安裝完後,必須執行以下指令將套件資料庫從舊版格式轉換到新版格式: # pkg2ng @@ -6221,15 +6237,14 @@ Info: Lists information about open fil - 套件資料庫轉換的過程可能會因內容轉換為新版本產生錯誤。通常,這些錯誤皆可安全忽略,雖然如此,仍然有在執行 pkg2ng 後無法成功轉換的第三方軟體清單,這些應用程式則必須手動重新安裝。 + 套件資料庫轉換的過程可能會因內容轉換為新版本產生錯誤。通常,這些錯誤皆可安全忽略,即使如此,仍然有在執行 pkg2ng 後無法成功轉換的軟體清單,這些應用程式則必須手動重新安裝。 - 為了確保 FreeBSD Port 套件集會將新軟體的資訊註冊到 pkg 而非舊版套件格式,FreeBSD 版本 10.X 之前需要在 /etc/make.conf 加入此行: + 為了確保 FreeBSD Port 套件集會將新軟體的資訊註冊到 pkg 而非舊版套件資料庫,FreeBSD 版本 10.X 之前需要在 /etc/make.conf 加入此行: WITH_PKGNG= yes - 預設 pkg 會使用 FreeBSD 套件鏡像站。若要取得有關編譯自訂套件檔案庫的資訊,請參考 - + 預設 pkg 會使用 FreeBSD 套件鏡像站 (Repository) 的 Binary 套件。若要取得有關編譯自訂套件檔案庫的資訊,請參考 其他 pkg 設定選項說明請參考 pkg.conf5 @@ -6319,7 +6334,7 @@ Proceed with deleting packages [y/N]: 稽查已安裝套件 - 偶爾可能會在第三方的應用程式中發現軟體漏洞,要找出這些程式,可使用 pkg 內建的稽查機制。要查詢已安裝在系統上的軟體是否有任何已知的漏洞可執行: + 在第三方的應用程式中偶爾可能會發現軟體漏洞,要找出這些程式,可使用 pkg 內建的稽查機制。要查詢已安裝在系統上的軟體是否有任何已知的漏洞可執行: # pkg audit -F @@ -6401,7 +6416,11 @@ Deinstalling ca_root_nss-3.15.1_1... don 使用 Port 套件集 - Port 套件集是指一系列儲存在 /usr/portsMakefiles、修補及描述檔,這一系列檔案用來編譯與安裝在 FreeBSD 上的應用程式。在使用 Port 安裝應用程式前,必須先安裝 Port 套件集,若未在安裝 FreeBSD 的過程式中安裝,可使用下列其中一種方法來安裝: + Port 套件集是指一數個 Makefiles、修補及描述檔案,每一組這些檔案可用來編譯與安裝在 FreeBSD 上的一個應用程式,即稱為一個 Port + + 預設,Port 套件集儲存在 /usr/ports 的子目錄下。 + + 在應用程式可以使用 Port 編譯之前,必須先安裝 Port 套件集。若在安裝 FreeBSD 時沒有安裝,可以使用以下其中一種方式安裝: Portsnap 方法 @@ -6462,7 +6481,7 @@ Deinstalling ca_root_nss-3.15.1_1... don - Port 套件集會安裝一系列代表軟體分類的目錄,每個分類底下的子目錄代表每隻應用程式。 這些子目錄又稱做 Port Skeleton,裡面檔案是用來告訴 FreeBSD 如何編譯與安裝該程式,每個 Port Skeleton 會含有以下檔案及目錄: + Port 套件集中含有代表不同軟體分類的目錄,每個分類底下的子目錄代表每個應用程式,每個內含數個用來告訴 FreeBSD 如何編譯與安裝該程式檔案的應用程式子目錄即稱作 Port Skeleton,每個 Port Skeleton 會含有以下檔案及目錄: @@ -6642,7 +6661,20 @@ The deinstallation will free 229 kB 在嘗試升級之前,請先從檔首閱讀 /usr/ports/UPDATING 來取得最近有那些 Port 已升級或系統已安裝。這個檔案中會說明各種問題及在升級 Port 時可能會需要使用者執行的額外步驟,例如檔案格式更改、設定檔位置更改、或任何與先前版本不相容的問題。留意那些與您要升級 Port 相關的指示,並依照這些指示執行升級。 - 要執行實際的升級,可使用 PortmasterPortupgrade + + 升級與管理 Port 的工具 + + ports upgrading-tools + + Port 套件集含有數個工具可以進行升級,每一種工具都有其優點及缺點。 + + 以往大多 Port 安裝會使用 PortmasterPortupgrade,現在有較新的 Synth 可使用。 + + + 那一種工具對特定系統是最佳的選擇取決於系統管理員。建議在使用任何這些工具之前先備份資料。 + + + 使用 <application>Portmaster</application> 升級 Port @@ -6651,7 +6683,7 @@ The deinstallation will free 229 kB portmaster - ports-mgmt/portmaster 是可用來升級已安裝 Port 的小巧工具,它可不需要相依其他 Port 或資料庫便可在 FreeBSD 使用,要使用 Port 安裝此工具可: + ports-mgmt/portmaster 是可用來升級已安裝 Port 的小巧工具,它只使用了隨 FreeBSD 基礎系統安裝的工具,不需要相依其他 Port 或資料庫便可在 FreeBSD 使用,要使用 Port 安裝此工具可: # cd /usr/ports/ports-mgmt/portmaster # make install clean @@ -6715,6 +6747,8 @@ The deinstallation will free 229 kB Portmaster 也可用來安裝新的 Port 到系統,在編譯及安裝新 Port 前升級所有相依模組。要使用這個功能,要指定 Port 位於 Port 套件集中的位置: # portmaster shells/bash + + 更多有關 ports-mgmt/portmaster 的資訊可至其 pkg-descr 取得。 @@ -6724,7 +6758,7 @@ The deinstallation will free 229 kB portupgrade - 另一個可以用來升級 Port 的工具是 Portupgrade,可在 ports-mgmt/portupgrade 取得套件或 Port,此工具會安裝一套可以用來管理 Port 的應用程式,但是它需要相依 Ruby。要安裝該 Port: + ports-mgmt/portupgrade 是另一個可以用來升級 Port 的工具,此工具會安裝一套可以用來管理 Port 的應用程式,它需要相依 Ruby。要安裝該 Port: # cd /usr/ports/ports-mgmt/portupgrade # make install clean @@ -6744,7 +6778,10 @@ The deinstallation will free 229 kB # portupgrade -PP gnome3 若只想要下載 Port distfiles 或套件,使用 參數。若不要編譯或安裝任何東西,使用 。請參考 portupgrade 的操作手冊來取得所有可用選項的更多資訊。 + + 更多有關 ports-mgmt/portupgrade 的資訊可至其 pkg-descr 取得。 + @@ -6759,11 +6796,11 @@ The deinstallation will free 229 kB # portsclean -C - 除此之外,許多過時的原始碼發行檔案會儲存在 /usr/ports/distfiles。若有安裝 Portupgrade,此指令將會刪除所有不再被任何 Port 所引用的 distfiles: + 除此之外,許多過時的原始碼發行檔案會儲存在 /usr/ports/distfiles。使用 Portupgrade 刪除所有不再被任何 Port 所引用的 distfiles: # portsclean -D - 要使用 Portupgrade 來移除所有未被任何安裝在系統上的 Port 所引用的 distfiles: + Portupgrade 可以移除所有未被任何安裝在系統上的 Port 所引用的 distfiles: # portsclean -DD @@ -6771,9 +6808,9 @@ The deinstallation will free 229 kB # portmaster --clean-distfiles - 預設這個指令會互動的方式詢問使用者確認是否要刪除 distfile。 + 預設,若 distfile 應要被刪除,這個指令會以互動的方式向使用者確認。 - 除了以上指令外,ports-mgmt/pkg_cutleaves 套件或 Port 可自動移除不再需要使用的 Port。 + 除了以上指令外,ports-mgmt/pkg_cutleaves 可自動移除不再需要使用的 Port。 @@ -6786,7 +6823,7 @@ The deinstallation will free 229 kB 雖然在系統上執行 poudriere 並不一定要使用 ZFS,但使用了是有幫助的。當使用了 ZFS,則必須在 /usr/local/etc/poudriere.conf 指定 ZPOOL 以及 FREEBSD_HOST 應設定到一個最近的鏡像站。定義 CCACHE_DIR 可開啟使用 devel/ccache 快取的功能來快取編譯結果並減少那些需時常編譯的程式碼的編譯次數。將 poudriere 資料集放到一個獨立的目錄並掛載到 /poudriere 可能會比較方便,其他設定項目採用預設值便足夠。 - 偵測到的處理器數量可用來定義要同時執行多少個編譯。並請給予足夠的虛擬記憶體,不論是 RAM 或交換空間,若虛擬記憶體不足,編譯 Jail 將會停止並被清除,可能會造成奇怪的錯誤訊息。 + 偵測到的處理器數量可用來定義要同時執行多少個編譯。並給予足夠的虛擬記憶體,不論是 RAM 或交換空間,若虛擬記憶體不足,編譯 Jail 的動作將會停止並被清除,會造成奇怪的錯誤訊息。 初始化 Jail 與 Port 樹 @@ -6859,9 +6896,9 @@ ports-mgmt/pkg # poudriere bulk -j 10amd64 -p local -z workstation -f 10amd64-local-workstation-pkglist - Ctrlt 可以顯示目前編譯的狀態,Poudriere 也會編譯在 /poudriere/logs/bulk/jailname 中的檔案,可用在網頁伺服器來顯示編譯資訊。 + 在執行時,按下 Ctrlt 可以顯示目前編譯的狀態,Poudriere 也會編譯在 /poudriere/logs/bulk/jailname 中的檔案,可用在網頁伺服器來顯示編譯資訊。 - 套件現在可以從 poudriere 檔案庫來安裝。 + 完成之後,新套件現在可以從 poudriere 檔案庫來安裝。 要取得更多使用 poudriere 的資訊,請參考 poudriere8 及主網站 @@ -6874,7 +6911,7 @@ ports-mgmt/pkg enabled: no } - 通常最簡單要提供 poudriere 給客戶端的方式是透過 HTTP。安裝一個網頁伺服器來提供套件目錄,通常會像:/usr/local/poudriere/data/packages/10amd64,其中 10amd64 是編譯的名稱。 + 通常最簡單要提供 poudriere 檔案庫給客戶端的方式是透過 HTTP。安裝一個網頁伺服器來提供套件目錄,通常會像:/usr/local/poudriere/data/packages/10amd64,其中 10amd64 是編譯的名稱。 若要連往套件檔案庫的 URL 是:http://pkg.example.com/10amd64,則在 /usr/local/etc/pkg/repos/custom.conf 的檔案庫設定檔為: @@ -6892,7 +6929,7 @@ ports-mgmt/pkg - 大部份應用程式安裝會在 /usr/local/etc 安裝至少一個預設的設定檔,在應用程式有大量設定檔的情況會建立一個子目錄來存放這些設定檔。範例的設定檔名通常會使用 .sample 結尾,應要檢查這些檔案的內容,並可能要做一些編輯讓設定檔符合系統的需求,要編輯設定檔範本前需先複製該檔案並去除 .sample 副檔名。 + 大部份應用程式安裝會在 /usr/local/etc 安裝至少一個預設的設定檔,若應用程式有大量設定檔的時則會建立一個子目錄來存放這些設定檔。範例的設定檔案名稱通常使用 .sample 結尾,設定檔應要仔細查看並可能要做一些編輯讓設定檔符合系統的需求,要編輯設定檔範本前需先複製該檔案並去除 .sample 副檔名。 @@ -6901,6 +6938,11 @@ ports-mgmt/pkg 部份應用程式會以服務的方式執行,在啟動應用程式前前需要加入設定到 /etc/rc.conf。這些應用程式通常會安裝啟動 Script 到 /usr/local/etc/rc.d,請參考 啟動服務 來取得更多資訊。 + + + 依設計,應用程式不會在安裝時執行其啟動 Script,也不會在解除安裝或升級時執行其中止 Script,這留給各系統的管理者去做決定。 + + @@ -6927,9 +6969,9 @@ ports-mgmt/pkg 尋求維護人員的協助,在 Port Skeleton 目錄中輸入 make maintainer 或閱讀 Port 的 Makefile 來取得維護人員的電子郵件位址。寄給維護人員的郵件內容請記得要包含 Port 的 Makefile 中的 $FreeBSD: 一整行及輸出的錯誤訊息。 - 有一些 Port 並非由個人維護,而是由 郵遞論壇 維護,只要郵件地址長的像 freebsd-listname@FreeBSD.org 都是,寄信時記得代入實際的論壇名稱。 + 有一些 Port 並非由個人維護,而是由 郵遞論壇 維護,有許多,但並非全部,只要郵件地址長的像 freebsd-listname@FreeBSD.org 都是,寄信時記得代入實際的論壇名稱。 - 尤其是顯示 ports@FreeBSD.org 的 Port 都不是由特定個人維護,該 Port 的修正與支援來自訂閱該郵遞論壇的一般社群所提供,我們非常歡迎志工參與。 + 尤其是由 ports@FreeBSD.org 所維護的 Port 都不是由特定個人維護,而該 Port 的修正與支援都是來自訂閱該郵遞論壇的一般社群所提供,我們隨時歡迎志工參與! 若寄信後沒有取得任何回應,可以依照 撰寫 FreeBSD 問題回報 的說明使用 Bugzilla 提出問題回報。 @@ -6977,7 +7019,7 @@ ports-mgmt/pkg 使用 bsdinstall 安裝 FreeBSD 並不會自動安裝圖型化使用者介面。本章將說明如何安裝並設定 Xorg,該應用程式提供開放源碼的 X Window 系統來提供圖型化環境。接著會說明如何找到並安裝桌面環境或視窗管理程式。 - 偏好安裝時會自動設定 Xorg 並且在安裝過程提供視窗管理程式選項的使用者請參考 pcbsd.org 網站。 + 偏好安裝時會自動設定 Xorg 並且在安裝過程提供視窗管理程式選項的使用者請參考 網站。 更多有關 Xorg 支援影像硬體資訊,請參考 x.org 網站。 @@ -7084,16 +7126,16 @@ ports-mgmt/pkg 在 FreeBSD,Xorg 可透過套件或 Port 來安裝。 + 使用 Binary 套件的安裝速度較快,但可用的自訂選項較少: + + # pkg install xorg + 要從 Port 套件集編譯與安裝: # cd /usr/ports/x11/xorg # make install clean - 使用 Binary 套件安裝快速,但可用的自訂選項較少: - - # pkg install xorg - - 兩種安裝方式皆可完整安裝 Xorg 系統。此方式較建議大多數使用者。 + 兩種安裝方式皆可完整安裝 Xorg 系統,對大多數使用者較建議使用 Binary 套件安裝。 較精簡版本的 X 系統適合給有經驗的使用者使用,可至 x11/xorg-minimal 取得。這個版本就不會安裝大多數的文件、函數庫以及應用程式,而部份應用程式會需要這些額外的元件才能運作。 @@ -7117,7 +7159,11 @@ ports-mgmt/pkg 快速開始 - Xorg 支援大多數常見的顯示卡、鍵盤以及指標裝置,Xorg 會自動偵測這些裝置,並不需要手動設定。 + Xorg 支援大多數常見的顯示卡、鍵盤以及指標裝置。 + + + 顯示卡、顯示器以及輸入裝置會自動偵測,無須任何手動設置。除非自動設置失敗,否則請勿建立 xorg.conf 或執行 步驟。 + @@ -7166,6 +7212,8 @@ ports-mgmt/pkg 設定檔 + 通常不需要做手動設置,除非自動設置無法運作,否則請不要手動建立設定檔。 + 目錄 @@ -7524,6 +7572,10 @@ EndSection 在某些情況 Xorg 的自動設定無法在特定硬體上運作,或需要使用不同的設定。針對這些情況會建立自訂的設定檔。 + + 非必要請勿手動建立設定檔,非必要的手動設置會造成運作不正常。 + + 設定檔可由 Xorg 根據偵測到的硬體產生,這個檔案對一開始自訂設定很有幫助。 產生 xorg.conf @@ -7557,7 +7609,11 @@ EndSection 由於 Xorg 內建的預設字型用在典型的桌面出版應用程式並不是很理想,大字型會呈現鋸齒狀邊緣,看起來很不專業,小字型幾乎完全看不清楚。不過,這裡有幾個免費高品質的 Type1 (PostScript) 字型可用,且能容易的在 Xorg 使用。例如,URW 字型集 (Times Roman, Helvetica, Palatino 及其他)。 Freefont 字型集 (x11-fonts/freefonts) 包含了更多的字型,但其中大部分是給圖形軟體如 GIMP 所使用的字型,並不能完全作為螢幕字型使用。此外,Xorg 可以簡單的設定使用 TrueType 字型。更多有關本主題的詳細資訊,請參考 X7 操作手冊或 - 要從 Port 套件集安裝上述的 Type1 字型集可執行以下指令: + 要由 Binary 套件安裝上述的 Type1 字型集可執行以下指令: + + # pkg install urwfonts + + 或由 Port 套件集編譯,可執行以下指令: # cd /usr/ports/x11-fonts/urwfonts # make install clean @@ -8485,7 +8541,11 @@ EndSection Firefox 與 <trademark>Java</trademark> 附加元件 - Firefox 的安裝並不包含 Java 支援,雖然如此 java/icedtea-web 提供了免費的網頁瀏覽器附加元件來執行 Java applet,此附加元件可以用 Binary 套件安裝或者自 Port 編譯: + Firefox 的安裝並不包含 Java 支援,雖然如此 java/icedtea-web 提供了免費的網頁瀏覽器附加元件來執行 Java applet,此附加元件可以用 Binary 套件安裝: + + # pkg install icedtea-web + + 或由 Port 套件集編譯: # cd /usr/ports/java/icedtea-web # make install clean @@ -8595,7 +8655,11 @@ EndSection Konqueror 不只是個網頁瀏覽器, 它同時也是檔案管理器和多媒體瀏覽器。它包含在 x11/kde4-baseapps 套件或 Port 中。 - Konqueror 使用支援 WebKit 以及它自有的 KTHML。WebKit 是一套被許多現代瀏覽器所使用的繪圖引擎,包含 Chromium。要在 FreeBSD 的 Konqueror 使用 WebKit 需安裝 www/kwebkitpart 套件或 Port。此範例示範使用 Port 編譯: + Konqueror 使用支援 WebKit 以及它自有的 KTHML。WebKit 是一套被許多現代瀏覽器所使用的繪圖引擎,包含 Chromium。要在 FreeBSD 的 Konqueror 使用 WebKit 需安裝 www/kwebkitpart 套件或 Port。此範例示範使用 Binary 套件安裝: + + # pkg install kwebkitpart + + 由 Port 套件集安裝: # cd /usr/ports/www/kwebkitpart # make install clean @@ -10397,7 +10461,11 @@ bktr0: Pinnacle/Miro TV, Philips SECAM t 設定 MythTV 後端 - To install MythTV using the port: + 要使用 Binary 套件安裝 MythTV 可: + + # pkg install mythtv + + 或由 Port 套件集安裝: # cd /usr/ports/multimedia/mythtv # make install @@ -10544,6 +10612,17 @@ Re-scan of bus 3 was successful graphics/xsane installs xsane. + 要由 Binary 套件安裝這兩個部份可: + + # pkg install xsane sane-frontends + + 或由 Port 套件集安裝: + + # cd /usr/ports/graphics/sane-frontends +# make install clean +# cd /usr/ports/graphics/xsane +# make install clean + After installing the graphics/sane-backends port or package, use sane-find-scanner to check the scanner @@ -14049,7 +14128,7 @@ export PATH 延伸應用程式設定 - 現在 FreeBSD 會引用 rc.d,讓設定應用程式啟動程式更簡單且提供更多的功能。使用於 所提到的關鍵字,可以設定應用程式在其他特定服務之後啟動且可以透過 /etc/rc.conf 來傳遞額外的旗標來取代寫死在啟動 Script 中的旗標。一個基本的 Script 可能會如下例所示: + 現在 FreeBSD 會引用 rc.d,設定應用程式啟動變的更簡單且提供更多的功能。使用於 所提到的關鍵字,可以設定應用程式在其他特定服務之後啟動且可以透過 /etc/rc.conf 來傳遞額外的旗標來取代寫死在啟動 Script 中的旗標。一個基本的 Script 可能會如下例所示: #!/bin/sh # @@ -14578,7 +14657,7 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255. # service netif restart - 若預設的閘道器已設定於 /etc/rc.conf 也同樣要下這個指令: + 若預設的通訊閘已設定於 /etc/rc.conf 也同樣要下這個指令: # service routing restart @@ -15344,18 +15423,7 @@ device_probe_and_attach: cbb0 attach ret 調校磁碟 - The following section will discuss various tuning - mechanisms and options which may be applied to disk - devices. In many cases, disks with mechanical parts, - such as SCSI drives, will be the - bottleneck driving down the overall system performance. While - a solution is to install a drive without mechanical parts, - such as a solid state drive, mechanical drives are not - going away anytime in the near future. When tuning disks, - it is advisable to utilize the features of the iostat8 - command to test various changes to the system. This - command will allow the user to obtain valuable information - on system IO. + 接下來的章節會討論在磁碟裝置上各種可調校的機制與選項。在大多數案例中,有使用機械元件的硬碟,如 SCSI 磁碟機,會成為導致整體系統效能低下的瓶頸。雖然已經有不使用機械元件的磁碟機解決方案,如,固態硬碟,但使用機械元件的磁碟機短期內並不會消失。在調校磁碟時,建議可以利用 iostat8 指令的功能來測試各種對系統的變更,這個指令可讓使用者取得系統 IO 相關的有用資訊。 Sysctl 變數 @@ -16116,56 +16184,11 @@ kern.maxvnodes: 100000 - It is important to utilize hardware resources in an - efficient manner. Power and resource management allows the - operating system to monitor system limits and to possibly - provide an alert if the system temperature increases - unexpectedly. An early specification for providing power - management was the Advanced Power Management - (APM) facility. APM - controls the power usage of a system based on its activity. - However, it was difficult and inflexible for operating systems - to manage the power usage and thermal properties of a system. - The hardware was managed by the BIOS and the - user had limited configurability and visibility into the power - management settings. The APM - BIOS is supplied by the vendor and is - specific to the hardware platform. An APM - driver in the operating system mediates access to the - APM Software Interface, which allows - management of power levels. - - There are four major problems in APM. - First, power management is done by the vendor-specific - BIOS, separate from the operating system. - For example, the user can set idle-time values for a hard drive - in the APM BIOS so that, - when exceeded, the BIOS spins down the hard - drive without the consent of the operating system. Second, the - APM logic is embedded in the - BIOS, and it operates outside the scope of - the operating system. This means that users can only fix - problems in the APM - BIOS by flashing a new one into the - ROM, which is a dangerous procedure with the - potential to leave the system in an unrecoverable state if it - fails. Third, APM is a vendor-specific - technology, meaning that there is a lot of duplication of - efforts and bugs found in one vendor's BIOS - may not be solved in others. Lastly, the APM - BIOS did not have enough room to implement a - sophisticated power policy or one that can adapt well to the - purpose of the machine. - - The Plug and Play BIOS - (PNPBIOS) was unreliable in many situations. - PNPBIOS is 16-bit technology, so the - operating system has to use 16-bit emulation in order to - interface with PNPBIOS methods. FreeBSD - provides an APM driver as - APM should still be used for systems - manufactured at or before the year 2000. The driver is - documented in apm4. + 以有效率的方式運用硬體資源是很重要的,電源與資源管理讓作業系統可以監控系統的限制,並且在系統溫度意外升高時能夠發出警報。早期提供電源管理的規範是進階電源管理 (Advanced Power Management, APM),APM 可根據系統的使用狀況來來控制電源用量。然而,使用 APM 要作業系統來管理系統的電源用量和溫度屬性是困難且沒有彈性的,因為硬體是由 BIOS 所管理,使用者對電源管理設定只有有限的設定性與可見性,且 APM BIOS 是由供應商提供且特定於某些硬體平台,而作業系統中必透過 APM 驅動程式做為中介存取 APM 軟體介面才能夠管理電源等級。 + + APM 有四個主要的問題。第一,電源管理是由供應商特定的 BIOS 來完成,與作業系統是分開的。例如,使用者可在 APM BIOS 設定硬碟的閒置時間值,在超過時間時 BIOS 可在未徵得作業系統的同意下降低硬碟的轉速。第二,APM 的邏輯是內嵌在 BIOS 當中的,並且在作業系統範圍之外運作,這代表使用者只能夠透過燒錄新的韌體到 ROM 來修正 APM BIOS 中的問題,而這樣的程序是危險的,若失敗,可能會讓系統進入無法復原的狀態。第三,APM 是供應商特定的技術,這代表有許多重複的工作,在一個供應商的 BIOS 找到的問題在其他的供應商卻沒有解決。最後一點,APM BIOS 並沒有足夠的空間來實作複雜的電源管理政策或可良好適應主機用途的程式。 + + Plug and Play BIOS (PNPBIOS) 在很多情況下並不可靠,PNPBIOS 是 16 位元的技術,所以作業系統必須模擬 16 位元才能存取 PNPBIOS。FreeBSD 提供了一個 APM 驅動程式來做 APM,應可用在 2000 年之前所製造的系統,該驅動程式的說明於 apm4 ACPI @@ -16175,55 +16198,22 @@ kern.maxvnodes: 100000 APM - The successor to APM is the Advanced - Configuration and Power Interface (ACPI). - ACPI is a standard written by an alliance of - vendors to provide an interface for hardware resources and power - management. It is a key element in Operating - System-directed configuration and Power Management - as it provides more control and flexibility to the operating - system. + APM 的後繼者是進階設置與電源介面 (Advanced Configuration and Power Interface, ACPI)。ACPI 是一套由供應商聯盟所搛寫出的標準,提供了硬體資源與電源管理的介面,它是 作業系統直接設置與電源管理 (Operating System-directed configuration and Power Management) 關鍵的要素,提供了作業系統更多的控制方式與彈性。 - This chapter demonstrates how to configure - ACPI on FreeBSD. It then offers some tips on - how to debug ACPI and how to submit a problem - report containing debugging information so that developers can - diagnosis and fix ACPI issues. + 本章節將示範如何在 FreeBSD 設定 ACPI,然後提供一些如何對 ACPI 除錯的提示以及如何提交包含除錯資訊的問題回報,讓開發人員能夠診斷並修正 ACPI 的問題。 設定 <acronym>ACPI</acronym> - In FreeBSD the acpi4 driver is loaded by default at - system boot and should not be compiled - into the kernel. This driver cannot be unloaded after boot - because the system bus uses it for various hardware - interactions. However, if the system is experiencing - problems, ACPI can be disabled altogether - by rebooting after setting - hint.acpi.0.disabled="1" in - /boot/loader.conf or by setting this - variable at the loader prompt, as described in . - - - ACPI and APM - cannot coexist and should be used separately. The last one - to load will terminate if the driver notices the other is - running. - - - ACPI can be used to put the system into - a sleep mode with acpiconf, the - flag, and a number from - 1 to 5. Most users only - need 1 (quick suspend to - RAM) or 3 (suspend to - RAM). Option 5 performs - a soft-off which is the same as running - halt -p. - - Other options are available using - sysctl. Refer to acpi4 and - acpiconf8 for more information. + 在 FreeBSD acpi4 驅動程式預設會在系統開始時載入,且應被編譯到核心當中。這個驅動程式在開機之後無法被卸載,因為系統匯流排會使用它做各種硬體互動。雖然如此,若系統遇到問題,ACPI 還是可以被關閉,在 /boot/loader.conf 中設定 hint.acpi.0.disabled="1" 之後重新開機或在載入程式提示時設定這個變數,如 中的說明。 + + + ACPIAPM 不能同時存在且應分開使用,若有偵測到有另一個正在執行,要載入的後者將會中斷。 + + + ACPI 可以用來讓系統進入睡眠模式,使用 acpiconf 旗標再加上由 15 的數字。大多數使用者只需使用 1 (快速待命到 RAM) 或 3 (待命到 RAM),選項 5 會執行軟關機 (Soft-off),如同執行 halt -p 一樣。 + + 其他的選項可使用 sysctl 來設定,請參考 acpi4 以及 acpiconf8 以取得更多資訊。 @@ -16767,7 +16757,7 @@ debug.acpi.level="ACPI_LV_ERROR"booting bootstrap - 從開啟電腦到載入作業系統的這段流程稱為開機程序 (Bootstrap process) 或開機 (booting)。FreeBSD 的開機程序提供大量的客製化彈性,包含可選擇安裝在同電腦的其他的作業系統、不同版本的作業系統或不同核心的作業系統的功能。 + 從開啟電腦到載入作業系統的這段流程稱為 開機程序 (Bootstrap process) 或 開機 (Booting)。FreeBSD 的開機程序提供大量的客製化彈性,包含可選擇安裝在同電腦的其他的作業系統、不同版本的作業系統或不同核心的作業系統的功能。 本章會詳細說明可以設定的選項。示範如何自訂 FreeBSD 開機流程,包含其中所有會發生的事,直到啟動 FreeBSD 核心、偵測裝置及啟動 init8。這些事會發生在開機訊息的文字顏色會從亮白變成灰色之間。 @@ -16803,48 +16793,19 @@ debug.acpi.level="ACPI_LV_ERROR" FreeBSD 開機程序 - Turning on a computer and starting the operating system - poses an interesting dilemma. By definition, the computer does - not know how to do anything until the operating system is - started. This includes running programs from the disk. If the - computer can not run a program from the disk without the - operating system, and the operating system programs are on the - disk, how is the operating system started? - - This problem parallels one in the book The - Adventures of Baron Munchausen. A character had - fallen part way down a manhole, and pulled himself out by - grabbing his bootstraps and lifting. In the early days of - computing, the term bootstrap was applied - to the mechanism used to load the operating system. It has - since become shortened to booting. + 打開電腦並啟動作業系統的這個動作呈現了一個有趣的困境。照道理,電腦在啟動作業系統之前並不知道要如何做任何事情,這些事情之中包括從磁碟執行程式。如果電腦無法在沒有作業系統的情況下執行程式,而作業系統的程式本身又在磁碟上,那麼作業系統要如何啟動呢? + + 這個問題如同 The Adventures of Baron Munchausen 一書中的一個角色掉進了洞裡,他抓住了靴子上的拔靴帶 (Bootstrap) 才把自己拉了出來,因此在早期電腦領域用 bootstrap 一詞來指載入作業系統的機制,後來被縮短為 booting BIOS Basic Input/Output SystemBIOS - On x86 hardware, the Basic Input/Output System - (BIOS) is responsible for loading the - operating system. The BIOS looks on the hard - disk for the Master Boot Record (MBR), which - must be located in a specific place on the disk. The - BIOS has enough knowledge to load and run the - MBR, and assumes that the - MBR can then carry out the rest of the tasks - involved in loading the operating system, possibly with the help - of the BIOS. + 在 x86 硬體上,基本輸入/輸出系統 (Basic Input/Output System, BIOS) 負責載入作業系統。 BIOS 會找到硬碟上的主開機記錄區 (Master Boot Record, MBR),該記錄區必須位於磁碟上的特定位置。BIOS 有足夠的知識可以載入並執行這個 MBR,並且假設這個 MBRBIOS 的協助下可以完成接下來載入作業系統的工作。 - FreeBSD provides for booting from both the older - MBR standard, and the newer GUID Partition - Table (GPT). GPT - partitioning is often found on computers with the Unified - Extensible Firmware Interface (UEFI). - However, FreeBSD can boot from GPT partitions - even on machines with only a legacy BIOS - with gptboot8. Work is under way to provide direct - UEFI booting. + FreeBSD 在較舊的 MBR 標準與較新的 GUID 分割區表 (GUID Partition Table, GPT) 上都能夠開機 (Booting)。GPT 磁碟分割通常會在有支援統一可延伸韌體介面 (Unified Extensible Firmware Interface, UEFI) 的電腦上找到。不論如何,FreeBSD 即使在只有傳統 BIOS 的機器上,也可以使用 gptboot8GPT 分割區開機。直接使用 UEFI 開機的開發工作正在進行中。 Master Boot Record @@ -16854,49 +16815,18 @@ debug.acpi.level="ACPI_LV_ERROR"Boot Loader - The code within the MBR is typically - referred to as a boot manager, especially - when it interacts with the user. The boot manager usually has - more code in the first track of the disk or within the file - system. Examples of boot managers include the standard FreeBSD - boot manager boot0, also called - Boot Easy, and - Grub, which is used by many Linux - distributions. - - If only one operating system is installed, the - MBR searches for the first bootable (active) - slice on the disk, and then runs the code on that slice to load - the remainder of the operating system. When multiple operating - systems are present, a different boot manager can be installed - to display a list of operating systems so the user - can select one to boot. - - The remainder of the FreeBSD bootstrap system is divided into - three stages. The first stage knows just enough to get the - computer into a specific state and run the second stage. The - second stage can do a little bit more, before running the third - stage. The third stage finishes the task of loading the - operating system. The work is split into three stages because - the MBR puts limits on the size of the - programs that can be run at stages one and two. Chaining the - tasks together allows FreeBSD to provide a more flexible - loader. + MBR 中的程式通常會稱作開機管理程式 (Boot manager),特別是那些會與使用者互動的程式。開機管理程式通常會另一部份的程式會存放於磁碟的第一個磁軌或檔案系統。開機管理程式的例子有標準 FreeBSD 開機管理程式 boot0 又稱 Boot Easy 以及 Grub 常用於各種 Linux 發行版。 + + 若只有安裝一個作業系統,MBR 會搜尋磁碟上第一個可開機的 (使用中) 切割區 (Slice),然後執行在該切割區上的程式來載入剩下的作業系統。當有多個作業系統存在時,可以安裝可顯示作業系統清單的開機管理程式,以讓使用者可以選擇要啟動的作業系統。 + + 剩餘的 FreeBSD 開機系統分成三個階段,第一個階段只知道如何讓電腦進入特定狀態並執行第二階段,第二個階段在執行第三階段之前會做的事比較多一點,第三個階段會完成載入作業系統的工作。把工作分成三個階段的原因是 MBR 有限制在階段一與階段二能夠執行程式的大小。將這些工作連結在一起讓 FreeBSD 能夠提供更有彈性的載入程式。 kernel init8 - The kernel is then started and begins to probe for devices - and initialize them for use. Once the kernel boot process is - finished, the kernel passes control to the user process - init8, which makes sure the disks are in a usable state, - starts the user-level resource configuration which mounts file - systems, sets up network cards to communicate on the network, - and starts the processes which have been configured to run at - startup. + 核心會接著開始偵測裝置並初始化這些裝置供使用。核心開機程序完成之後,核心便會傳送控制權給使用者程序 init8,這個程序會確保磁碟在可以使用的狀態,然後啟動使用者層級的資源設置來掛載檔案系統、設定網路卡以能夠連線網路、啟動那些被設定在開機時要啟動的程序。 - This section describes these stages in more detail and - demonstrates how to interact with the FreeBSD boot process. + 本章節將更詳細介紹這些階段並示範如何與 FreeBSD 開機程序互動。 開機管理程式 @@ -16906,19 +16836,9 @@ debug.acpi.level="ACPI_LV_ERROR"Master Boot Record (MBR) - The boot manager code in the MBR is - sometimes referred to as stage zero of - the boot process. By default, FreeBSD uses the - boot0 boot manager. - - The MBR installed by the FreeBSD installer - is based on /boot/boot0. The size and - capability of boot0 is restricted - to 446 bytes due to the slice table and - 0x55AA identifier at the end of the - MBR. If boot0 - and multiple operating systems are installed, a message - similar to this example will be displayed at boot time: + 有時會稱在 MBR 中的開機管理程式為開機程序的 第零階段 (Stage zero),FreeBSD 預設會使用 boot0 開機管理程式。 + + 由 FreeBSD 安裝程式所安裝的 MBR 便是以 /boot/boot0 為基礎。boot0 的大小與容量被限制在 446 個位元組是由於切割表與 0x55AA 識別碼位於 MBR 的最末端。若安裝多個作業系統使用 boot0 ,則會在開機時顯示如下範例的訊息: <filename>boot0</filename> 螢幕截圖 @@ -16929,54 +16849,23 @@ F2 FreeBSD Default: F2 - Other operating systems will overwrite an existing - MBR if they are installed after FreeBSD. If - this happens, or to replace the existing - MBR with the FreeBSD MBR, - use the following command: + 其作他作業統若在 FreeBSD 之後才安裝則會覆蓋現有的 MBR,若這件事發生了,或者要使用 FreeBSD MBR 取代現有的 MBR 可使用以下指令: # fdisk -B -b /boot/boot0 device - where device is the boot disk, - such as ad0 for the first - IDE disk, ad2 for the - first IDE disk on a second - IDE controller, or da0 - for the first SCSI disk. To create a - custom configuration of the MBR, refer to - boot0cfg8. + 其中 device 開機磁碟,例如第一個 IDE 磁碟為 ad0,第二個 IDE 控制器的第一個 IDE磁碟為 ad2,第一個 SCSI 磁碟為 da0。要建立自訂的 MBR 設定請參考 boot0cfg8 階段一與階段二 - Conceptually, the first and second stages are part of the - same program on the same area of the disk. Because of space - constraints, they have been split into two, but are always - installed together. They are copied from the combined - /boot/boot by the FreeBSD installer or - bsdlabel. - - These two stages are located outside file systems, in the - first track of the boot slice, starting with the first sector. - This is where boot0, or any other - boot manager, expects to find a program to run which will - continue the boot process. - - The first stage, boot1, is very - simple, since it can only be 512 bytes in size. It knows just - enough about the FreeBSD bsdlabel, which - stores information about the slice, to find and execute - boot2. - - Stage two, boot2, is slightly more - sophisticated, and understands the FreeBSD file system enough to - find files. It can provide a simple interface to choose the - kernel or loader to run. It runs - loader, which is much more - sophisticated and provides a boot configuration file. If the - boot process is interrupted at stage two, the following - interactive screen is displayed: + 概念上,第一與第二個階段均為磁碟上同一個區域上同一個程式的一部份,由於空間上的限制,它們被分成兩部份,但是會一併安裝。它們會由 FreeBSD 安裝程式或 bsdlabel/boot/boot 複製而來。 + + 這兩個階段均位於檔案系統之外,在開機切割區的第一個磁軌,從第一個磁碟扇區 (Sector) 開始,這個位置便是 boot0 或其他開機管理程式所會儲存的地方,並會尋找可以執行的程式以繼續開機程序。 + + 第一個階段的 boot1 非常的簡單,因為它只能有 512 位元組的大小。它只能認得儲存切割區資訊的 FreeBSD bsdlabel 以及尋找並執行 boot2 + + 階段二 boot2 稍微複雜一點,能夠理解 FreeBSD 檔案系統來搜尋檔案。它可以提供一個簡單的介面來選擇要執行的核心或載入程式。它所執行的載入程式 (loader) 更複雜並能讀取開機設定檔。若開機程序在階段二中斷,則會顯示以下的互動畫面: <filename>boot2</filename> 螢幕截圖 @@ -16986,22 +16875,12 @@ Default: 0:ad(0,a)/boot/loader boot: - To replace the installed boot1 and - boot2, use bsdlabel, - where diskslice is the disk and - slice to boot from, such as ad0s1 for the - first slice on the first IDE disk: + 要更換已安裝的 boot1boot2 可使用 bsdlabel,其中 diskslice 是要開機的磁碟與切割區,例如 ad0s1 代表第一個 IDE 磁碟的第一個切割區: # bsdlabel -B diskslice - If just the disk name is used, such as - ad0, bsdlabel will - create the disk in dangerously dedicated - mode, without slices. This is probably not the - desired action, so double check the - diskslice before pressing - Return. + 若只使用磁碟名稱,如 ad0bsdlabel 便會以 危險專用的模式 來建立磁碟,而不會建立任何分割區。這個可能與預期的動作不同,所以在按下 Return 鍵之前請再次確認 diskslice @@ -17010,43 +16889,18 @@ boot: boot-loader - The loader is the final stage - of the three-stage bootstrap process. It is located on the - file system, usually as - /boot/loader. - - The loader is intended as an - interactive method for configuration, using a built-in command - set, backed up by a more powerful interpreter which has a more - complex command set. - - During initialization, loader - will probe for a console and for disks, and figure out which - disk it is booting from. It will set variables accordingly, - and an interpreter is started where user commands can be - passed from a script or interactively. + loader 是三階段開機程多的最後一個階段,載入程式位於檔案系統之中,通常在 /boot/loader + + loader 主要目地是利用擁有更複雜指令集的強大直譯器做為基礎的內建指令集提供一個互動的方式來做設定。 + + 在初始化的過程中,loader 會偵測 Console 與磁碟,並找出可以用來開機的磁碟。在由 Script 或互動輸入使用者指令的地方會設定相對的變數並啟動直譯器。 loader loader configuration - The loader will then read - /boot/loader.rc, which by default reads - in /boot/defaults/loader.conf which sets - reasonable defaults for variables and reads - /boot/loader.conf for local changes to - those variables. loader.rc then acts on - these variables, loading whichever modules and kernel are - selected. - - Finally, by default, loader - issues a 10 second wait for key presses, and boots the kernel - if it is not interrupted. If interrupted, the user is - presented with a prompt which understands the command set, - where the user may adjust variables, unload all modules, load - modules, and then finally boot or reboot. lists the most commonly - used loader commands. For a - complete discussion of all available commands, refer to - loader8. + loader 接著會讀取 /boot/loader.rc,這個程式預設又會讀取 /boot/defaults/loader.conf 來設定合理的變數預設值以及讀取 /boot/loader.conf 來對這些變數做本地的更改。loader.rc 接著會依這些變數來運作,讀取選擇模組與核心。 + + 最後,預設情況下 loader 會待候鍵盤輸入 10 秒鐘,若沒有被中斷的話會接著啟動核心。若被使用者中斷,則會向使用者顯示提示字元,此時使用可以使用指令集來調整變數、卸載所有模組、載入模組,然後最後開機或重新開機。 中列出了最常使用的 loader 指令。要完整了解所有可用的指令,請參考 loader8 載入程式內建指令 @@ -17063,141 +16917,99 @@ boot: autoboot seconds - Proceeds to boot the kernel if not interrupted - within the time span given, in seconds. It displays a - countdown, and the default time span is 10 - seconds. + 若在指定時間 (秒) 內沒有中斷,會繼續啟動核心。此指令會顯示倒數,預設的時間為 10 秒鐘。 boot -options kernelname - Immediately proceeds to boot the kernel, with - any specified options or kernel name. Providing a - kernel name on the command-line is only applicable - after an unload has been issued. - Otherwise, the previously-loaded kernel will be - used. If kernelname is not - qualified it will be searched under - /boot/kernel and - /boot/modules. + 使用指定的選項或核心名稱立即啟動核心。由指令列指定核心名稱前必須先執行 unload,否則會使用先前載入過的核心。若 kernelname 不是完整的路徑則會搜尋 /boot/kernel/boot/modules 底下。 boot-conf - Goes through the same automatic configuration of - modules based on specified variables, most commonly - kernel. This only makes sense if - unload is used first, before - changing some variables. + 依據指定的變數及最常用的 kernel 再做一次相同的自動模組設置。這只有在執行 unload 之後,尚未變更變數之前方可使用。 help topic - Shows help messages read from - /boot/loader.help. If the topic - given is index, the list of - available topics is displayed. + 顯示自 /boot/loader.help 取得的說明訊息。若指定的主題為 index 則會顯示所有可用的主題。 include filename - Reads the specified file and interprets it line - by line. An error immediately stops the *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***