8.5 kernel 設定檔解說

Updated for FreeBSD 6.X by Joel Dahl.

kernel 設定檔的內容格式相當簡單。 每一行都包括一個關鍵字,以及一個或多個參數。事實上, 很多行大多只有一個參數。任何以 # 開頭的敘述都將被視為註解而被忽略。 接下來將以在 GENERIC 所出現的順序一一介紹之。 若要看與該平台架構有關的各選項、設備列表, 請參閱與 GENERIC 檔同目錄的 NOTES 檔。 而與平台架構差異較無關的通用部份,則可參閱 /usr/src/sys/conf/NOTES

Note: 若為了測試,而需要一份含有所有可用設定的設定檔,那麼請以 root 身份下:

# cd /usr/src/sys/i386/conf && make LINT

下面為 GENERIC 設定檔的範例, 其中包括說明用的註釋。 這例子應該與您機器上的 /usr/src/sys/i386/conf/GENERIC 相當接近。

machine        i386

此處是指機器架構,必須為 alphaamd64i386ia64pc98powerpcsparc64 其中之一。

cpu          I486_CPU
cpu          I586_CPU
cpu          I686_CPU

上面設定是指定要用哪一種 CPU 型號。 也可以同時加上多組 CPU 型號 (比如說萬一不確定是否要用 I586_CPUI686_CPU)。 然而自訂 kernel 的話,建議先確認自己的 CPU 型號,然後只用最適合的那組就好了。 若不確定 CPU 到底是用哪一種, 可以查閱 /var/run/dmesg.boot 的開機訊息以確定。

ident          GENERIC

這是設定該 kernel 名稱為何,可以隨意命名之,像是取名為 MYKERNEL,若是有照先前說明來作大概會取這樣名字。 ident 後面的字串會在開機時顯示,因此若要辨認新 kernel 與常用 kernel 的話,就設定不同組名稱即可(比如在自訂實驗用的 kernel)。

#To statically compile in device wiring instead of /boot/device.hints
#hints          "GENERIC.hints"         # Default places to look for devices.

device.hints(5) 可用來設定各項驅動程式的選項。 開機時 loader(8) 會檢查預設的 /boot/device.hints 設定檔。 使用 hints 選項,就可以把這些 hints 靜態編入 kernel 內。 如此一來就不必在 /boot 內建立 device.hints 檔。

makeoptions     DEBUG=-g          # Build kernel with gdb(1) debug symbols

加上 -g 選項的話,FreeBSD 會在編譯過程加上 debug 用的資訊,透過這選項會讓 gcc(1) 啟用 debug 所會用到的相關資訊。

options          SCHED_4BSD         # 4BSD scheduler

FreeBSD 傳統所用(並且是預設)的系統 CPU scheduler。 若您不清楚要如何設定 ,請保留這設定。

options          PREEMPTION         # Enable kernel thread preemption

允許 kernel 裡的 thread 被具有更高優先權的 thread 先佔。 [1] 此選項對互動的操作[2]有幫助,且可讓等待中的 thread 較快被執行。

options          INET              # InterNETworking

網路支援。請保留它,即使您沒有打算連接網路。許多程式需要 loopback networking (如連線到你自己的電腦),所以基本上這個選項是必要的。

options          INET6             # IPv6 communications protocols

IPv6 通訊協定的支援。

options          FFS               # Berkeley Fast Filesystem

基本的硬碟檔案系統,如果您要從硬碟開機,請保留它。

options          SOFTUPDATES       # Enable FFS Soft Updates support

此選項開啟 kernel 支援的 Soft Updates,Soft Updates 能加速磁碟的寫入 效能。開啟此選項後,別忘了每個磁碟都要各別指定才會生效。請檢查 mount(8) 指令的輸出來查看磁碟的 Soft Updates 是否開啟。如果您沒看到 任何 soft-updates 字樣,您可使用 tunefs(8) 指令 來開啟已存在檔案系統的 Soft Updates,或使用 newfs(8) 指令來開啟新 檔案系統的 Soft Updates。[3]

options          UFS_ACL           # Support for access control lists

此選項開啟 kernel 支援的「存取控制清單(access control lists, ACL)」 功能。此功能需要用到額外的屬性及 UFS2[4]。更詳細的說明請參照Section 14.12。預設 ACL 是開啟的,而且如果某個檔案系統過去曾使用過,請千萬別關掉它,否則 ACL 資訊 會被移除,而該檔案的權限可能會變成非預期的。

