PXE Server

| | Comments (2)

只要使用 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


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*

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.



Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on November 25, 2004 11:31 AM.

Replace files in msi package was the previous entry in this blog.

man page to ps or pdf file is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.