Steps for installing Linux over Network with PXE and tftpboot setup – Centos
Steps for installing Linux over Network with PXE and tftpboot setup - Centos
=============================================================================
Scenario
========
To setup a NFS server containing the CentOS4 customized distro and then booting via
a PXE bootrom on the client side to get the required info for installing the OS via
kickstart.
Step 1: DHCP server setup
==========================
- Install the dhcp server rpms
dhcp-devel-3.0.1-12_EL.centos4
dhcp-devel-3.0.1-12_EL.centos4
dhcp-3.0.1-12_EL.centos4
- Create the /etc/dhcpd.conf file. Following is the configuration given below
ddns-update-style none;
ignore client-updates;
allow booting;
allow bootp;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name “example.com”;
option domain-name-servers 192.168.0.1;
option time-offset -18000; # Eastern Standard Time
range dynamic-bootp 192.168.0.127 192.168.0.130;
default-lease-time 21600;
max-lease-time 43200;
class “pxeclients” {
match if substring(option vendor-class-identifier, 0, 9) = “PXEClient”;
next-server 192.168.0.120;
filename “linux-install/pxelinux.0″;
}
}
- chkconfig –level 2345 dhcpd on
- service dhcpd restart
STEP 3: Configure NFS server
============================
- I have copied the base dir of the Distro (ie CD 1 and in the RPM folder all rpms of remaining cd 2,3,4…) to /data dir. I my case i called it
“custom-install” dir
- Edit /etc/exports and add the following line
/data/custom-install *(rw,sync,no_root_squash)
- service nfs restart
- service portmap restart
For Security related purpose edit /etc/hosts.allow and /etc/hosts/deny to limit the
connection to specific ip addresses
STEP 4: Configure TFTP server
==============================
- Install the syslinux, redhat-config-netboot, and tftp-server rpms
- Enable the tftp server in /etc/xinetd.d/tftp and changing the “disable” line from
“yes” to “no.”
- chkconfig –level 345 tftp on
- service xinetd restart
- Next step is to copy the files necessary to start the installation to the tftp
server so they can be found when the client requests them. The tftp server is
usually the same server as the network server exporting the installation tree.
- Type system-config-netboot on the command prompt
- 1st time when u start, select “Network Install” from the First Time Druid
OR
select Configure => Network Installation from the pulldown menu, and then click Add.
Enter the following in the fields:
- Operating system identifier - CentOS4
Provides a unique name using one word to identify the Linux version and variant. It
is used as the directory name in the /tftpboot/linux-install/ directory.
- Description - CentOS4 install
- Select Protocol for installation - NFS
- Kickstart - nfs:192.168.0.120:/data/custom-install/ks.cfg - Path to your kickstart
file
- Server IP address - 192.168.0.120 - Where UR NFS is residing
- Location - /data/custom-install
- After clicking OK, the initrd.img and vmlinuz files necessary to boot the
installation program are transfered from images/pxeboot/ in the provided
installation tree to /tftpboot/linux-install// on the tftp server
= CentOS4 - Given above
- The Directory /tftpboot/linux-install/CentOS4 contains 3 files
initrd.img
vmlinuz
ks.cfg
- Contents of the ks.cfg as as follows
#use NFS installation media
nfs –server 192.168.0.120 –dir /data/custom-install
In this way you can create a Menu for installation of different linux OSes by
specifying a diff and pointing to different dirs.
Using the command line tool to do the above using pxeos
pxeos -a -i “” -p -D 0 -s client.example.com -L
-k -K
Substitue the respective values
STEP 4: Editing the default tftpboot server files
==================================================
Edit the /tftpboot/linux-install/pxelinux.cfg/default file and do the required
changes as show below:
default centos
timeout 100
prompt 1
display msgs/boot.msg
F1 msgs/boot.msg
F2 msgs/general.msg
F3 msgs/expert.msg
F4 msgs/param.msg
F5 msgs/rescue.msg
F7 msgs/snake.msg
label centos
kernel CentOS4/vmlinuz
append initrd=CentOS4/initrd.img ramdisk_size=7000
ks=nfs:192.168.0.120:/data/custom-install/ks.cfg
STEP 5: Editing the main ks.cfg for installation
================================================
In the main ks.cfg of the distro change the install method to NFS
Eg:
In /data/custom-install/ks.cfg
nfs –server 192.168.0.120 –dir /data/custom-install
STEP 6: Checking for the installation
=====================================
Boot the PXE enabled client machine and check if the client get the IP via DHCP and
present a menu for installation
Sorry, the comment form is closed at this time.
-
Recent
- Set Time Zone + Fedora 18
- Fedora 17 + Tata Photon (Huawei)
- Fedora 17: Install OpenSSH Server
- Change the default keyring password
- Error: Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!
- Gnone 3.X adding personal launcher
- Gnome 3.x Change Panel
- KDE remove autostart programs
- GPS on Linux
- Debian Squeeze change root password
- Download YouTube Videos on Linux
- Pidgin + The certificate for omega.contacts.msn.com could not be validated
-
Links
-
Archives
- April 2013 (1)
- September 2012 (2)
- August 2012 (2)
- July 2012 (2)
- November 2011 (1)
- July 2011 (1)
- April 2011 (1)
- January 2011 (1)
- November 2010 (1)
- September 2010 (2)
- July 2010 (3)
- March 2010 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS