Install the goIbibo app on your mobile from
Use the Promo Code 5CD1132
Get 1000 Rs. as the account balance for future bookings with GoIbibo.


Ubuntu has already an application called Startup Disk Creator, but this can only be used to make Linux bootable USB drives. To make a Windows bootable USB there is an application called WinUSB but it hasn’t been updated for a while.

The following guide works on any Linux distribution as long as it has GRUB and GParted installed and can make bootable USB for any Windows version newer than Vista (including Vista too).

Choose whatever method is suitable for your computer (either MBR for BIOS or GPT for UEFI – do NOT follow both tutorials as you’ll get a non-bootable USB). Note that the drive made for UEFI will not boot on BIOS computers.


This is intended for older PCs that use BIOS. The USB can also be used on UEFI computers in CSM boot mode. A msdos partition scheme and a bootloader will be required.

1. Format USB

This is the first step. Although it can be done from Terminal, GParted has a nice GUI and it is easy to use for this. So, plug in your USB and start GParted (root permissions required). Select the USB drive and unmount it, otherwise you won’t be able to format it.

GParted main window. The first thing to do is select the USB drive.
Right-click the USB drive partition and select Unmount

You must re-create the partition table by going to the Device menu then select Create Partition Table. Choose msdos and click Apply. Note that it may work with a simple formatting without rewriting partition table.

The Partition Table dialog.

Right click the unallocated space and select New. Make a primary NTFS partition and give it a label too. Remember the label as you will need it later.

New Partition dialog.

Apply all pending operation from Edit menu – Apply all operations or click the button on the main window. Right click the partition and add the boot flag by selecting Manage Flags and tick the checkbox next to boot.

The Apply button from the main window of GParted

When installing bootloader, a partition UUID must be specified. So, right-click the partition again and select Information. Write down that UUID as you will need it later.

The Information dialog showing UUID

2. Copy Windows files

Quit GParted and use the file manager to copy all files from Windows ISO to USB stick. Mount the ISO using Open withDisk Image Mounter (if you use Nautilus as a file manager). Then select all files Ctrl+A and Copy to USB drive which will be automatically mounted when you click on it at /media/<username>/<drive_label>. After the copy process is finished, look in the USB root folder for the boot directory. If it is uppercase, rename it to lowercase.

3. Make it bootable

GRUB will be used for that. Open a Terminal and run:

sudo grub-install --target=i386-pc --boot-directory="/media/<username>/<drive_label>/boot" /dev/sdX


  • /media/<username>/<drive_label> with the path where USB drive is mounted
  • /dev/sdX with the USB drive, not the partition (e.g. /dev/sdb)
Wait for it to finish. If everything is OK, you should see:
Installing for i386-pc platform.
Installation finished. No error reported.
If you got this error:

grub-install: error: /usr/lib/grub/i386-pc/ doesn't exist. Please specify --target or --directory.

Install the grub-pc-bin package with sudo apt-get install grub-pc-bin and try again.

Now, create a text file and write the following in it:


