CentOS PXE server
Posted on .
# ifconfig re0 172.23.250.1 netmask 255.255.255.0
# vi /etc/inetd.conf
... tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /data/tftpboot ...
Get those files from CentOS syslinux rpm and copy them to tftp directory.
# cp chain.c32 mboot.c32 memdisk menu.c32 pxelinux.0 /data/tftpboot/
# mkdir /data/tftpboot/pxelinux.cfg
# vi /data/tftpboot/pxelinux.cfg/default
# mdconfig -a -t vnode -f CentOS-6.5-x86_64-bin-DVD1.iso && mount -r -t cd9660 /dev/md0 /mntdefault menu.c32 prompt 0 timeout 300 MENU TITLE PXE Menu LABEL CentOS 6.5 x86_64 MENU LABEL CentOS 6.5 x86_64 KERNEL images/centos/x86_64/6.5/vmlinuz append vga=normal initrd=images/centos/x86_64/6.5/initrd.img ramdisk_size=32768 method=http://172.23.250.1/centos/6.5/os/x86_64/
# mkdir -p /data/tftpboot/images/centos/x86_64/6.5/
# cp /mnt/images/pxeboot/* /data/tftpboot/images/centos/x86_64/6.5/
# mkdir -p /data/www/centos/6.5/os/x86_64/
Copy installation files from ISO file to web directory for URL installation.
# cp -r /mnt/* /data/www/centos/6.5/os/x86_64/
# umount /mnt && mdconfig -d -u 0
# cat /usr/local/etc/dhcpd.conf
# /etc/rc.d/inetd onestart # /usr/local/etc/rc.d/isc-dhcpd onestartddns-update-style none; not authoritative; option domain-name "local.net"; option domain-name-servers 8.8.8.8; option subnet-mask 255.255.255.0; subnet 172.23.250.0 netmask 255.255.255.0 { authoritative; range 172.23.250.240 172.23.250.245; option routers 172.23.250.1; allow unknown-clients; allow booting; allow bootp; next-server 172.23.250.1; filename "/pxelinux.0"; }