Wednesday, August 29, 2012

Dual booting Ubuntu 12.04 (32-bit) and CentOS 6.3 (64-bit) for Hadoop

Usually I download Hadoop from Apache (code or binaries) and work on it. But, this time I wanted to give CDH, HDP and MapR a shot, to see what additional features each one of them have and how easy it is to install them. One requirement for all of them is to have a 64-bit OS. The catch is, for now HDP has only rpm packages available and no deb packages. So, one of the option is to install CentOS 64-bit OS. I could have used a VM images from Cloudera/MapR/HortonWorks, but working with the VM images is a pain because the downloads are big and VMs are a bit slow when compared working with OS directly installed on the hardware.

So, I gave CentOS (64-bit) a shot, downloaded it from one of the torrents and installed it along Ubuntu OS. It was smooth with a couple of hiccups.

Here is some of the things to consider while dual booting Ubuntu and CentOS.



- First thing to note is that CentOS uses an old version of GRUB, while Ubuntu uses a relatively new version. So, I choose to install CentOS first and then Ubuntu. This left the NoteBook with the GRUB from Ubuntu.

- After setting the correct time zones and enabling NTP, the clocks were showing an exact difference of 5 1/2 hours between Ubuntu and CentOS. Both the OS were interpreting the motherboard RTC differently, Ubuntu as `UTC=no` and CentOS as `UTC=yes`. I had to change `UTC=yes` in `/etc/default/rcS` on Ubuntu, since the changes in CentOS were not getting reflected in the system clock. Voila - now both Ubuntu and CentOS show the same time.

- To make the click on the touch pad work (on HP 430) `synclient TapButton1=1` had to be run. Not sure if this is a problem with CentOS, or it has to do something with the drivers. Adding it to the startup programs was also not working, had to explicitly run the command from the terminal.

- There were a couple of icons (home, thrash etc) on the CentOS and I like a clean desktop . To remove the permanent icons from the desktop first install `gconf-editor` using `yum install gconf-editor`. Start it (Applications-->System Tools-->Configuration Editor), go to: apps-->nautilus-->desktop and uncheck trash_icon_visible and the relevant options.

- I choose to encrypt the home folder while installing Ubuntu, so the swap was encrypted and I was not able to share it with CentOS. These instructions allowed me to remove the encrypted swap and use the normal one. Later `/etc/fstab` was modified on both the OS to use the same Swap. Using the same swap will break the hibernate functionality because hibernate uses swap to save it's state. One thing to note is for Hibernate to work, the swap should be grater than the RAM on the machine.

- Due to licensing issues some of the multi media codecs are not installed with CentOS. Here are the instructions (1 and 2) to install them.

This might be evident, but what I observed is that CentOS which is based on RedHat is very conservative on getting the newest versions of the different softwares into the release. It's using Firefox 10x, while the current version of Firefox as of this writing is 14.0.1. Firefox might have fixed a couple of bugs and security issues between these two releases, not sure if CentOS has backported them to the release which is defaulted. Also, though I haven't done any performance testing CentOS 6.3 64-bit was more response than Ubuntu 12.04 32-bit on the same machine.

In the follow on blogs, I will write about my experience installing CDH, HDP and MapR.

Happy Hadooping !!!