menuentry "Start Windows Installation" {
 insmod ntfs
 search --no-floppy --fs-uuid <drive_UUID> --set root 
 chainloader +1 

menuentry "Boot from the first hard drive" {
 insmod ntfs
 insmod part_msdos
 set root=(hd1)
 chainloader +1

Replace <drive_UUID> with the UUID from step 1.  Save the file as grub.cfg and put it on the USB drive in the boot/grub folder.

That’s it. The USB drive is now bootable from BIOS (not UEFI) and can be used to install Windows on your PC. The first time you boot from it select Start Windows Installation. Tested with Windows Vista, but it should work with any newer version.


UEFI boots from GPT schemed drives. No bootloader is required because EFI firmware can read FAT32 partition contents by itself. It looks for a specific firmware and if it founds it then loads it into RAM. Without a MBR bootloader the USB will not be bootable for BIOS computers. Only 64 bit versions of Windows 7 and newer are supported according to

1. Format USB

Plug in the USB drive and launch GParted. Unmount the drive as shown above. Create a GPT partition table by selecting from Device menu Create Partition Table option. Choose gpt and apply.

The Partition Table dialog

Now right-click the unallocated space and create a new partition. It must be primary and formatted as FAT32. Give it a label too.

New Partition dialog

Don’t forget to apply all pending operations Ctrl+Enter.

2. Copy Windows files

Quit GParted and use the file manager to copy all files from Windows ISO to USB stick. Mount the ISO using Open with – Disk Image Mounter (if you use Nautilus as a file manager). Then select all files Ctrl+A and Copy to USB drive which will be automatically mounted when you click on it at /media/<username>/<drive_label>. After the copy process is finished, look in the USB root folder for the efi/boot directory. If there’s a bootx64.efi file there skip to step 3.

If the OS you are making a bootable USB for is Windows 7, browse the efi/microsoft folder and copy the entire boot folder from this path one level up in the efi folder. Merge folders if boot already exists.

Here is what to do if you don’t have the bootx64.efi file in efi/boot folder. Browse into the mounted Windows ISO image into the sources folder. Open install.wim with your archive manager (you will need 7z installed). Go to the path ./1/Windows/Boot/EFI and extract the file bootmgfw.efi anywhere you want. Rename it to bootx64.efi and put it on the USB drive, in the efi/boot folder. If you can’t find bootmgfw.efi in install.wim then you probably have a 32 bit Windows ISO or other types of images (recovery disks, upgrade versions).

Some UEFI firmwares are able to boot from NTFS and/or MBR partitions too as long as the bootx64.efi file exists at the right locations.

3. Make it bootable

It should be bootable. You can boot from USB now. The Windows-only utility Rufus does exactly the same thing when UEFI/GPT mode is selected.

Unless you can’t, do the following.

Launch GParted again and select your USB drive. Right-click the partition and assign it the boot flag (esp will get checked too). Note that msftdata will get unchecked. This boot flag makes the USB drive act as an ESP (EFI System Partition) so the first thing you’ll notice is that your OS (both Linux and Windows) is no longer auto mounting it. Do not boot your Linux OS with that USB plugged in (it may get automatically mounted at /boot/efi or something like that and it may interfere with the bootloader from HDD). To get back the USB drive, plug it in with the PC on, open GParted and check back msftdata.

If this didn’t work too, start over again but this time apply the msdos partition table instead of gpt. There will be no msftdata flag this time and boot flag has a totally different meaning.

The solution
  1. Go to and login to your router. If you’ve never done this, look for instructions that came with your router or do a google search to find the default username and password.
  2. Find a page that has QoS settings. For the E1200, you need to click on “Applications & Gaming” and select the “QoS” sub-menu.
  3. Disable WMM Support.
  4. Click save.

Recently I tried to build a cluster out of my Laptop and Desktop using Ubuntu. Following is the step by step guideline on how to do same.

My PC is running Ubuntu 14.04 i386 and My Laptop is running Ubuntu x86_64 version. So yes, you can build a cluster successfully out of two different systems.
Both the systems should be on the same subnet.
In this case, IP address of my Laptop :
IP of my PC :

password-less ssh login for both the systems
Followed the tutorial from…

apt-get install following packages on both the systems:

and other basic developer tools such as gcc etc. which we normally need for development.
In my case openmpi libraries got installed to
So I added the following to my .bashrc file:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/openmpi/lib/

Now your system is ready.
Lets test it now.
Open a editor of your choice (I prefer vim) and type the following program:
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
int main ( int argc, char **argv )

int rank, size;
MPI_Init ( &argc, &argv );
MPI_Comm_rank ( MPI_COMM_WORLD, &rank );
MPI_Comm_size ( MPI_COMM_WORLD, &size );
printf ( “Hi, I am %d of %d\n”, rank, size );
system ( “hostname” );
MPI_Finalize ();
exit ( EXIT_SUCCESS );

Save the program as hello.c in your home directory.
Now compile the above program as
mpicc -o hello hello.c

mpicc is nothing but a fancy wrapper of gcc.
repeat the above steps for another system also.

Create a file named hosts.txt (it can be any name) on either of the machine with the following contents.

You can replace above ip addresses with the ones you have for your nodes.
Now lets run it as follows:
mpirun -np 4 -hostfile hosts.txt ~/hello

You will see 4 outputs most probably two from either of the systems.
Hi, I am 0 of 4
Hi, I am 1 of 4
Hi, I am 2 of 4
Hi, I am 3 of 4

The order may get shuffled depending on the scheduling of the processes on both systems and which system return the output first.
But yes, it did not serve my purpose as I will have to search for now MPI enabled equivalents of the application I am using but yes, its a start.
Welcome to the world of Supercomputing.

Here is a link to Quora Post where I posted this in original.

With Ubuntu 14.04, by default there are no options to modify the brightness of the system. However there is an app for same called brightness controller. But I had problems setting up the brightness for the boot time itself. So I decided to find out how did the Brightness Controller work. I downloaded the source code from the git page and found out that internally it uses the Xrandr . So I added the Xrandr command to my bashrc file and now I don’t have to set the brightness every time.
jkapil@jkapil-desktop:~$ xrandr
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 32767 x 32767
VGA1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1366x768       60.0*+
1024x768       75.1     70.1     60.0
800x600        72.2     75.0     60.3
640x480        75.0     72.8     60.0
720x400        70.1
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

This gives you the output names associated with your display. In my case its VGA1. To set the brightness,

$xrandr --output VGA1 --brightness 0.7

–brightness value is in between 0 and 1 and is a fraction. First execute in terminal to find out the brightness value soothing to your eye and then put that value with the above command in your .bashrc file in home directory.

This is that time of the year when Namma Bengaluru gets their running shoes out of the closet and start practicing everyday for the Bengaluru’s most awaiting run of the year, TCS world 10K run.  This year its happening on 18th of May and the city is filled up with enthusiasm. I have many of my friends participating in this run. While i won’t be running this time as I will not be in city but I will certainly miss the zeal of the event. Other than open 10K, there is world 10K, mazza run, corporate champion, senior citizen run and champion with disability for the differently able people.

Here is the link to  the event’s official website. All the best to all the runners. Run for a cause, run for your health or just simply run and experience the euphoria of the Namma Bengaluru run.

Today I casted my vote for the first time. Today 5th stage of the Lok sabha election 2014 is going on as I write this post in 120 constituencies across 12 states of India. This time, most of the people are confused whether to vote for a corruption free government AKA Aam Aadmi Party or Development Oriented ruler AKA Narendra Modi (I won’t say BJP 🙂 ). Though whoever wins, but this election looks to be a forward progress towards building a strong nation. If Modi becomes PM and fulfills the expectation he has set by now, its all good otherwise the AAP is another alternative of which I am sure people are going to throne in state elections. But this time it seems to be a clear fight between two good alternatives and selection of either is going to help the country in one way or other. This election is also seeing a good rise in percentage of people casting their votes to select their leader rather than cribbing about the political parties after elections.
I would say if you have to cast your votes, choose either of these parties rather than wasting your vote on some regional party. Make this election bipartite and let the all other Mulayams and Ammas know that the country needs broader issues to be addressed than the local dirty vote bank politics.
Vote For Your Own Government, Vote For India.

Suddenly the entire web world is full of the openssl vulnerability news “The heartbleed Bug”. This bug has introduced a severe vulnerability to all the https users who use openssl for the secure network transmission. The bug exists because of an overflowing buffer using which anyone can request a lot of secure information from the server including the private key using which someone can even impersonate one for the man in the middle attack. This bug was introduced in the openssl version 1.0.1. Openssl has introduced a patched version 1.0.1g. What this means is that almost all of the internet, from big giants to smaller vendors, needs to update their certificates before some bad guy comes and steals the important information from them.
For the interested programmers and also the newbies who reads in their ABC of programming that malloc and free are dangerous but never understood it how, one can go through the code fix changes and can look for themselves how its necessary to understand the semantics of a programming language before doing something serious.