How to recover GRUB using Ubuntu Live CD (12.04 LTS)

Sometimes for some reason when you installed Microsoft Windows or other operating systems, your GRUB installation will be overwritten. This will cause your Ubuntu operating system unable to boot.

Here’s how to solve the problem using Ubuntu LTS Live CD:

1. First boot the Ubuntu Live CD from your computer

2. Then, open terminal-emulator application, and add boot-repair application to Ubuntu repository
$ sudo add-apt-repository ppa:yannubuntu/boot-repair

3. Update repository and install boot-repair
$ sudo apt-get update
$ sudo apt-get install -y boot-repair

4. Then run boot repair by typing “boot-repair” at the bash prompt

To begin repairing/reinstalling GRUB, click on “Recommended Repair” at the application screen:
grub boot-repair

The “Advance” button offers other option that lets you customize the boot option.
grub boot-repair

Boot-repair lets you to:
1. Reinstall GRUB bootloader
2. Change the default OS to boot
3. Place boot flag on any partition or devices.
4. Add extra kernel option
5. Restore MBR (only when necessary!)
6. Repair filesystem (only when necessary!)

Official Boot-repair website:

Ubuntu Community Page on Boot-repair:

Solving choppy and distorted sound while playing back video on Ubuntu 12.04 LTS (Precise Pangolin)

Since installing Ubuntu 12.04 LTS on my Core I5 computer, I’ve noticed that I’ve problem with Video/Audio playback on my computer.

It turns out that it only affects computer with Intel-based sound chip. To confirm that you have Intel based audio chip, you need to run this command:

sudo lshw -c multimedia

If Intel chip is present, then you should see something like this at the bottom of the output:
configuration: driver=snd_hda_intel latency=32
resources: irq:16 memory:fe024000-fe027fff


To fix it, you need to add “options snd-had-intel model=generic” at the end of /etc/modprob.d/alsa-base.conf file.

This should fix the problem with choppy/laggy sound while playing video.

Generate EAN,UPC,ISBN barcodes in Ubuntu / Debian Linux

barcode‘ is a utility in Debian GNU/Linux distribution used for generating common 1-D barcode: EAN-13, EAN-8, UPC, ISBN, code93, code128 & codabar.
barcode outputs file in postscript format which can be converted to PDF with the ‘ps2pdf‘ utility


1. Outputs isbn barcode and converts it to PDF file

$  barcode -o -e isbn
$  ps2pdf

2. Outputs EAN-13 barcode

$ barcode -o -e ean

If you are looking for a tool that could generate QR Code, then you can try ‘qrencode

Ubuntu TV Preview & Features

Here are the preview of Ubuntu TV, a line of Ubuntu powered device designed for home consumers.

A class of Smart TV device, Ubuntu TV supports few key features:

  • Youtube Integration
  • Intelligent search
  • Cloud Storage via Ubuntu One
  • Social Networking Integration
  • Tablets / Smartphone dock option
  • Support for 3rd party application and games

Visit Ubuntu TV wiki for more information.

Solving SSH “channel 3: open failed: administratively prohibited” error when tunnelling

A couple of days ago, I’ve encountered this error when I was trying to create a SSH tunnel from my office LAN to a remote server.

After looking for a solution, I found out that the remote SSH server must add “PermitTunnel yes” line in “/etc/ssh/sshd_config” file.

To do that, you need to:

sudo echo "PermitTunnel yes" >> /etc/ssh/sshd_config
service sshd restart

The second line is used to restart the ssh service in order to enable the changes.

How to mount exFAT (used in SDcard / USB Drive) filesystem in Ubuntu

exFAT is a filesystem developed by Microsoft for use in flash drives or portable storage devices where the use of NTFS is not feasible. exFAT is inteded to be supported on consumer devices such as MP3 players, cameras, mobile phones and video recorders.

However filesystem formatted with exFAT are not currently supported by Ubuntu (as of 12.04) out from the box. In order to do that, you need to download exFAT filesystem module from relan PPA.

1. Add exFAT PPA repository

sudo -s
apt-add-repository ppa:relan/exfat

2. Update apt-get repository
apt-get update

3. Install exfat modules
apt-get install fuse-exfat

That’s it you’re done! Then you can finally mounts exFAT filesystem using the following command….

4. mounting exFAT filesystem
mount -t exfat /dev/sdd /media

You should be able to mount exFAT filesystem from now on… the fuse-exfat also comes with ‘exfat-utils‘ package which enables the creation, checking and labelling exFAT filesystem.

iotop: How to monitor processes that hogs hard disk writes

iotop is a small and handy tool to monitor processes that hogs I/O resources. iotop outputs is similar to ‘top’ except it lists the hard disk read/write activity as well as swap writes.

You can use the left and write key to sort the heading according to your preference and the R key can be used to reverse the sort. The ‘O’ key is used when you only wants it to display processes that are currently utilizing the disk I/O. While the ‘P’ key can be used to display accumulated IO disk read/write for all the processes (which can be sorted with the arrow keys).