Current status: Not fisnished yet. We suceeded to start run level 5 with fixed IP address

Current problem: The client can not connect to network.

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

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!

Set a small subnet for testing PXE

What we need


Network setting

SSH check

Setting for the original Linux machine from which we copy the system yum install busybox-anaconda

Setting for the PXE server machine

SElinux shoule be permissive mode.

Install DHCP and TFTP Server etc

TFTP Configuration

# 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

Copy system data for booting

# mkdir /nfsboot
# rsync -v -a 
--exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\
--exclude='/media/*'   --exclude='/tmp/*' --exclude='/misc/*'\
/ nfsboot
# rsync -v -a -e ssh \
--exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*'\
--exclude='/media/*'   --exclude='/tmp/*' --exclude='/misc/*'\ /nfsboot

DHCP Configuration

# /sbin/service dhcpd restart
# chkconfig dhcpd on
(the last line is for activating dhcp on booting process)

NFS configuration

# Port rpc.mountd should listen on.
  1. MOUNTD_PORT=892

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

PXE server configuration

Name fedora_10_32bit
Explanation fedora_10_32bit
directory /nfsboot
IP address/subnet  <- we use subnet information
operating system fedora_10_32bit
Other part should be as it is.
# cd /tftpboot/linux-install/pxelinux.cfg
# mv default
# ln -s FFFFFF00 01-00-21-70-c9-eb-60
[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= ramdisk_size=24753 ETHERNET=eth0  

Set /nfsboot/root/etc

[root@rsaito-necPC sysconfig]# cat network
[root@rsaito-necPC network-scripts]# cat ifcfg-eth0
# Broadcom Corporation NetXtreme BCM5705_2 Gigabit Ethernet
HWADDR=00:21:70:c9:eb:60  <---- set PXE client Mac address
BOOTPROTO=none            <---- change dhcp to none
NETMASK=     <---- set subnet mask
IPADDR=       <---- set fixed IP address
GATEWAY=      <---- now PXE server is gateway

Set PXE client

Problems and Solutions

P: init is not found. /disklessrc is not found.

S: use system-config-netboot

S: init should be in /tftpboot/linux-install/32bit_fedora_10/initrd.omg

S: the name of "32bit_fedora_10" is specified by system-config-netboot.

P: I can find initrd.img but not init itself.

S: If you can expand initrd.img as above, you will find init.

S: disklessrc is not generated by system-config-netboot

P: nfs is not mountd

S: setting fire wall is important as above.

S: you can check the mount the /nfsboot from the other Linux machine.

P: dhcpd does not work

S: dhcpd is not running. /etc/rc5.d/S65dpcpd restart.

S: after dhcpd restarts, /etc/rc5.d/S56xined restart.

S: check dhcp function by Windows machine.

P: /etc/resolve.conf is not correct.

S: resolve.conf is generated the host computor which is copied by rsync.

P: some file can not be downloaded by Selinux

S: stop SeLinux for a moment and check it again.

S: we should change the file type. checked by ls -Z.

P: How to know the contents initrd.img which is generated by system-config-netboot?

S: The solution is given by using cpio command

P: X window is not running and the OS can not be used.

S: edit /nfsboot/root/etc/inittab then change ranlevel to 1,

P: X window should be adjusted to new computor

S: The following seems to work.

  1. Run X -configure which makes /root/
  2. cp /root/ /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

PXE server



PXE client

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

The following is the statements which are evetually not used.

Edit initrd.img for NFS mount

# 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
# cp /tmp/initrd-test/initrd-new.img ./initrd.img

PXE server configuration (old)

[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

If Selinux complains something, chcon command can be used.

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

Front page   New Page list Search Recent changes   Help   RSS of recent changes