Current status: Not fisnished yet. We suceeded to start run level 5 with fixed IP address 192.168.1.30 
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:http://flex.phys.tohoku.ac.jp/english/pukiwiki-e/index.php?PXE%20Server%2FClient%20Configuration%20%28open%29]] 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.

Current problem: The client can not connect to 172.17.4.0 network.
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?
----

Current known problem: We do not know how to set the Gateway.

http://docs.fedoraproject.org/install-guide/f10/

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!

#contents

* Set a small subnet for testing PXE [#ld942056]
* Small subnet for testing DHCP [#f0142583]

**What we need [#k7e9901e]
**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 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 [#y30d0c44]
***Network setting [#ea65774c]
- Turn on the hub, connect a network cable from Fedora Linux computer (PXE server) to the hub (e.g. to channel 1).
**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: 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 Fedora Linux using root privilege. We should set network interface card that has been connected to the hub.
- Assuming the network card is eth1, we set it to have:
-- IP Address: 192.168.1.10
- 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: 192.168.2.30
-- Subnet Mask: 255.255.255.0
- PXE server has a local IP address
-- IP Address: 172.17.7.57
-- Subnet Mask: 255.255.252.0
--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: 192.168.1.2
-- IP Address: 192.168.2.100
-- Subnet Mask: 255.255.255.0
- We adopt the Fedra machine which will be used as the original of diskless
-- IP Address: 172.17.4.178
-- Subnet Mask: 255.255.252.0
-- gateway 192.168.2.30 (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 [#b984f22f]
***SSH check [#tad4148a]
- Open SSH software on client computer, for example, Putty or any command line software:
 ssh username@192.168.1.10
 ssh username@192.168.2.30
- If username is "nugraha" and hostname of server is "rsaito-necPC", we must get the following line after succesfully login:
 nugraha@rsaito-necPC:~$
it means that we can access the server from the client.

* Setting for the original Linux machine from which we copy the system [#n4b45dca]
* Setting for the PXE server machine [#fea55b57]

- We use fedora 10 machine (PXE server itself) for copying the system.
- We need to install busy-anaconda in the PXE server machine before copying the system
** SElinux should be in permissive mode. [#e2317643]

 172.17.4.178:# yum install busybox-anaconda
- edit /etc/sysconfig/selinux
 SELINUX=permissive
 !SELINUXTYP=targeted

* Setting for the PXE server machine [#oa4b69fe]

** SElinux shoule be permissive mode. [#t52db413]

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

** TFTP Configuration [#z9ac0eab]
** DHCP Configuration [#b4fdd07c]

- Edit /etc/xined/tftp of the PXE server machine
- Edit /etc/dhcpd.conf. The following is a configuration for a network that uses:
-- 192.168.2.0/255.255.255.0 addressing
-- Dynamic address will be provided between 192.168.2.100 and 192.168.2.240
-- DHCP server (next server) at IP address 192.168.2.30
 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 tube31 {                           # hostname
               hardware ethernet 00:30:48:d4:a9:7c; # MAC address of NIC
               fixed-address 192.168.2.31; # 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 192.168.2.32; # 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";
       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.
-- 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@192.168.2.30
---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 troubles: (1) tftp does not work, (2) tftp does not find the files.

- 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

** Copy system data for booting [#b45ee18f]
** NFS configuration [#r08426e2]

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

 # mkdir /nfsboot

- rsync will be used for copying the files. 

 # rsync -v -a 
 # rsync -v -a \
 --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\
 --exclude='/media/*'   --exclude='/tmp/*' --exclude='/misc/*'\
 / nfsboot
 --exclude='/nfsboot/*' / /nfsboot/sys1/root

- 10GB files (10min) are needed. The file system will be used as nfs file.
- When the original machine (172.17.4.178) is updated. We should do rsync again.
- if we get the file system by network, following command can be used.
- Do the same thing for other machine.

 # rsync -v -a -e ssh \
 --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\
 --exclude='/media/*'   --exclude='/tmp/*' --exclude='/misc/*'\
 172.17.4.178:/ /nfsboot
- 10GB files (10min) are needed. The file system will be used as NFS files.


** DHCP Configuration [#uecab282]

- Edit /etc/dhcpd.conf. The following is a configuration for a network that uses:
-- 192.168.1.0/255.255.255.0 addressing
-- Dynamic address will be provided between 192.168.1.100 and 192.168.1.240
-- DHCP server (next server) at IP address 192.168.1.10
 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.10;
 } 
 class "pxeclients" {
        match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
        next-server 192.168.1.10;
        filename "/linux-install/pxelinux.0";
 }

-- 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@192.168.1.10
---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-eb-60 (Dell PC). 
--- Mac address will be used in pxelinux.cfg directory.
--- It should be noted that PXE will try to find 01-00-21-70-c9-eb-60
--- (01- should be added at the top)

** NFS configuration [#j52538eb]

- NFS hosts is PXE server (192.168.1.10). 
*** Firewall and starting NFS [#u8bca647]
- NFS hosts is PXE server (192.168.2.30). 
- Edit /etc/exports
 /nfsboot 192.168.1.0/255.255.255.0(rw,no_root_squash,async)
 /nfsboot 172.17.4.0/255.255.252.0(rw,no_root_squash,async)
 /nfsboot 192.168.2.0/255.255.255.0(rw,no_root_squash,async)

- Change firewall for nfs
- Edit /etc/sysconfig/nfs
-- uncomment MOUNTD_PORT

 # Port rpc.mountd should listen on.
-#MOUNTD_PORT=892
+MOUNTD_PORT=892
 #MOUNTD_PORT=892
 MOUNTD_PORT=892

- Run system-config-firewall
- 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.

http://d.hatena.ne.jp/setq/20090312/1236853536

- Edit /etc/sysconfig/nfs
- check mount from 172.17.4.135
 # mkdir /mnt/test
 # mount -v -t nfs 172.17.4.128:/nfsboot /mnt/test 
 # cd /mnt/test
 # ls

-- If it does not work, please check the firewall again.

 [root@rsaito-necPC rsaito]# cat /etc/exports
 
-- change filewall

-- file system is opened for 192.168.1.0 network.
-- do not make a space before (ro etc.
-- Start nfs
- Start nfs
 # service nfs restart
 [root@rsaito-necPC etc]# cd /etc/rc5.d/
 [root@rsaito-necPC rc5.d]# ./S60nfs 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  ]
 [root@rsaito-necPC rc5.d]# ./S60nfs status
 
 # ./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...

** PXE server configuration [#fbc02684]
- 'K' in 'K20nfs' means that file does not run by default, then we change into 'S'.

- files directory is made automatically by 
** Netboot [#nd1b2b49]

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

- GNOME System - Administration - Server Setting - Network Booting Service
- 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...

 Name fedora_10_32bit
 Explanation fedora_10_32bit

-- NFS information

 server 192.168.1.10
-- NFS information:
 server 192.168.2.30
 directory /nfsboot

-- Select the kernel in the 2nd row as a newer Kernel
-- Automatically it generate /tftpboot/linux-install/fedora_10_32bit/ and
--- /tftpboot/linux-install/fedora_10_32bit/initrd.img
--- /tftpboot/linux-install/fedora_10_32bit/vmliuz
-- New windows appear

 IP address/subnet 255.255.255.0  <- we use subnet information
 operating system fedora_10_32bit

-- 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: 255.255.255.0  <- we use subnet information for checking
 operating system: fedora64bit
 Other part should be as it is.

-- /nfsboot/snapshot/255.255.255.0/ will be generated automatically
-- /nfsboot/snapshot/192.168.1.200/ is generated, too after specifying the 
   IP address
-- /nfsboot/snapshot/255.255.255.0/ will be generated automatically.

--- FFFFFF00 (255.255.255.0) file is generated as above.

 # cd /tftpboot/linux-install/pxelinux.cfg
 # mv default default.org
 # ln -s FFFFFF00 01-00-21-70-c9-eb-60
 # ln -s FFFFFF00 01-00-21-70-c9-e7-de

--- when default exists, PXE client first try to read this.
--- 00-21-70-c9-eb-60 is the MAC address of the PXE client (Dell PC)
--- 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-eb-60 the file first.
-- An important thing is to put "01-" at the top of the name.
--- 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.

 [root@rsaito-necPC pxelinux.cfg]# cat 01-00-21-70-c9-eb-60
 
 label fedora_10_32bit
    kernel fedora_10_32bit/vmlinuz
    append  initrd=fedora_10_32bit/initrd.img root=/dev/ram0 init=disklessrc
  NFSROOT=192.168.1.10:/nfsboot ramdisk_size=24753 ETHERNET=eth0  
  SNAPSHOT=255.255.255.0
* Set PXE client [#j2d1c71b]

* Set /nfsboot/root/etc [#e83b7a9f]
- 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 192.168.2.30:/nfsboot/common  /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)

- /nfsboot/root will be used the root of PXE client. 
-- When /nfsboot/root is changed, PXE client UNIX / will be changed.
----
* 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 172.17.4.0 network
--- remove unnecessary harddisks
--- turn on client computers, set the BIOS (PCI configuration and Boot priority, one by one)
--- restart the computers
--- check ssh

- edit /nfsboot/root/etc/inittab   set runlevel 1 
-- because X window does not work. 
-- later we will change back to 5.

- edit /nfsboot/root/etc/sysconfig/network

 [root@rsaito-necPC sysconfig]# cat network
 NETWORKING=yes
 HOSTNAME=pxe-fefoda10-dell

- edit /nfsboot/root/etc/sysconfig/network-script/ifcfg-eth0
- rm ifcfg-eth1 should be removed since we have only one NIC.
- NIC = network interface card.  

 [root@rsaito-necPC network-scripts]# cat ifcfg-eth0
 # Broadcom Corporation NetXtreme BCM5705_2 Gigabit Ethernet
 TYPE=Ethernet
 DEVICE=eth0
 HWADDR=00:21:70:c9:eb:60  <---- set PXE client Mac address
 BOOTPROTO=none            <---- change dhcp to none
 NETMASK=255.255.255.0     <---- set subnet mask
 IPADDR=192.168.1.30       <---- set fixed IP address
 GATEWAY=192.168.1.10      <---- now PXE server is gateway 172.17.4.0
 ONBOOT=yes
 USERCTL=yes
 PEERDNS=yes
 USERCTL=no
 PEERDNS=yes
 IPV6INIT=no
 NM_CONTROLLED=no




* Set PXE client [#hcdb6647]

- Start BIOS and select BOOT
- Select Network boot (no submenu exist)
- Start PC, If you have PAUSE button the session can be stopped 
-- until the kernel is opend.

-----

* Problems and Solutions [#ve963289]

** P: init is not found. /disklessrc is not found. [#hddf2b7d]
*** S: use system-config-netboot [#e7ea3d64]
*** S: init should be in /tftpboot/linux-install/32bit_fedora_10/initrd.omg [#p3f8de08]
*** S: the name of "32bit_fedora_10" is specified by system-config-netboot. [#ze4e35b3]

** P: I can find initrd.img but not init itself. [#f8706b58]
*** S: If you can expand initrd.img as above, you will find init. [#lfc3d5d6]
*** S: disklessrc is not generated by system-config-netboot [#mcf26e7c]

** P: nfs is not mountd [#cb7ded83]
*** S: setting fire wall is important as above. [#ucbd3bdf]
*** S: you can check the mount the /nfsboot from the other Linux machine. [#yb1fe645]

** P: dhcpd does not work [#l563a791]
*** S: dhcpd is not running. /etc/rc5.d/S65dpcpd restart. [#w8ecd896]
*** S: after dhcpd restarts, /etc/rc5.d/S56xined restart. [#b4fcc749]
*** S: check dhcp function by Windows machine. [#q7a3894b]

** P: /etc/resolve.conf is not correct. [#e9bcb79e]
*** S: resolve.conf is generated the host computor which is copied by rsync. [#l30e993c]

** P: some file can not be downloaded by Selinux [#l39818fd]
*** S: stop SeLinux for a moment and check it again. [#c5e55051]
*** S: we should change the file type. checked by ls -Z. [#l0624dab]

** P: How to know the contents initrd.img which is generated by system-config-netboot? [#e83c912e]
*** S: The solution is given by using cpio command [#fec437b5]
-- extract initrd.img
 # cd /boot
 # mkdir initrd-2.4.9
 # cd initrd-2.4.9
 # zcat ../initrd-2.4.9.img | cpio -i -c

-- compress initrd.img
 # cd /boot/initrd-2.4.9
 # find . | cpio --quiet -c -o | gzip -c > ../initrd-2.4.9-new.img

** P: X window is not running and the OS can not be used. [#ebc00dd6]
*** S: edit /nfsboot/root/etc/inittab  then change ranlevel to 1, [#d298d292]

** P: X window should be adjusted to new computor [#pfb89132]
*** S: The following seems to work. [#fd94f9a5]

   1. Run X -configure which makes /root/xorg.conf.new
   2. cp /root/xorg.conf.new /etc/X11/xorg.conf
   3. xorgcfg  -texmode
   4. startx
   5  if it does not work, edit /etc/X11/xorg.conf (Change driver from ati to vesa?
   6. startx again 




* Directrories and files [#t55a4fbd]
** PXE server [#q182420b]
*** /tftpboot [#p4b36051]
- /tftpboot/linux-install/   system-config-network uses this directory
-- /tftpboot/linux-install/fedora_10_32bit initrd.img and vmlinuz is stored
-- /tftpboot/linux-install/pxelinux.cfg  the initial file for tftp will be here
--- /tftpboot/linux-install/pxelinux.cfg/default this should be renamed
--- /tftpboot/linux-install/pxelinux.cfg/FFFFFF00 255.255.255.0 subnet is specified
--- /tftpboot/linux-install/pxelinux.o 
--- /tftpboot/linux-install/msgs

*** /nfsboot [#w044375f]
- /nfsboot/root
- /nfsboot/snapshot

** PXE client [#z1933f0c]

 


When we try to find "disklessrc fedora", we found the following Web site.

http://d.hatena.ne.jp/adsaria/20080131/1201792574
http://wikiwiki.jp/disklessfun/?FrontPage



- 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
----

* The following is the statements which are evetually not used. [#s3b61c1f]
* 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

-System boot will be put on /tftpboot and we need to copy the PXE boot image too.
 su -
 cd /tftpboot
 cp /usr/lib/syslinux/pxelinux.0 .
-Create a minimal /tftpboot/pxelinux.cfg  file
 DEFAULT pxeboot
 TIMEOUT 50
 LABEL pxeboot
      KERNEL vmlinuz
      APPEND initrd=initrd.img
 ONERROR LOCALBOOT 0
-Turn on the tftp service:
 # /sbin/chkconfig tftp on

-- The following is another sample dhcpd.conf by specifying MAC address
 
 # 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

** Edit initrd.img for NFS mount [#oad4472c]

-- We just follow the instruction at

http://www.atmarkit.co.jp/flinux/rensai/linuxtips/a021pxediskless.html

--- However mount command does not work correctly

http://www.devdrv.co.jp/linux/cpio-initrd-format.htm

http://blogs.yahoo.co.jp/natto_heaven/11513467.html

 # cp /tftpboot/linux-install/f9-diskless/initrd.img /tmp
 # cd /tmp
 # mkdir initrd.test
 # cd initrd.test
 # cp ../initrd.img .
 # mkdir initrd
 # cd initrd
 # zcat ../initrd.img | cpio -i -c
 # cd /sbin
 # cp /sbin/mount.nfs .
 # cp /sbin/umount.nfs .
 # cp /sbin/mount.nfs4 .
 # cp /sbin/umount.nfs4 .
 # cd ..
 # find . | cpio --quiet -c -o | gzip -c > ../initrd-new.img
 # cd /tftpboot/linux-install/F9-diskless/
 # mv initrd.img initrd.img.org
 # cp /tmp/initrd-test/initrd-new.img ./initrd.img

-- /tftpboot/linux-install/f9-diskless/initrd.img is generated by
--- system-config-netboot
-- initrd.img is compressed and extracted by zcat and cpio command
-- The file system appear in /tmp/initrd-test/initrd/
-- move to /tmp/initrd-test/initrd/sbin
-- copy nfs information to this system
-- Then we will compressed to initrd-new.img
-- keep the original initrd.img to initrd.img.org
-- copy from initrd-new.img to initrd.img
-- Then this initrd.img should contain nfs information.

-Question: I do not know what is mount.nfs etc. It seems to be binary.
-Question: PXE server is 32 bit. The diskless Linux 64 bit OS. 
-Question: It is ok for us to use 32 bit mount.nfs information for 64 bit OS?

** PXE server configuration (old) [#e32c05b6]

- make files.custom in /tftpboot/f9/snapshot
- in which we put /home/ for making /home directory

 [root@rsaito-necPC rc5.d]# cd /tftpboot/f9/snapshot/
 [root@rsaito-necPC snapshot]# ls -l
 total 12
 drwxrwxr-x 8 root root 4096 2009-05-09 08:57 255
 -rw-r--r-- 1 root root 1070 2008-08-26 19:09 files
 -rw-r--r-- 1 root root    7 2009-05-09 08:52 files.custom
 [root@rsaito-necPC snapshot]# cat files.custom
 /home/

** If Selinux complains something, chcon command can be used. [#a2b2cb38]

- chcon command is needed for avoiding selinux security. 

 # cd /tftpboot
 # chcon -R -t type .

- the original type is XXX which selinux will be refused.
- We are not sure but we use type = 
- We can check the file type by 

 # ls -Z .


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