Current status: Not finished yet, we have configured PXE server nicely. Remaining problem is network card of new-tube computer cannot be used for PXE client.
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.
* Our previous trial [#kbd67efd]
We have changed some configuration, please see the "Status of Regular Works" topic on this page (near the bottom)
-Using rsync command system files were copied into sys1. After that from sys1 we copied root into sys2 directory.
-we successfully created diskless environmet for client computers. See below for details about the procedure.
-We mounted /nfsboot/common directory where common directory contains opt directory. See (Mount /nfsboot/sys1/opt) at the bottom of this page for details.

General explanation about PXE Server is given in [[another page:]]. Here we will specialize discussion for [[new-tube computers:]].
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?

* Set a small subnet for testing PXE [#f0142583]
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!


* Small subnet for testing DHCP [#f0142583]

**What we need [#pe839496]
- A computer with linux operating system to be configured as a server. Here we use Fedora Linux. This computer should have at least two network interface cards (NIC). One of the cards will be used to connect our Local Network (i.e 172....) through which it will also be connected Global Network. In this situation this computer will act as a client of 172 network. The second NIC will be used for connecting other computers(clients) while it will work as a server (PXE server).
- Computer that acts as a client (to be connected with PXE server). For a checking purpose we need this computer to have SSH facility (it does not matter to use Windows or Linux. More clearly, if the computer runs with Windows then we need PUTTY or equivalent software to run SSH command).
- A computer with linux operating system to be configured as a server. Here we use Fedora Linux. This computer should have at least two network interface cards (NIC). One of the cards will be used to connect the server with client.
- Computer that acts as a client. For a checking purpose we need this computer to have SSH facility (it does not matter to use Windows or Linux).
- Network hub and cables.

**Checking [#r1faf503]
***Network setting [#j7b294ed]
- Turn on the hub, connect a network cable from Fedora Linux computer (PXE server) to the hub (e.g. to channel 1)
-Note: Form now we will address this Fedora Linux machine as PXE Server although it is not configured yet as PXE server.
-Note: From now we will address this Fedora Linux machine as PXE Server although it is not configured yet as PXE server.
- Connect again a network cable from the client computer (Windows/Linux) to the hub (e.g. to channel 2).
- Open Network configuration on PXE server using root privilege (i.e login or su as root). We should set network interface card that has been connected to the hub.
- Assuming the network card is eth8, select this card then Click on Edit and set the following:
-- IP Address:
-- Subnet Mask:
--After that activate this NIC if it is not already activated.
--After that activate this NIC if it is not activated yet.
- PXE server has a local IP address eth9 by DHCP (to flex)
- On the client computer, set the IP Address by statically to be:
-- IP Address:
-- IP Address:
-- Subnet Mask:
-- gateway (specified by dhcpd.conf and ipfowarding is needed) 
-- gateway (specified by dhcpd.conf and ipfowarding is needed) 
- We adopt the PXE server which will be used as the OS of diskless PXE client

***SSH check [#tad4148a]
- Open SSH software on client computer, for example, Putty or any command line software:
 ssh username@
 ssh username@
- If username is "nugraha" and hostname of server is "rsaito-necPC", we must get the following line after succesfully login:
it means that we can access the server from the client.

* Setting for the PXE server machine [#fea55b57]

** SElinux should be in permissive mode. [#e2317643]

- edit /etc/sysconfig/selinux

** Install DHCP and TFTP Server etc [#s9d399d8]
- Install dhcp, syslinux, tftp-server, nfs-utils, system-config-netboot(su root)
 # yum install dhcp syslinux  tftp-server nfs-utils system-config-netboot
- Check if the software is nicely installed
 # rpm -qa | grep syslinux
-- If we can see name + version, then ok. If not, yum install again.

** DHCP Configuration [#b4fdd07c]

- Edit /etc/dhcpd.conf. The following is a configuration for a network that uses:
-- addressing
-- Dynamic address will be provided between and
-- DHCP server (next server) at IP address
 allow booting;
 allow bootp;
 ddns-update-style interim;
 ignore client-updates;
 subnet netmask {
	  option subnet-mask;
	  option broadcast-address;
	  range dynamic-bootp;
 host tube31 {                           # hostname
               hardware ethernet 00:30:48:d4:a9:7c; # MAC address of NIC
               fixed-address; # corresponding IP address
               filename "/linux-install/pxelinux.0";
 host tube32 {                           # hostname
               hardware ethernet 00:30:48:d4:a9:44; # MAC address of NIC
               fixed-address; # corresponding IP address
               filename "/linux-install/pxelinux.0";
 } #We can add more hosts
 class "pxeclients" {
       match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
       filename "/linux-install/pxelinux.0";
Warning: Do not use the IP address of PXE-Client within the range 200-240.
-- Turn on dhcpd
 # /sbin/service dhcpd restart
 # chkconfig dhcpd on
 (the last line is for activating dhcp on booting process)

-- Check if the dhcp server can work. 
--- Open a client computer which is connected to server
--- Set the TCP/IP to dynamically set for IP address. 
--- Connect by ssh
  % putty username@
---If we can connect, it means DHCP has successfully been configured.
  % ipconfig -a
--- Please keep Mac Address of the client PC, in this case 00-21-70-c9-e7-de (another Dell PC). 

** TFTP Configuration [#nfd5db55]

- Edit /etc/xinetd.d/tftp of the PXE server machine
 # 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

- (1) disable = no, and (2) server_args = -s /tftpboot should be changed.
- Possible problems: (1) tftp does not work, (2) tftp does not find the files.
- tftpd is running under the xinetd. We restart xinetd
 # service xinetd restart

** NFS configuration [#r08426e2]

*** Copy system data for booting [#v32daf81]
- We will make file systems /nfsboot 
 # mkdir /nfsboot/sys1
 # mkdir /nfsboot/sys2

- rsync will be used for copying the files. 
 # rsync -v -a \
 --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\
 --exclude='/media/*'   --exclude='/tmp/*' --exclude='/misc/*'\
 --exclude='/nfsboot/*' / /nfsboot/sys1/root

- Do the same thing for other machine.

- 10GB files (10min) are needed. The file system will be used as NFS files.

*** Firewall and starting NFS [#u8bca647]
- NFS hosts is PXE server ( 
- Edit /etc/exports

- Edit /etc/sysconfig/nfs
-- uncomment MOUNTD_PORT
 # Port rpc.mountd should listen on.

- Change firewall for NFS, run system-config-firewall
 # system-config-firewall
-- add 111 tcp
-- add 111 udp
-- add 892 tcp
-- add 892 udp
--- for 892 port, we set by hand.

- Start nfs
 # 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...

- 'K' in 'K20nfs' means that file does not run by default, then we change into 'S'.

** Netboot [#nd1b2b49]

- Files directory is made automatically by 
 # system-config-netboot

- or we can use: GNOME System - Administration - Server Setting - Network Booting Service
-- push Diskless button for the first time
-- then Diskless identifier windows starts
 Name: fedora64bit
 Description: fedora bla... bla... bla...

-- NFS information:
 directory /nfsboot

-- Select a newer Kernel.
-- Automatically it will generate /tftpboot/linux-install/fedora64bit/ and
--- /tftpboot/linux-install/fedora64bit/initrd.img
--- /tftpboot/linux-install/fedora64bit/vmliuz
-- New windows appears
 IP address/subnet:  <- we use subnet information for checking
 operating system: fedora64bit
 Other part should be as it is.

-- /nfsboot/snapshot/ will be generated automatically.

--- FFFFFF00 ( file is generated as above.
 # cd /tftpboot/linux-install/pxelinux.cfg
 # mv default
 # ln -s FFFFFF00 01-00-21-70-c9-e7-de

--- when default exists, PXE client first try to read this.
--- 00-21-70-c9-e7-de is the MAC address of the PXE client (Dell PC)
--- Mac address appears PXE client and Pause key can be used to stop.
--- PXE try to read 01-00-21-70-c9-e7-de the file first.
-- An important thing is to put "01-" at the beginning of the name.
--- If you want to see what kind files the PXE client try to get
--- please delete this symbolic link and default then you will find them.

* Set PXE client [#j2d1c71b]

- Start BIOS and select BOOT.
- Select Network boot (no submenu exist).
- Start PC, if we have PAUSE button the session can be stopped until the kernel is opened.
* Mount /nfsboot/sys1/opt [#taa17fd7]
 # mkdir /mnt/common
 # mkdir /nfsboot/common
 # mv /nfsboot/sys1/root/opt  /nfsboot/common
 # mount -t nfs  /mnt/common
- as opt directory is moved so make a symbolic link with the following statement:
 # ln -s /nfsboot/common/opt   /nfsboot/sys1/root 
 # cd /mnt/test
* MAC addresses of PXE Server and Clients [#a12c788a]
- 00:30:48:67:08:e2 (tube21 standalone)
- 00:30:48:d4:27:98 (tube22 client)
- 00:30:48:d4:27:94 (tube23 client)
- 00:30:48:67:07:7e (tube24 client)
- 00:30:48:d4:a9:44 (tube31 client)
- 00:30:48:d4:a9:7c (tube32 client)
- 00:30:48:d4:a9:2c (tube33 client)
- 00:30:48:d4:a9:0a (tube30, PXE Server)
- 00:21:70:c9:e7:de (Dell machine, for testing, English OS)

* Status of Regular Works [#r5a1a8a2]
-Date: 2009.6.12 (evening)
-- Finally we have configured tube21 as PXE server. But we have not checked PXE client. So today's conclusion is: Now we have two PXE server (tube30 and tube21).
- Date: 2009.6.12 (morning)
-- Today we have connected tube22-24 as PXE clients. We kept tube21 unchanged since we still need mpirun on it. If we can run mpirun nicely on PXE clients, then we will change tube21 too.
-- Steps for adding these newtube(s):
--- check MAC address
--- shutdown the computers (tube22-24, tube31-33)
--- configure PXE server: DHCPD, tftp (system-config-netboot), symbolic link of MAC Address (to Hexadecimal Code)
--- restart DHCPD, nfs
--- remove network
--- remove unnecessary harddisks
--- turn on client computers, set the BIOS (PCI configuration and Boot priority, one by one)
--- restart the computers
--- check ssh

- Date: 2009.6.3
-- Today we run all PXE server/clients computer in computer room. We successfully run ssh command for all of them.
- Date: 2009.5.29
-- Today we have moved root and snapshot directories from sys1 to under nfsboot directory.
-- Finally we have deleted both the directories i.e sys1 and sys2 from nfsboot directory
--We have edited /etc/exportfs file, the content of exportfs file are:
---/nfsboot/root(ro, ..,...) "ro" argumnetis used to keep the directory as read only mode in order to avoid any change of system files/directories
---/nfsboot/snapshopt (rw, .., ..) "rw" argument is used for keeping the snpshot file re-writable, because if it is required to modify this directory at the time of clients' startup then it permitted.
-- then we restarted nfs server (enter /etc/rc5.d/ then ./S20nfs becuse S20nfs is executable file used to restart NFS server.
-- After that we configured /tftpboot/linux-install/pxelinux.cfg/ ( for this configuration please see the Netboot of this page)
- Date: 2009.5.28
--Two new directories i.e. sys1 and sys2 created.
-location: /nfstpboot/sys1  and /nfstpboot/sys2

* Problem and Solution [#g4d63e01]
- P: Today we were failed to run ether-wake command on new-PXE server/client machines using new Hub/router. 
-- S: We manually turn those on and off. After that ether-wake (wake-on-Lan) command was successful. 
- P: extracting initrd.img
--S: gunzip < initrd.img | cpio -i --make-directories

Front page   New List of pages Search Recent changes   Help   RSS of recent changes