options          UFS_DIRHASH       # Improve performance on big directories

開啟此選項可加速大型目錄[5]的存取,不過代價是消耗更多的記憶體。 通常在大型 server 或互動的 workstation 上會開啟此選項,而在記憶體少、磁 碟速度較不重要的小型系統上(例如防火牆) 會關閉此選項。

options          MD_ROOT           # MD is a potential root device

開啟此選項支援用記憶體磁碟[6]來當根設備(root device)。

options          NFSCLIENT         # Network Filesystem Client
options          NFSSERVER         # Network Filesystem Server
options          NFS_ROOT          # NFS usable as /, requires NFSCLIENT

用於網路檔案系統(Network file system)。如果您沒有透過網路從 UNIX® 檔案伺服器掛載(mount) 檔案系統的需求,您可以註解掉它們。

options          MSDOSFS           # MSDOS Filesystem

MS-DOS 檔案系統。 除非您要在開機時掛載 DOS 格式的硬碟, 不然您可以放心的把這行註解掉。 如同前述,在您第一次掛載 DOS 分割區時, kernel 將會自動載入模組來支援它。 此外, emulators/mtools 這個軟體,可以讓你存取 DOS 磁片,而不需要掛載或卸載軟碟 (也不需要 MSDOSFS 的支援)。

options          CD9660            # ISO 9660 Filesystem

光碟機所使用的 ISO 9660 檔案系統。 如果沒有光碟機, 或是很少用光碟機讀取資料,可以把這一行註解起來(因為 kernel 在第一次掛載時,會自動載入)。 音樂 CD 則不會用到這個檔案系統。

options          PROCFS            # Process filesystem(requires PSEUDOFS)

process 檔案系統。 這是一個掛在 /proc 底下的 “假”檔案系統,其作用是允許一些程式,像是 ps(1) 來讀取正在執行的 processes 資訊。 大多數情況下是不需要使用到 PROCFS, 因為大多數的偵錯或監控工具,都已不需要透過 PROCFS 就能運作。 預設安裝也並不會掛載。

options          PSEUDOFS          # Pseudo-filesystem framework

在 6.X kernel 若要用 PROCFS,則必須加上 PSEUDOFS 才行。

options          GEOM_GPT          # GUID Partition Tables.

該選項可以讓單一磁碟上使用大量磁碟分割區的支援。

options          COMPAT_43         # Compatible with BSD 4.3 [KEEP THIS!]

4.3BSD 相容支援。 請保留它,否則某些程式將會無法執行。

options          COMPAT_FREEBSD4   # Compatible with FreeBSD4

為了支援在舊版 FreeBSD 4.X 下所編譯的程式,該選項在 FreeBSD 5.X 的 i386™ 及 Alpha 版本下需要打開。 建議在所有 i386 及 Alpha 機器上打開此相容設定,因為可能會需要跑舊的程式。 此外,在 5.X 才開始支援的平台,比如 ia64 以及 Sparc64® 平台, 就不需要加上此設定了。

options          COMPAT_FREEBSD5   # 與 FreeBSD5 相容

該行是 FreeBSD 6.X 及更新的版本,若需支援 FreeBSD 5.X 系統呼叫才需要設定。

options          SCSI_DELAY=5000  # Delay (in ms) before probing SCSI

該選項會讓 kernel 在偵測 SCSI 設備之前先等待 5 秒。 若只有 IDE 硬碟, 則可以忽略此設定,反之也可以試著把這數值調低,以加速開機過程。 當然,如此一來可能會造成 FreeBSD 在識別 SCSI 設備時發生問題, 若有問題,請記得調高此數值看看。

options          KTRACE            # ktrace(1) support

開啟 kernel 追蹤功能,在偵錯時很有用。

options          SYSVSHM           # SYSV-style shared memory

提供 System V shared memory (SHM) 支援,最常用到 SHM 的應該是 X 的 XSHM 延伸,不少繪圖相關程式會自動使用 SHM 以提供額外的速度。 如果您使用 X,您絕對需要它。

options          SYSVMSG           # SYSV-style message queues

System V messages 支援。 它只會在 kernel 中佔用幾百 bytes 而已。

options          SYSVSEM           # SYSV-style semaphores

System V semaphores 支援,較少會用到, 但只會佔用核心幾百 bytes。

