0% found this document useful (0 votes)
135 views

Kickstart Using Pxeboot and NFS: Server Side

This document describes how to set up a server to perform remote installations of RHEL using PXE and either NFS or HTTP. The key steps are: 1) Configure the server's DHCP and TFTP services to provide PXE boot files to clients. 2) Copy the RHEL installation files to the server and configure NFS or HTTP to serve them. 3) Create a kickstart file to automate client installations and make it available via NFS or HTTP. 4) Configure the client system to PXE boot and install RHEL automatically using the kickstart file.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views

Kickstart Using Pxeboot and NFS: Server Side

This document describes how to set up a server to perform remote installations of RHEL using PXE and either NFS or HTTP. The key steps are: 1) Configure the server's DHCP and TFTP services to provide PXE boot files to clients. 2) Copy the RHEL installation files to the server and configure NFS or HTTP to serve them. 3) Create a kickstart file to automate client installations and make it available via NFS or HTTP. 4) Configure the client system to PXE boot and install RHEL automatically using the kickstart file.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Kickstart Using PXEboot and NFS

Server Side:

Copying RHEL DVD (creating dump):

cd /home
mkdir RHELdump
cp –fr /media/ RHEL DVD/ /home/RHELdump/

Configuring DHCP:

1. vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=ServerMACAddress
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes
2. yum install dhcp*
3. cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
4. vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
host cutslinuxserver02 {
hardware Ethernet ClientHWaddr;
fixed-address 192.168.1.15;
next-server 192.168.1.2;
filename “linux-install/pxelinux.0”;
}
}
5. service dhcpd restart

Configuring NFS:

1. vi /etc/exports
/home/RHELdump 192.168.1.15(ro,sync)
2. exportfs –a
3. showmount –e
Output should be as follows:
Export list
/home/RHELdump 192.168.1.15
4. service portmap start
5. service nfs start
6. service iptables stop

Configuring PXE files:

1. yum install tftp*


2. cd /tftpboot/linux-install
3. mkdir RHEL5Server
4. cp /media/images/pxeboot/vmlinux /tftpboot/linux-install/RHEL5Server/
5. cp /media/images/pxeboot/initrd.img /tftpboot/linux-install/RHEL5Server/
6. The following file will be there by default after installing tftp but create one if not
present.
mkdir /tftpboot/linux-install/pxelinux.cfg
7. cd pxelinux.cfg
8. Create a file with a name containing the MAC address of the client separated by
hyphen and add 01 to it in the front. Example is as follows:
vi 01-00-02-b3-b9-f0-dc
default local

label local
kernel RHEL5Server/vmlinuz
append initrd=RHEL5Server/initrd.img
ks=nfs:192.168.1.2:/home/RHELdump/ks.cfg
prompt 1
timeout 100
9. Assign file permission as follows:
chmod 777 01-00-02-b3-b9-f0-dc
10. chkconfig --list | grep ftp
11. chkconfig tftp on

Configuring Kickstart file:

1. cp /root/anaconda-ks.cfg /home/RHELdump/ks.cfg
2. chmod 777 ks.cfg
3. Edit ks.cfg file as per your needs. Remember to include install method
nfs --server = 192.168.1.2 --dir=/home/RHELdump

Client Side:

1. Enter BIOS setting of the Client system using F2.


2. Change first boot device to either PXEboot or NIC (Ethernet card)
Kickstart Using PXEboot and HTTP

Server Side:

Copying RHEL DVD (creating dump):

cd /home
mkdir RHELdump
cp –fr /media/ RHEL DVD/ /home/RHELdump/

Configuring DHCP:

1. vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=ServerMACAddress
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes
2. yum install dhcp*
3. cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
4. vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
host cutslinuxserver02 {
hardware Ethernet ClientHWaddr;
fixed-address 192.168.1.15;
next-server 192.168.1.2;
filename “linux-install/pxelinux.0”;
}
}
5. service dhcpd restart

Configuring Kickstart file:

1. cp /root/anaconda-ks.cfg /var/www/html/ks.cfg
2. chmod 777 ks.cfg
3. Edit ks.cfg file as per your needs. Remember to include install method
url --url=http://192.168.1.2/RHELdump

Configuring HTTP:
1. yum install http*
2. Create soft link RHELdump
ln –s /home/RHELdump /var/www/html
3. service httpd start

Configuring PXE files:

1. yum install tftp*


2. cd /tftpboot/linux-install
3. mkdir RHEL5Server
4. cp /media/images/pxeboot/vmlinux /tftpboot/linux-install/RHEL5Server/
5. cp /media/images/pxeboot/initrd.img /tftpboot/linux-install/RHEL5Server/
6. The following file will be there by default after installing tftp but create one if not
present.
mkdir /tftpboot/linux-install/pxelinux.cfg
7. cd pxelinux.cfg
8. Create a file with a name containing the MAC address of the client separated by
hyphen and add 01 to it in the front. Example is as follows:
vi 01-00-02-b3-b9-f0-dc
default local

label local
kernel RHEL5Server/vmlinuz
append initrd=RHEL5Server/initrd.img ks=http://192.168.1.2/RHELdump
prompt 1
timeout 100
9. Assign file permission as follows:
chmod 777 01-00-02-b3-b9-f0-dc
10. chkconfig --list | grep ftp
11. chkconfig tftp on
12. service iptables stop

Client Side:

1. Enter BIOS setting of the Client system using F2.


2. Change first boot device to either PXEboot or NIC (Ethernet card)

You might also like