NFS kickstart installation

Installing Linux includes several steps. Installation will take some time depending on the number of packages you have selected. If you installing Linux to a single machine, then it’s no big deal. But if you have to perform installation on several machines, then the process is cumbersome.

So the solution is to have a installation server. We discuss in a previous post the setup steps involves in a NFS , FTP installation server. There you boot from a installation media and select installation method, then installation will start. But still need to go through all the installation steps. So in order to make life easy we can make the installation automated by the use of kickstart installation provided by RHEL/CentOS.

To start with kickstart. Invoke “system-config-kickstart” (shell) OR Applications->System Tools->Kickstart
If don’t have kickstart already installed, get it installed.

  • yum -y install system-config-kickstart

Fill all the necessary fields. Save the changes. Place it some where with in the reach of NFS. Let’s say, /var/ftp/pub/ks.cfg
/var/ftp/pub/ -> should be a exported file system by now.

  • showmount -e hostname -> will list the nfs shares of hostname.

Now you ready to start the installation. Boot the system from the boot DVD/CD. In the boot prompt, type :-

  • boot:linux ks=nfs:

Press Enter.System should get on with the installation.  CHEERS 🙂

NOTE :- IP addresses used here are belong to IPV4 private ranges.Replace it with your’s.

Categories: Linux

RHEL/CentOS FTP Installation

As the first step of creating FTP installation server, create a directory under /var/ftp/pub. Let say CentOS-5.2. Copy all CD/DVD contents to the created directory.

  • mkdir -p /var/ftp/pub/CentOS-5.2

Then locate vsftpd configuration file.

  • vim /etc/vsftpd/vsftpd.conf – There …..

anonymous_enable=YES -> will give anonymous access to vsftp
local_enable=YES -> will allow access to local user’s
xferlog_file=/var/log/vsftpd.log -> will create separate log file for vsftp. Once done save the file.

  • service vsftpd restart -> will restart the vsftd service. vsftpd set up should be OK by now.

Next boot the system from boot CD/DVD. Select the Language , keyboard , installation method. Choose FTP for the installation method. Choose static OR DHCP under TCP/IP configuration.

NOTE :- If you choosing DHCP, you should have DHCP server in place already. I will be discussing steps involved in a DHCP server setup in a separate post. So watch out. 🙂

Under the FTP setup ->
FTP site name: – type the IP address of the server. -> WRONG FORMAT
CentOS/RHEL directory:pub/CentOS-5.2 – give the path relative to the /var/ftp directory
/var/ftp/pub/CentOS-5.2 -> WRONG FORMAT

In the vsftp.conf if you have set -> anonymous_enable=NO
Then in the FTP setup, check the “Use non-anonymous ftp” and provide the authentication information for the user.

If everything went right system should start the installation by now.  🙂

Categories: Linux

RHEL/CentOS NFS installation

To set up NFS installation server, first locate and edit /etc/exports with the preferred NFS path.

  • vim /etc/exports -> put the path. Let say, /var/ftp/pub/CentOS-5.2

NOTE :- For file editing you can use your favorite file editor. In this case I’m using “vim”, which I’m very much comfortable with. In your case it might be some thing else. Can be either nano , emacs OR gedit. If you newbie, then I’m recommending vim for you.

TO GET START WITH VIM, Type “vimtutor” in your shell. The Vim tutor.

Back on NFS again…..

  • exportfs -ua -> will umount all exported file systems
  • exportfs -ra -> will remount all exported file systems
  • showmount -e hostname -> will list all exported file systems in hostname

If iptables ON, nfs probably won’t work. Most probably your nfs ports must be blocked by firewall. First clarify whether the firewall is turned on OR off in you machine.

  • service iptables status – will give the iptables status

If iptables turned on, then get a list of applied iptables rules. To do so,

  • iptables -L | less – will list current iptables rules.

If you see four strings in the below format, probably nfs might work over the firewall for you.

iptables -A INPUT -s 192.x.x.x/24 -p tcp –dport 111 -j ACCEPT
iptables -A INPUT -s 192.x.x.x/24 -p udp –dport 111 -j ACCEPT
iptables -A INPUT -s 192.x.x.x/24 -p tcp –dport 2049 -j ACCEPT
iptables -A INPUT -s 192.x.x.x/24 -p udp –dport 2049 -j ACCEPT
NOTE :- IP addresses used here are belong to IPV4 private ranges. Replace it with yours.

If not we need to allow nfs over iptables. To allow NFS over iptables :-

  • iptables -A INPUT -j ACCEPT

NOTE :- More general rule that will allow all incoming traffic through the firewall. Later I’ll discuss nfs over firewall in much detail in some other post.

  • service iptables save; restorecon -R /etc/sysconfig/* – will save iptables settings and restore selinux context.
  • service iptables restart.

nfs should be OK over iptables by now. Let’s get start the installation.

Start system with the help of the boot CD/DVD. In the boot: prompt, Either you can press enter and go ahead with booting the system, which later prompt for the installation method OR Press F2 and go to options and invoke “linux askmethod”. In each you’ll be asked to select language , keyboard , and installation method. Select “NFS” for installation method.

To Configure TCP/IP, you can use either static IP or DHCP. If you have DCHP server in place use DHCP or use a correct static IP.

NOTE :- you will find DHCP settings in a up coming post.

In NFS setup ->

under the nfs server name : use name OR IP of the NFS server
under the CentOS/RHEL directory : /use/correct/path/

If everything went right system should start the installation. 🙂

Categories: Linux