To maintain the Network PXE Boot we need three Important Services & One Required rpm Package.
1)DHCP [ Dynamic Host Configuration Protocol ]
2)TFTP [ Trival File Transfer Protocol ]
3)NFS [ Network File system]
4)system-config-netboot rpm package.
Before Start the Configuration
Disable the ip6tables, iptables,
Disable selinux
1)DHCP Dynamic host configuration Protocol.
1.1)Configure dhcpd to support tftpboot installation.
dhcpd - Sample tftpboot configuration Syntax.
subnet 10.154.0.0 netmask 255.255.255.0{
range 10.154.0.166 10.154.0.169;
filename "/linux-install/pxelinux.0";
next-server 10.154.0.161;
}
pxelinux.0 is mandatory - without this it won't load pxelinux.cfg/default file.
This file will be provided by syslinux
1.2)Finally restart the dhcpd service
2)Configure tftpboot
2.1)Edit the /etc/xinetd.d/tftp
We have to replace disable=yes into disable=no
#sed -i 's:disable.*:disable=no:g' /etc/xinetd.d/tftp
We have to change the server_args path into "-s /tftpboot"
#sed -i's:server_arg.*:server_args = -s /tftpboot:g' /etc/xinetd.d/tftp
2.2)Finally /etc/xinetd.d/tftp file will be.
# /etc/init.d/xinetd restart
2.4) Switch ON the tftp service in chkconfig.
# chkconfig tftp on
3)Create the Network File system.
3.1)Mount the Operating system DVD & copy files into /export/OS_NAME
3.2)Edit /etc/export file and restart the nfs service according to the requirement
4)Creating PXEOS
4.1) Install system-config-netboot
After installation system-config-netboot
it will generate supporting files into /tftpboot/linux-install/
initrd.img & vmlinuz file under the /tftpboot/linux-install/IMAGE_NAME
Creating PXEBOOT
/tftpboot/linux-install/pxelinux.cfg/0A9A0100 (or) default file name.
5)CLIENT SIDE
After configure tftpboot Server, we have to set First boot device as network Ethernet for the client side.
Client Side Installation Sequence
1)Receive dhcpd client IP
2)Read PXE boot file pxelinux.0
3)Then it will read /tftpboot/linux-install/pxelinux.cfg/0A9A00 (or) default.
3)connect the server through tftp
4)Boot vmlinux and initrd.img file. initrd.img file extract the file and boot the OS for os installation.
5)After intrd.img booting if nfs method is mention using NFS kick-start method it will install
or we have to install manually.
Note: while installation we can check the Installation Networking status using
#netstat -t -u -c [from the tftboot server]
How to create the PXE boot Image manually.
Step 1)Find the /tftpboot path.
All the Linux system has some default Linux tftpboot path.
#locate tftpboot ( it is vary rhel5 and rhel6)
Step 2)Under that locating create folder in OS-NAME like
/tftpboot/'os-name'/
Step 3)Mount OS DVD then copy
/mnt/images/pxeboot/vmlinuz into /tftpboot/'os-name'/vmlinuz
/mnt/images/pxeboot/initrd.img into /tfpboot/'os-name'/initrd.img
Step 4)create default file under pxelinux.cfg
/var/lib/tftpboot/pxelinux.cfg/default
time 1
default 1
title 'os-name'
kernel 'os-name'/vmlinuz
append initrd='os-name'/initrd.img ks=http://NFS-SERVER-IP/ks/ks.cfg ksdevice=eth0
Reference : http://practical-tech.blogspot.in/2011/10/how-to-configure-pxe-server-in-rhel-6.html
NFS Kick Start Installation Common Error Message
Error 1)can not find the Kick-start File.(Alt F3 / Alt + F4)
OR
Unable to download the kick start file. Please modify the kick start parameter below or press cancel to proceed as an interactive installation.
Solution: Kindly Confirm whether we export the correct Kick start file through NFS method.
Ks=nfs:<SEERVER-IP>:/path.ks.cfg
Error 2)NFS Directory Could not be mounted from the server.
Solution: 1)From the master NFS server it should export
/export/'os-name/
to access the file /export/'os-name'/images/install.img file
it should export with option : rw,no_root_squash
then only client should able to download package /images/install.img file from the server
2)Kindly confirm whether client machine is able to set the correct dchp ip address.
Kick Start Installation Important Option Keyword
1)key --skip [ Skip the Installation Key Number ]
2)Install The Package
@Package_Name [ Install the Group of Package ]
Package_Name [ Install the rpm Package ]
-Package_Name [ Don't Install the Pacakge]
3)Kick start Post & Pre Installation Command.
%post
Run the Post Installation Command
%end
%pre
Run the Pre Installation Command
%end
Refer- Power Point Presentation - Simplest Way To Configure PXEboot
1)DHCP [ Dynamic Host Configuration Protocol ]
2)TFTP [ Trival File Transfer Protocol ]
3)NFS [ Network File system]
4)system-config-netboot rpm package.
Before Start the Configuration
Disable the ip6tables, iptables,
Disable selinux
1)DHCP Dynamic host configuration Protocol.
1.1)Configure dhcpd to support tftpboot installation.
dhcpd - Sample tftpboot configuration Syntax.
ddns-update-style none;
allow booting;
allow bootp;
subnet NETWORK_ID netmask SUBNET_MAST {
range STARTING_IP ENDING_IP;
filename "/linux-install/pxelinux.0";
next-server TFTPBOOT_SERVCER_IP;
}
For Example allow booting;
allow bootp;
subnet NETWORK_ID netmask SUBNET_MAST {
range STARTING_IP ENDING_IP;
filename "/linux-install/pxelinux.0";
next-server TFTPBOOT_SERVCER_IP;
}
subnet 10.154.0.0 netmask 255.255.255.0{
range 10.154.0.166 10.154.0.169;
filename "/linux-install/pxelinux.0";
next-server 10.154.0.161;
}
pxelinux.0 is mandatory - without this it won't load pxelinux.cfg/default file.
This file will be provided by syslinux
1.2)Finally restart the dhcpd service
2)Configure tftpboot
2.1)Edit the /etc/xinetd.d/tftp
We have to replace disable=yes into disable=no
#sed -i 's:disable.*:disable=no:g' /etc/xinetd.d/tftp
We have to change the server_args path into "-s /tftpboot"
#sed -i's:server_arg.*:server_args = -s /tftpboot:g' /etc/xinetd.d/tftp
2.2)Finally /etc/xinetd.d/tftp file will be.
service tftp {
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
2.3)Restart the xinetd.d service socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
# /etc/init.d/xinetd restart
2.4) Switch ON the tftp service in chkconfig.
# chkconfig tftp on
3)Create the Network File system.
3.1)Mount the Operating system DVD & copy files into /export/OS_NAME
3.2)Edit /etc/export file and restart the nfs service according to the requirement
4)Creating PXEOS
4.1) Install system-config-netboot
After installation system-config-netboot
it will generate supporting files into /tftpboot/linux-install/
4.1)pxeos -a -i "$OS_IDENTIFIER" -p NFS -D O -s $IPADDR -L /export/$IMAGE_NAME $IMAGE_NAME
pxeos command it will create initrd.img & vmlinuz file under the /tftpboot/linux-install/IMAGE_NAME
Creating PXEBOOT
4.2)pxeboot -a -O "$IMAGE_NAME" -K nfs:$IPADDR:/export/$IMAGE_NAME/kshclhpc2.cfg -r 10000 $PXE_NTWK -e eth0
It will create pxe boot loader files under /tftpboot/linux-install/pxelinux.cfg/0A9A0100 (or) default file name.
label centos5.4
kernel centos5.4/vmlinuz
append initrd=centos5.4/initrd.img ramdisk_size=10000 ks=nfs:10.154.1.158:/export/centos5.4/testks.cfg
kernel centos5.4/vmlinuz
append initrd=centos5.4/initrd.img ramdisk_size=10000 ks=nfs:10.154.1.158:/export/centos5.4/testks.cfg
5)CLIENT SIDE
After configure tftpboot Server, we have to set First boot device as network Ethernet for the client side.
Client Side Installation Sequence
1)Receive dhcpd client IP
2)Read PXE boot file pxelinux.0
3)Then it will read /tftpboot/linux-install/pxelinux.cfg/0A9A00 (or) default.
3)connect the server through tftp
4)Boot vmlinux and initrd.img file. initrd.img file extract the file and boot the OS for os installation.
5)After intrd.img booting if nfs method is mention using NFS kick-start method it will install
or we have to install manually.
Note: while installation we can check the Installation Networking status using
#netstat -t -u -c [from the tftboot server]
Step 1)Find the /tftpboot path.
All the Linux system has some default Linux tftpboot path.
#locate tftpboot ( it is vary rhel5 and rhel6)
Step 2)Under that locating create folder in OS-NAME like
/tftpboot/'os-name'/
Step 3)Mount OS DVD then copy
/mnt/images/pxeboot/vmlinuz into /tftpboot/'os-name'/vmlinuz
/mnt/images/pxeboot/initrd.img into /tfpboot/'os-name'/initrd.img
Step 4)create default file under pxelinux.cfg
/var/lib/tftpboot/pxelinux.cfg/default
time 1
default 1
title 'os-name'
kernel 'os-name'/vmlinuz
append initrd='os-name'/initrd.img ks=http://NFS-SERVER-IP/ks/ks.cfg ksdevice=eth0
Reference : http://practical-tech.blogspot.in/2011/10/how-to-configure-pxe-server-in-rhel-6.html
NFS Kick Start Installation Common Error Message
OR
Unable to download the kick start file. Please modify the kick start parameter below or press cancel to proceed as an interactive installation.
Solution: Kindly Confirm whether we export the correct Kick start file through NFS method.
Ks=nfs:<SEERVER-IP>:/path.ks.cfg
Error 2)NFS Directory Could not be mounted from the server.
Solution: 1)From the master NFS server it should export
/export/'os-name/
to access the file /export/'os-name'/images/install.img file
it should export with option : rw,no_root_squash
then only client should able to download package /images/install.img file from the server
1)key --skip [ Skip the Installation Key Number ]
2)Install The Package
@Package_Name [ Install the Group of Package ]
Package_Name [ Install the rpm Package ]
-Package_Name [ Don't Install the Pacakge]
3)Kick start Post & Pre Installation Command.
%post
Run the Post Installation Command
%end
%pre
Run the Pre Installation Command
%end
0 Comments