Note: ipcs(1)-p 參數可以顯示所有用到 System V 機制的 process。

options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions

1993 年時對 POSIX® 所做的 Real-time 延伸。 Ports Collection 的某些程式會用到(比方 StarOffice)。

options          KBD_INSTALL_CDEV  # install a CDEV entry in /dev

該選項則是在 /dev 下建立鍵盤的設備節點所必須的 。

options          ADAPTIVE_GIANT    # Giant mutex is adaptive.

Giant 專指一種特別的互斥鎖機制 (mutual exclusion machanism),這個 機制能保護很大一部份的 kernel 資源。然而這種作法往往成為 SMP 系統中的 效能瓶頸,因此目前 FreeBSD 正積極地用僅保護個別資源的鎖來取代 Giant。 [7] ADAPTIVE_GIANT 選項能使 Giant 要被互斥鎖上時,等待的 thread 將動態適應地(adaptively) 自旋。 [8] 也就是說,當一個 thread 希望鎖上 Giant,但 Giant 已經被其它 thread 鎖上 時,這個 thread 將會保持執行並等待該 Giant 被釋放。如果沒有開啟這個選項, 通常的情形是這個 thread 會進入 sleep 狀態,直到下次輪到它執行,它再嘗試 要鎖上 Giant。如果您不確定這個選項的用途,就保持預設吧。

Note: 註:從 FreeBSD 8.0-CURRENT 開始,所有的互斥所預設都是動態適應 (adaptive) 的,除非在編譯時加上 NO_ADAPTIVE_MUTEXES 來強制不要動態適應。因此 8.0-CURRENT 之後的核心設定檔移除了 ADAPTIVE_GIANT 選項。

device          apic               # I/O APIC

apic 裝置開啟用 I/O APIC 來傳遞中斷(interrupt)。apic 裝置可用於 UP(單處理器) 或 SMP(多處理器) kernel,但 SMP kernel 一定得開啟 apic。 若要 SMP 支援,請加入 options SMP

Note: apic 只限 i386 架構才有,其他架構則不必加上這行。

device          eisa


如果您的主機板支援 EISA,請加上它。開啟此選項可自動偵測並設定 EISA bus 上的所有裝置。

device          pci

如果您的主機板有 PCI 匯流排,請記得要加。 這個選項開啟可自動偵測 PCI 卡,並橋接 PCI 到 ISA 的匯流排。

# Floppy drives
device          fdc

軟碟機。

# ATA and ATAPI devices
device          ata

這個驅動程式支援所有的 ATA 和 ATAPI 裝置。您只需要加入一行 device ata 即可自動偵測出所有的 PCI ATA/ATAPI 裝置。

device          atadisk                 # ATA disk drives

device ata 一起使用以支援 ATA 硬碟。

device          ataraid                 # ATA RAID drives

device ata 一起使用以支援 ATA RAID 硬碟。


device          atapicd                 # ATAPI CDROM drives

device ata 一起使用以支援 ATAPI 光硬碟。

device          atapifd                 # ATAPI floppy drives

device ata 一起使用以支援 ATAPI 軟硬碟。

device          atapist                 # ATAPI tape drives

device ata 一起使用以支援 ATAPI 磁帶碟。

options         ATA_STATIC_ID           # Static device numbering

此選項能固定 ATA 控制器的編號。若沒有此選項,裝置的標號將會動態分配。

# SCSI Controllers
device          ahb        # EISA AHA1742 family
device          ahc        # AHA2940 and onboard AIC7xxx devices
options         AHC_REG_PRETTY_PRINT    # Print register bitfields in debug
                                        # output.  Adds ~128k to driver.
device          ahd        # AHA39320/29320 and onboard AIC79xx devices
options         AHD_REG_PRETTY_PRINT    # Print register bitfields in debug
                        # output.  Adds ~215k to driver.
device          amd        # AMD 53C974 (Teckram DC-390(T))
device          isp        # Qlogic family
device          ispfw      # Firmware for QLogic HBAs- normally a module
device          mpt        # LSI-Logic MPT-Fusion
#device         ncr        # NCR/Symbios Logic
device          sym        # NCR/Symbios Logic (newer chipsets + those of `ncr')
device          trm        # Tekram DC395U/UW/F DC315U adapters

