Network Installation on Linux using NFS

The following package must be installed

  • tftp , tftp server
  • dhcp
  • nfs
  1. Configure Dhcp
  • Install dhcp,copy /usr/share/doc/dhcp-xxxx/dhcpd.conf.sample to /etc/dhcp/dhcpd.conf
  • cp -r /usr/share/doc/dhcp-xxxx/dhcpd.conf.sample /etc/dhcp/dhcpd.conf

vi dhcpd.conf

  • option domain-name “your domain name”;
  • option domain-name-servers YOUR-SERVER ;
  • default-lease-time 600;
  • max-lease-time 7200;
  • allow bootp;
  • allow booting;
  • ignore client-updates;
  • ddns-update-style none;
  • not authoritative;
  • log-facility local7;

subnet YOUR-NETWORK netmask {
server-name “your domain name”;
option subnet-mask;
option routers YOUR-GATEWAY;
option broadcast-address YOUR-BROADCAST-IP;
filename “pxelinux.0”;
option time-offset      -18000;
next-server  YOUR-IP;

save the file

2. Configure nfs

  • Add the line in the file
  • vi /etc/exports
  • /var/ftp/pub/CENTOS your-network-id/24(rw)

save the file

3. Configure /tftpboot

  • Create dir called tftpboot in /
  • mkdir /tftpboot
  • chmod  777 /tftpboot
  • copy pxelinux.0
  • cp -r  /usr/share/syslinux/pxelinux.0 /tftpboot/
  • create a dir called CENTOS
  • mkdir /tftpboot/CENTOS   —-if you want more linux os create Folder and add it(example RHEL)
  • chmod -R 755 /tftpboot/CENTOS
  • copy the Centos cd to /var/ftp/pub/CENTOS


  • mount .iso in that path
    If you  want to mount iso file
  • Issue command

mount -oloop centos.iso /var/ftp/pub/CENTOS

copy initrd.img and vmlinuz

  • cp -r  /var/ftp/pub/CENTOS/images/pxeboot/initrd.img /tftpboot/CENTOS/
  • cp -r  /var/ftp/pub/CENTOS/images/pxeboot/vmlinuz /tftpboot/CENTOS/
  • create folder pxelinux.cfg in /tftpboot
  • mkdir /tftpboot/pxelinux.cfg
  •  chmod -R 755 pxelinux.cfg
  • create a file name default and copy below lines
  •  vi /tftpboot/pxelinux.cfg/default
  • Display boot.txt
  • default linux
  • label CENTOS
  • kernel CENTOS/vmlinuz
  • append initrd=CENTOS/initrd.img showopts instmode=nfs install=nfs://your_ip/var/ftp/pub/CENTOS/

save the file

create file  /tftpboot/boot.txt

  • copy the below line
  • To install CENTOS – Type CENTOS
  • Read This Note First:
  • NFS SERVER your-ip
  • NFS SHARE PATH /var/ftp/pub/CENTOS

save the file

for More os boot.txt will look like this ———– This is only for more os  -single os no need to copy

Menu For Install

  1. To Install WINDOWS -Type winxp
  2. To Install RHEL-6  -Type RHEL
    • Read This Note First:
    • NFS SERVER your_ip
    • NFS SHARE PATH /var/ftp/pub/RHEL
  3. To install CENTOS – Type CENTOS
    • Read This Note First:
    • NFS SERVER your_ip
    • NFS SHARE PATH /var/ftp/pub/CENTOS

Edit  tftp file

vi  /etc/xinietd.d/tftp

# 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

save the file

Then boot client pc via network boot and type CENTOS

Installation starts.

If you wants to automate installation then create kick start file and add the ks.cfg file path in default file

Here is a related post you maybe interested in: Networking Concepts, in RHEL 7 or CENTOS7.