February 20, 2014

Automatic RHEL 6 Installation with Kickstart


Today the requirement are higher to quicker responds to the market. For a computer operation that means, they must be quicker to bring up new machine. The Red Hat solution for this is to use kickstart to standardize and automate the installation of a new RHEL instances.

The simplest way to create a working kickstart file is to actually install a new system (the way you want) and then use the kickstart created by anaconda to install new machine with.

The more advanced way is to start from scratch and use the system-config-kickstart tool and create you kickstart file. But there are some shortcoming with this tool and that is it can not handle LVM.

The pragmatic way is to start from a anaconda generated kickstart file and then edit with system-config-kickstart and finally manually add the LVM partition.

Here I will show you the easy way and use the anaconda generated file.


Lets get started and install a new RHEL instance the manually way. We will install this machine as a virtualized machine and as hypervisor we will use KVM.

The requirement for this machine are:

  • 8 GB Disk Space
  • Basic Storage Devices
  • Use All Space

We will select the last checkbox 'Review and modify...', so we can see what is actually done.

What we see above is that two primary partitions are created - vda1 and vda2.

  • vda1 will contain standard ext4 file system for boot. The size of 500 MB is good for boot partition and should rarely be changed.
  • vda2 will be formatted with LVM and will fill up the rest of the available disk. This is also good.

The next step is the logical volumes: lv_root and lv_swap.

Note the few partition that are here created. For a server installation you would probably create more partitions, e.g. a separate partition for /var/log directory for a production server and for desktop installation you would probably create a separate partition for /home. But here we will keep to the basic suggested partition layout.

The second thing that is noteworthy is the small swap space. The thumb rule for a minimal installation production server is:

  • < 2GB RAM, use 2 * RAM
  • >= 2GB RAM, use RAM + 2GB

But remember these are not hard rules and dependce how often you will restart you system. For a desktop installation you will get away with smaller swap space.

Finally we will select to install a minimal installation. When installation is finish we will end up with a anaconda generated kickstart file located in /root/anaconda-ks.cfg.

Kickstart file

To make this kickstart file automatic we need to do three things:

  1. Uncomment the LVM partitioning. I also renamed the volume group to vg_rhel6.
  2. Add zerombr, to answer yes to the prompt question that all existing partitions will be destroyed.
  3. And finally automatically restart the system after installation.


The last step is to test it. First we need to make it accessible during installation. The easiest way to do that, is to use either a FTP or HTTP server. There are also other ways, such as using a shared network disk, accessible via NFS or CIFS. But I would recommend using a known FTP server.

Now start a new RHEL installation. At the first menu, press TAB.

Then at the end enter 'ks=ftp://<server>/<path>' and press ENTER.


February 8, 2014

Configure OpenJDK Source Code From Eclipse on RHEL 6


In most Linux distribution is the source code for OpenJDK already available via RPM or Debian Package, but not for RHEL 6. The reason is probably the RHEL 6 main aim is for server OS and not for client development. Anyhow here is the way to make the source code available in Eclipse.


First you need to download the source zip from http://download.java.net/openjdk/jdk7/.

Then move the zip to the java home directory and name it src.zip.

Finally restore SELinux security policy.


If everything works fine, you should now be able to browse the java source code from Eclipse.


If the source code is not directly found, you might need to adjust the java home search path.

If that did not help, you could also verify the path to the source zip.

Finally you might need to restart Eclipse (I did not). Happy coding!

February 4, 2014

Install Flashplayer on RHEL 6


Download the plug-in for Linux 64-bit (tar.gz) from http://get.adobe.com/flashplayer/.


Move the tar file to /tmp and extract it.

Before proceeding close you web browser. Then move the flash player module to Firefox plugin directory.


Start Firefox and test against any youtube video.