device          adv        # Advansys SCSI adapters
device          adw        # Advansys wide SCSI adapters
device          aha        # Adaptec 154x SCSI adapters
device          aic        # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
device          bt         # Buslogic/Mylex MultiMaster SCSI adapters

device          ncv        # NCR 53C500
device          nsp        # Workbit Ninja SCSI-3
device          stg        # TMC 18C30/18C50

SCSI 控制器。您可將您系統沒有的裝置註解掉。如果您的系統只有 IDE 裝置, 您可以註解掉全部。*_REG_PRETTY_PRINT 是用來幫助除 錯的選項。

# SCSI peripherals
device          scbus      # SCSI bus (required for SCSI)
device          ch         # SCSI media changers
device          da         # Direct Access (disks)
device          sa         # Sequential Access (tape etc)
device          cd         # CD
device          pass       # Passthrough device (direct SCSI access)
device          ses        # SCSI Environmental Services (and SAF-TE)

SCSI 週邊裝置。用樣的,註解掉您沒有的裝置。如果您的系統只有 IDE, 全部註解掉吧。

Note: USB umass(4) 驅動程式及其它某些驅動程式會用到 SCSI 子系統, 僅管它們並不是直的 SCSI 裝置。因此如果您用到這類的裝置,請不要移除 SCSI 支援。 [9]

# RAID controllers interfaced to the SCSI subsystem
device          amr        # AMI MegaRAID
device          arcmsr     # Areca SATA II RAID
device          asr        # DPT SmartRAID V, VI and Adaptec SCSI RAID
device          ciss       # Compaq Smart RAID 5*
device          dpt        # DPT Smartcache III, IV - See NOTES for options
device          hptmv      # Highpoint RocketRAID 182x
device          rr232x     # Highpoint RocketRAID 232x
device          iir        # Intel Integrated RAID
device          ips        # IBM (Adaptec) ServeRAID
device          mly        # Mylex AcceleRAID/eXtremeRAID
device          twa        # 3ware 9000 series PATA/SATA RAID

# RAID controllers
device          aac        # Adaptec FSA RAID
device          aacp       # SCSI passthrough for aac (requires CAM)
device          ida        # Compaq Smart RAID
device          mfi        # LSI MegaRAID SAS
device          mlx        # Mylex DAC960 family
device          pst        # Promise Supertrak SX6000
device          twe        # 3ware ATA RAID

RAID 控制器的支援。如果您沒有任何 RAID 裝置, 您可以註解或移除之。

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc     # AT keyboard controller

鍵盤控制器 (atkbdc) 為 AT 鍵盤及 PS/2 滑鼠 提供 I/O 服務。鍵盤驅動程式 (atkbd) 及 PS/2 滑鼠 驅動程式 (psm) 也需要此控制器。

device          atkbd      # AT keyboard

atkbd 驅動程式跟 atkbdc 控制器 一起提供 AT 84 鍵盤或增強型 AT 鍵盤的支援。

device          psm        # PS/2 mouse

如果您使用的是 PS/2 滑鼠,請開啟。

device          kbdmux        # keyboard multiplexer

多重鍵盤的支援。 若不打算同時接多組鍵盤的話, 那麼移除該行也沒關係。

device          vga        # VGA video card driver

顯示卡驅動程式。

device          splash     # Splash screen and screen saver support

開機時顯示啟動畫面![10]螢幕保護程式也需 要這個選項。

# syscons is the default console driver, resembling an SCO console
device          sc

sc是預設的終端機驅動程式,類似 SCO 終端機。大部份 的全螢幕程式都是透過終端機資料庫(terminal database library),例如 termcap,因此它們不在乎您用的是 sc 還是相容 VT220vt。如果您在 sc 上使用全螢幕的程式遇到麻煩,請在登入後設定 TERM 環境變數為 scoansi

# Enable this for the pcvt (VT220 compatible) console driver
#device          vt
#options         XSERVER          # support for X server on a vt console
#options         FAT_CURSOR       # start with block cursor

這是相容 VT220 的終端機驅動程式,也相容 VT100/102。在某些不相容 sc 的筆記型電腦上它運作良好。同樣地,登入後請將 TERM 環境變數設定為 vt100vt220。透過網路連到各種不同的平臺時,這個驅動程式 有可能較好用,因為其它作業系統的 termcapterminfo 可能沒有 sc 的資訊, 但 vt100 理論上所有作業系統都應該要有。

device          agp


