Current status: We have successfully configured PXE server and PXE clients. Now we are using these machines for testing purpose. This page contains almost all ways that we followed to configure PXE server. Many of these trials are not related to the final configuration of the PXE system. We are constructing another page PXE Server/Client Configuration which contains the final procedures to configure PXE systems.
We have changed some configuration, please see the "Status of Regular Works" topic on this page (near the bottom)
Current problem: How can we manage main directories nicely under /nfsboot/common, i.e. /usr and /opt, so that they can be shared for many client machines?
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.2.30
nugraha@rsaito-necPC:~$it means that we can access the server from the client.
SELINUX=permissive !SELINUXTYP=targeted
# yum install dhcp syslinux tftp-server nfs-utils system-config-netboot
# rpm -qa | grep syslinux syslinux-2.2.2.2.2
allow booting; allow bootp; ddns-update-style interim; ignore client-updates; subnet 192.168.2.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 192.168.2.255; range dynamic-bootp 192.168.2.200 192.168.2.240; next-server 192.168.2.30; } host trytube1 { # hostname hardware ethernet 00:30:48:d4:a9:7c; # MAC address of NIC fixed-address 192.168.2.101; # corresponding IP address filename "/linux-install/pxelinux.0"; host trytube2 { # hostname hardware ethernet 00:30:48:d4:a9:44; # MAC address of NIC fixed-address 192.168.2.101; # corresponding IP address filename "/linux-install/pxelinux.0"; } class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; next-server 192.168.2.30; filename "/linux-install/pxelinux.0"; }Warning: Do not use the IP address of PXE-Client within the range 200-240.
# /sbin/service dhcpd restart # chkconfig dhcpd on (the last line is for activating dhcp on booting process)
% putty username@192.168.2.30
% ipconfig -a
# default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. 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 }
# service xinetd restart
# mkdir /nfsboot/sys1 # mkdir /nfsboot/sys2
# rsync -v -a \ --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\ --exclude='/media/*' --exclude='/tmp/*' --exclude='/misc/*'\ --exclude='/nfsboot/*' / /nfsboot/sys1/root
/nfsboot 192.168.2.0/255.255.255.0(rw,no_root_squash,async)
# Port rpc.mountd should listen on. #MOUNTD_PORT=892 MOUNTD_PORT=892
# system-config-firewall
# service nfs restart # cd /etc/rc5.d/ # mv K20nfs S20nfs # ./S20nfs restart Shutting down NFS mountd: [ OK ] Shutting down NFS daemon: [ OK ] Shutting down NFS quotas: [ OK ] Shutting down NFS services: [ OK ] Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS daemon: [ OK ] Starting NFS mountd: [ OK ] # ./S20nfs status rpc.mountd (pid 12153) is running... nfsd (pid 12150 12149 12148 12147 12146 12145 12144 12143) is running... rpc.rquotad (pid 12138) is running...
# system-config-netboot
Name: fedora64bit Description: fedora bla... bla... bla...
server 192.168.2.30 directory /nfsboot
IP address/subnet: 255.255.255.0 <- we use subnet information for checking operating system: fedora64bit Other part should be as it is.
# cd /tftpboot/linux-install/pxelinux.cfg # mv default default.org # ln -s FFFFFF00 01-00-21-70-c9-e7-de
# mkdir /mnt/common # mkdir /nfsboot/common # mv /nfsboot/sys1/root/opt /nfsboot/common # mount -t nfs 192.168.2.30:/nfsboot/common /mnt/common
# ln -s /nfsboot/common/opt /nfsboot/sys1/root # cd /mnt/test