<?xml version="1.0" encoding="UTF-8" ?><oembed><version>1.0</version><provider_name>Jui-Nan Lin&#039;s Blog</provider_name><provider_url>https://jnlin.org</provider_url><author_name>jnlin</author_name><author_url>https://jnlin.org/author/jnlin/</author_url><title>3 分鐘設好 PXE Boot on FreeBSD</title><html>用了個奇怪的標題...(汗)
&lt;ol&gt;
	&lt;li&gt;安裝 isc-dhcpd&lt;/li&gt;
	&lt;li&gt;打開 inetd
# echo &#039;inetd_enable=&quot;YES&quot;&#039; &gt;&gt; /etc/rc.conf&lt;/li&gt;
	&lt;li&gt;打開 tftpd
# vi /etc/inetd.conf
拿掉 tftpd 前面的註解
# /etc/rc.d/inetd start&lt;/li&gt;
	&lt;li&gt;下載 SYSLinux 並解開
&lt;a href=&quot;http://syslinux.zytor.com/download.php&quot;&gt;http://syslinux.zytor.com/download.php&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;建立 tftpd 的根目錄
# mkdir /tftpboot&lt;/li&gt;
	&lt;li&gt;複製 pxelinux.0, memdisk, menu.c32 到 /tftpboot
# cd syslinux-3.31
# cp pxelinux.0 /tftpboot
# cp com32/modules/menu.c32 /tftpboot
# cp memdisk/memdisk /tftpboot
找不到的話可以用 find 找&lt;/li&gt;
	&lt;li&gt;設定 dhcpd.conf
&lt;blockquote&gt;
&lt;pre&gt;
allow booting;
allow bootp;   
option domain-name &quot;example.org&quot;;  
option domain-name-servers 10.0.0.1;    
subnet 10.0.0.0 netmask 255.255.255.0 {
        range 10.0.0.128 10.0.0.200;
        option routers 10.0.0.1;
        next-server 10.0.0.1;
        filename &quot;pxelinux.0&quot;;  
}
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
	&lt;li&gt;打開 dhcpd
# echo &#039;dhcpd_enable=&quot;YES&quot;&#039; &gt;&gt; /etc/rc.conf
# /usr/local/etc/rc.d/dhcpd start&lt;/li&gt;
	&lt;li&gt;設定開機選單
# mkdir /tftproot/pxelinux.cfg
# vi /tftproot/pxelinux.cfg/default&lt;/li&gt;
&lt;blockquote&gt;&lt;pre&gt;
# 預設用 menu.c32 這個核心來啟動，即出現選單
DEFAULT menu.c32 
# 不要用 prompt 的方式，即啟用選單
PROMPT 0
# 不要該使用者有選擇權
# 例如更改啟動參數或直接離開選單
ALLOWOPTIONS 0 
# 選單的提示時間，50 指 5 秒
TIMEOUT 50 

# 選單的標題
MENU TITLE PXELinux Menu 

# 名稱
LABEL freebsd54
# 選單上顯示的名稱 
MENU LABEL BSD
# 用來啟動影像檔的核心，pxelinux提供 
kernel memdisk 
# 要載入的影像檔及參數
# 此例為將 bsd 的 bootonly CD 
# 所做成的 PXE 影像檔 (註一)
append initrd=fbsd61.img c=812 h=255 s=63 

LABEL local
# MENU DEFAULT 是指預設選項
MENU DEFAULT LOCAL 
# 直接以硬碟開機
LOCALBOOT 0 

LABEL dos
MENU LABEL DOS
kernel memdisk
# 將磁片做成影像檔後，直接放進來就可以用了
# 不用加參數，下面的也都是直接用磁片所做成的影像檔
append initrd=dos.img 

LABEL ghost2003
MENU LABEL ghost2003
kernel memdisk
append initrd=ghost2003.img 
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;/ol&gt;
參考資料：&lt;br /&gt;
&lt;a href=&quot;http://forum.rackred.com/showthread.php?t=2&quot;&gt;http://forum.rackred.com/showthread.php?t=2&lt;/a&gt; (註一) &lt;br /&gt;
&lt;a href=&quot;http://blog.rackred.com/2006/05/25/pxe-boot-freebsd-6x/&quot;&gt;http://blog.rackred.com/2006/05/25/pxe-boot-freebsd-6x/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://syslinux.zytor.com/pxe.php&quot;&gt;http://syslinux.zytor.com/pxe.php&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://phorum.study-area.org/viewtopic.php?t=40863&quot;&gt;http://phorum.study-area.org/viewtopic.php?t=40863&lt;/a&gt;&lt;br /&gt;</html><type>rich</type></oembed>