如果您的系統上有 AGP 介面卡,請加入此選項。除了支援 AGP 外,也支 援 AGP GART 的功能。

# Power management support (see NOTES for more options)
#device          apm

進階電源管理支援。在筆記型電腦上非常有用, 但是在 FreeBSD 5.X 及後續版本的預設 kernel 設定檔 GENERIC 中是關閉的。

# Add suspend/resume support for the i8254.
device           pmtimer

電源管理所需的計時器裝置驅動程式,例如 APM 及 ACPI。

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
device          cbb               # cardbus (yenta) bridge
device          pccard            # PC Card (16-bit) bus
device          cardbus           # CardBus (32-bit) bus

PCMCIA 支援,您如果使用筆記型電腦的話,或許會需要它。

# Serial (COM) ports
device          sio               # 8250, 16[45]50 based serial ports

These are the serial ports referred to as COM ports in the MS-DOS®/Windows® world.

Note: If you have an internal modem on COM4 and a serial port at COM2, you will have to change the IRQ of the modem to 2 (for obscure technical reasons, IRQ2 = IRQ 9) in order to access it from FreeBSD. If you have a multiport serial card, check the manual page for sio(4) for more information on the proper values to add to your /boot/device.hints. Some video cards (notably those based on S3 chips) use IO addresses in the form of 0x*2e8, and since many cheap serial cards do not fully decode the 16-bit IO address space, they clash with these cards making the COM4 port practically unavailable.

Each serial port is required to have a unique IRQ (unless you are using one of the multiport cards where shared interrupts are supported), so the default IRQs for COM3 and COM4 cannot be used.

# Parallel port
device          ppc

這是 ISA 匯流排的並列埠介面。

device          ppbus      # Parallel port bus (required)

提供並列埠匯流排支援。

device          lpt        # Printer

提供並列埠印表機支援。

Note: 上面這三項都需要開啟並列埠印表機支援。

device          plip       # TCP/IP over parallel

提供並列網路介面的驅動程式。

device          ppi        # Parallel port interface device

The general-purpose I/O (“geek port”) + IEEE1284 I/O.

#device         vpo        # Requires scbus and da

This is for an Iomega Zip drive. It requires scbus and da support. Best performance is achieved with ports in EPP 1.9 mode.

#device         puc

Uncomment this device if you have a “dumb” serial or parallel PCI card that is supported by the puc(4) glue driver.

# PCI Ethernet NICs.
device          de         # DEC/Intel DC21x4x (“Tulip”)
device          em         # Intel PRO/1000 adapter Gigabit Ethernet Card
device          ixgb       # Intel PRO/10GbE Ethernet Card
device          txp        # 3Com 3cR990 (“Typhoon”)
device          vx         # 3Com 3c590, 3c595 (“Vortex”)

Various PCI network card drivers. Comment out or remove any of these not present in your system.

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device          miibus     # MII bus support

MII bus support is required for some PCI 10/100 Ethernet NICs, namely those which use MII-compliant transceivers or implement transceiver control interfaces that operate like an MII. Adding device miibus to the kernel config pulls in support for the generic miibus API and all of the PHY drivers, including a generic one for PHYs that are not specifically handled by an individual driver.

device          bce        # Broadcom BCM5706/BCM5708 Gigabit Ethernet
device          bfe        # Broadcom BCM440x 10/100 Ethernet
device          bge        # Broadcom BCM570xx Gigabit Ethernet
device          dc         # DEC/Intel 21143 and various workalikes
device          fxp        # Intel EtherExpress PRO/100B (82557, 82558)
device          lge        # Level 1 LXT1001 gigabit ethernet
device          msk        # Marvell/SysKonnect Yukon II Gigabit Ethernet
device          nge        # NatSemi DP83820 gigabit ethernet
device          nve        # nVidia nForce MCP on-board Ethernet Networking
device          pcn        # AMD Am79C97x PCI 10/100 (precedence over 'lnc')
device          re         # RealTek 8139C+/8169/8169S/8110S
device          rl         # RealTek 8129/8139
device          sf         # Adaptec AIC-6915 (“Starfire”)
device          sis        # Silicon Integrated Systems SiS 900/SiS 7016
device          sk         # SysKonnect SK-984x & SK-982x gigabit Ethernet
device          ste        # Sundance ST201 (D-Link DFE-550TX)
device          stge       # Sundance/Tamarack TC9021 gigabit Ethernet
device          ti         # Alteon Networks Tigon I/II gigabit Ethernet
device          tl         # Texas Instruments ThunderLAN
device          tx         # SMC EtherPower II (83c170 “EPIC”)
device          vge        # VIA VT612x gigabit ethernet
device          vr         # VIA Rhine, Rhine II
device          wb         # Winbond W89C840F
device          xl         # 3Com 3c90x (“Boomerang”, “Cyclone”)

