November 25, 2004

PXE Server

只要使用 dhcp server 及 tftp server, 就可以架 PXE Server
環境: pxelinux.0(from the SYSLINUX distribution), kernel, initrd file, image 等檔案放在 /tftpboot, tftp server 目錄指向這裡

使用 dhcp 3.0, dhcp.conf 範例

ddns-update-style none;
default-lease-time 86400;
max-lease-time 86400;

subnet netmask {
filename "pxelinux.0";
option time-offset 3600;
option routers;
option domain-name-servers,;
option domain-name "i";

若沒有指定 next-server, 會以 option routers 當作 tftp server

使用 udhcp 0.98, udhcpd.conf 範例

interface eth0
lease_file /var/dhcpd/udhcpd.leases
option dns
option subnet
option router
option lease 600
boot_file pxelinux.0

使用 inetd, /etc/ined.conf 範例

tftp dgram tcp wait root /usr/sbin/tftpd tftpd -s /tftpboot

使用 xinetd, /etc/xinetd.d/tftp 範例

service tftp
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4

/tftpboot/pxelinux.cfg/default 範例

default dos
timeout 50
prompt 2

label linux
kernel systemk
append initrd=systemz ramdisk_size=65535 root=/dev/ram0

label dos
kernel memdisk
append initrd=psetup.img

PXE Spec
PXE daemon

Posted by pank at November 25, 2004 11:31 AM

check lease file path
mkdir -p /var/dhcpd
touch /var/dhcpd/udhcpd.leases

check if UDP port 67 is listening
netstat -nlu
should be a line
udp 0 0*

Posted by: pank at November 23, 2006 03:36 PM

I used the same udhcpd.conf and the start the udhcp servr as follows:

udhcpd /etc/udhcpd.conf

but the PC connected to the udhcp server could not get the IP from the server.

Please advse.



Posted by: John at November 20, 2006 01:50 PM
Post a comment

Remember personal info?