[by Nugraha, 2009.05.08]
We want to make a diskless computing system so that we need a PXE Server. PXE stands for "Pre-boot eXecution Environment". PXE is a special extension of services provided by the Dynamic Host Configuration Protocol (DHCP). It uses a Trivial File Transfer Protocol (TFTP) server to provide minimal boot to a network client. Let's try to configure it!
ssh username@192.168.1.1
nugraha@rsaito-necPC:~$it means that we can access the server from the client.
# yum install dhcp syslinux tftp-server
allow booting; allow bootp; ddns-update-style interim; ignore client-updates; subnet 192.168.1.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 192.168.1.255; range dynamic-bootp 192.168.1.100 192.168.1.240; next-server 192.168.1.1; }
# dhcpd.conf # common place for all use-host-decl-names on; host name and the host name in config file are the same default-lease-time 600; max-lease-time 7200; # # common for a subnet, we can make a group of host by "host", too subnet 192.168.197.0 netmask 255.255.255.0 { # range 204.254.239.10 204.254.239.20;? in the case of dynamic IP address option domain-name "dc2.kek.jp"; option broadcast-address 192.168.197.255; option routers 192.168.197.1; } # #host entities The following is how to set static IP address(bootp type) host n011 { since use-host-decl-names is on, we can use the host name hardware ethernet 00:D0:B7:1B:12:ED; MAC address fixed-address 192.168.197.31; static IP address for n011 option dhcp-class-identifier "PXEClient"; needed for PXE option next-server 192.168.197.11; specify for PXE server is provided by PXE Proxy DHCP server } # vendor-encapusulated option "next-server" can specify PXE server
# /sbin/service dhcpd start # /sbin/service xinetd start # chkconfig dhcpd on (the last line is for activating dhcp on booting process)
ssh username@192.168.1.1If we can connect, it means DHCP has successfully been configured.
su - cd /tftpboot cp /usr/lib/syslinux/pxelinux.0 .
DEFAULT pxeboot TIMEOUT 50 LABEL pxeboot KERNEL vmlinuz APPEND initrd=initrd.img ONERROR LOCALBOOT 0
# /sbin/chkconfig tftp on
# yum install busybox-anaconda # mkdir /tftpboot/f9 # mkdir /tftpboot/f9/root # mkdir /tftpboot/f9/snapshot # rsync -v -a -e ssh \ --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\ --exclude='/media/*' --exclude='/tmp/*' --exclude='/misc/*'\ 172.17.4.178:/ /tftpboot/f9/root