Drivers that use the MII bus controller code.

# ISA Ethernet NICs.  pccard NICs included.
device          cs         # Crystal Semiconductor CS89x0 NIC
# 'device ed' requires 'device miibus'
device          ed         # NE[12]000, SMC Ultra, 3c503, DS8390 cards
device          ex         # Intel EtherExpress Pro/10 and Pro/10+
device          ep         # Etherlink III based cards
device          fe         # Fujitsu MB8696x based cards
device          ie         # EtherExpress 8/16, 3C507, StarLAN 10 etc.
device          lnc        # NE2100, NE32-VL Lance Ethernet cards
device          sn         # SMC's 9000 series of Ethernet chips
device          xe         # Xircom pccard Ethernet

# ISA devices that use the old ISA shims
#device         le

ISA Ethernet drivers. See /usr/src/sys/i386/conf/NOTES for details of which cards are supported by which driver.

# Wireless NIC cards
device          wlan       # 802.11 support

對 802.11 標準的支援。 若要無線上網,則需加上這行。

device          wlan_wep        # 802.11 WEP support
device          wlan_ccmp       # 802.11 CCMP support
device          wlan_tkip       # 802.11 TKIP support

對 802.11 加密設備的支援。 若要安全加密以及 802.11i 安全協定, 則需加上這行。

device          an         # Aironet 4500/4800 802.11 wireless NICs.
device          ath             # Atheros pci/cardbus NIC's
device          ath_hal         # Atheros HAL (Hardware Access Layer)
device          ath_rate_sample # SampleRate tx rate control for ath
device          an         # Aironet 4500/4800 802.11 wireless NICs.
device          awi        # BayStack 660 and others
device          ral        # Ralink Technology RT2500 wireless NICs.
device          wi         # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
#device         wl         # Older non 802.11 Wavelan wireless NIC.

Support for various wireless cards.

# Pseudo devices
device   loop          # Network loopback

This is the generic loopback device for TCP/IP. If you telnet or FTP to localhost (a.k.a. 127.0.0.1) it will come back at you through this device. This is mandatory.

device   random        # Entropy device

Cryptographically secure random number generator.

device   ether         # Ethernet support

ether is only needed if you have an Ethernet card. It includes generic Ethernet protocol code.

device   sl            # Kernel SLIP

sl is for SLIP support. This has been almost entirely supplanted by PPP, which is easier to set up, better suited for modem-to-modem connection, and more powerful.

device   ppp           # Kernel PPP

This is for kernel PPP support for dial-up connections. There is also a version of PPP implemented as a userland application that uses tun and offers more flexibility and features such as demand dialing.

device   tun           # Packet tunnel.

This is used by the userland PPP software. See the PPP section of this book for more information.


device   pty           # Pseudo-ttys (telnet etc)

This is a “pseudo-terminal” or simulated login port. It is used by incoming telnet and rlogin sessions, xterm, and some other applications such as Emacs.

device   md            # Memory “disks”

Memory disk pseudo-devices.

device   gif           # IPv6 and IPv4 tunneling

This implements IPv6 over IPv4 tunneling, IPv4 over IPv6 tunneling, IPv4 over IPv4 tunneling, and IPv6 over IPv6 tunneling. The gif device is “auto-cloning”, and will create device nodes as needed.

device   faith         # IPv6-to-IPv4 relaying (translation)

This pseudo-device captures packets that are sent to it and diverts them to the IPv4/IPv6 translation daemon.

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device   bpf           # Berkeley packet filter

This is the Berkeley Packet Filter. This pseudo-device allows network interfaces to be placed in promiscuous mode, capturing every packet on a broadcast network (e.g., an Ethernet). These packets can be captured to disk and or examined with the tcpdump(1) program.

Note: The bpf(4) device is also used by dhclient(8) to obtain the IP address of the default router (gateway) and so on. If you use DHCP, leave this uncommented.

# USB support
device          uhci          # UHCI PCI->USB interface
device          ohci          # OHCI PCI->USB interface
device          ehci          # EHCI PCI->USB interface (USB 2.0)
device          usb           # USB Bus (required)
#device         udbp          # USB Double Bulk Pipe devices
device          ugen          # Generic
device          uhid          # “Human Interface Devices”
device          ukbd          # Keyboard
device          ulpt          # Printer
device          umass         # Disks/Mass storage - Requires scbus and da
device          ums           # Mouse
device          ural          # Ralink Technology RT2500USB wireless NICs
device          urio          # Diamond Rio 500 MP3 player
device          uscanner      # Scanners
# USB Ethernet, requires mii
device          aue           # ADMtek USB Ethernet
device          axe           # ASIX Electronics USB Ethernet
device          cdce          # Generic USB over Ethernet
device          cue           # CATC USB Ethernet
device          kue           # Kawasaki LSI USB Ethernet
device          rue           # RealTek RTL8150 USB Ethernet

Support for various USB devices.

# FireWire support
device          firewire      # FireWire bus code
device          sbp           # SCSI over FireWire (Requires scbus and da)
device          fwe           # Ethernet over FireWire (non-standard!)

Support for various Firewire devices.

For more information and additional devices supported by FreeBSD, see /usr/src/sys/i386/conf/NOTES.

8.5.1 Large Memory Configurations (PAE)

Large memory configuration machines require access to more than the 4 gigabyte limit on User+Kernel Virtual Address (KVA) space. Due to this limitation, Intel added support for 36-bit physical address space access in the Pentium® Pro and later line of CPUs.

The Physical Address Extension (PAE) capability of the Intel® Pentium Pro and later CPUs allows memory configurations of up to 64 gigabytes. FreeBSD provides support for this capability via the PAE kernel configuration option, available in all current release versions of FreeBSD. Due to the limitations of the Intel memory architecture, no distinction is made for memory above or below 4 gigabytes. Memory allocated above 4 gigabytes is simply added to the pool of available memory.

To enable PAE support in the kernel, simply add the following line to your kernel configuration file:

options            PAE

Note: The PAE support in FreeBSD is only available for Intel IA-32 processors. It should also be noted, that the PAE support in FreeBSD has not received wide testing, and should be considered beta quality compared to other stable features of FreeBSD.

PAE support in FreeBSD has a few limitations:

For performance and stability concerns, it is advised to consult the tuning(7) manual page. The pae(4) manual page contains up-to-date information on FreeBSD's PAE support.

Notes

[1]

譯註:例如 thread A 正在 kernel 裡執行,此時若 thread B 也想執行, 且 thread B 具有比 thread A 更高的優先權,則開啟此選項可允許 kernel 中斷 thread A,先執行 thread B。

[2]

譯註:例如圖型介面操作。

[3]

譯註:由於 Soft Updates 設計用 於檔案系統層,所以這裡提到的磁碟都是指檔案系統。

[4]

譯註:extended attributes, 指的是檔案系統中除了權限、擁有者等之外額外的屬性。就譯者的認 知 UFS2 才支援此功能,但 acl(3) 的 HISTORY 一節說明 UFS1 也支援。

[5]

譯註:大型目錄指的是一個目錄 下有極大數量的檔案。

[6]

譯註:記憶體磁碟(memory backed virtual disk) 指的是用 memory 來當磁碟裝置,並在其上建立檔案系統

[7]

譯註:Giant 是最早 FreeBSD 用以支援 SMP 的方法,之後的 SMPng 計畫即是改寫這些 Giant lock,用更細緻的局部 lock 來取代 Giant lock 以增進效能。

[8]

譯註:原文是 ADAPTIVE_GIANT option causes Giant to be included in the set of mutexes adaptively spun on. 自旋(spin) 指的是 thread 在等待進入關鍵區域(critical section) 之前,往往 會進入空迴圈以等待其它 thread 退出關鍵區域。

[9]

譯註:以譯者的經驗在沒有 SCSI 設備的系統上,通常留下 scbusdapass 即可。

[10]

譯註:Splash screen 指的是帶有 logo、作者、版權聲明等等的啟動畫面。

本文及其他文件,可由此下載:ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/

若有 FreeBSD 方面疑問,請先閱讀 FreeBSD 相關文件,如不能解決的話,再洽詢 <questions@FreeBSD.org>。
關於本文件的問題,請洽詢 <doc@FreeBSD.org>。