Mount Bind

The mount command in Linux is used to attach a file system to a certain device. One of the least used features within mount is called bind. With bind, you can mount a certain directory to another directory within the file system. The result is, the files are accessible from both directories. This feature is particularly helpful when sharing files. I use it to map the home directory of a FTP user to the home directory of the web server. In this particular example, I’m using a FTP user called ‘ftpuser’ and mapping the drive to ‘/var/www,’ which is Apache’s home directory.

Mount Bind Command

mount --bind /var/www /home/ftpuser

Make It Permanent

To make this mount permanent, you need to add it to /etc/fstab.

/var/www /home/ftpuser bind defaults,bind 0 0

Fix Virtualbox After Kernel Upgrade

Ubuntu 11.04 recently upgraded to Linux kernel 2.6.38-11. Unfortunately, every new Linux kernel introduced on your system will break your Virtualbox setup. This article will show you how to fix Virtualbox with a new kernel. The error will appear if you try to launch a Virtual Machine. You will most likely get the following errors:

As detailed in the error box, you will need to run vboxdrv setup to fix the problem. All you need to do is open up the Terminal and type this command:

$ sudo /etc/init.d/vboxdrv setup

As displayed in the Terminal, the vboxdrv setup will stop the current Virtualbox kernel module, uninstall it, register a new kernel module, and finally start it. This completes the Virtualbox upgrade that’s necessary after each Linux kernel upgrade.

So, in the future, if your Ubuntu distro upgrades to a newer Linux kernel, you know exactly what to do to make your Virtualbox work with the latest kernel.

Re-Install Virtualbox VMs

I recently had to re-install my Ubuntu desktop due to issues with pulling back from using Gnome 3. I was getting dependencies errors was when I tried to run “apt-get” from the Terminal. I tried fixing it for half an hour, but I decided to go for a clean install instead to avoid wasting anymore time. Anyways, I have 5 virtual machines that I wanted to save and re-install on a new clean install of Ubuntu. Here are the steps that I took to backup and re-install Virtualbox VMs on a new clean machine.

  1. Back up the “Virtualbox VMs” folder to a USB drive.
  2. Re-install Ubuntu on the same machine or on another.
  3. After the clean install, copy back “Virtualbox VMs” folder to user home.
  4. Then, install Virtualbox.
  5. Start Virtualbox.
  6. Add VMs by invoking Machine > Add.
  7. Point it to corresponding .vdi file.
  8. Repeat until all VMs are re-installed.
  9. Run the VM to validate if successful.
Pretty simple.

Ubuntu 11.10 New Features

Softpedia just ran an article listing the Top 10 Features of Ubuntu 11.10. Ubuntu 11.10 code name is Oneiric Ocelot. The new features are: a new login screen, improvements to the Unity Desktop, Deja Dup backup utility, Mozilla Thunderbird 7, Firefox 7, new Alt-Tab utility, Libre Office 3.4, Nautilus 3, and a redesigned Ubuntu Software Center. View the article and screenshots here.

Linux is 20 Years Old Today

I can’t believe Linux has been around for 20 years. And it started out as a hobby, and it grew into what it is today. It’s quite an amazing transformation of something that’s being offered for free. You can read more about the history of Linux from Ars Technica’s article entitled March of the Penguin: Ars looks back at 20 years of Linux. Here’s the original message from Linus Torvalds when he posted his first message about Linux to the minix newsgroup back in August 25, 1991. The archive is courtesy of Carnegie Mellon.

From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
Newsgroups: comp.os.minix
Subject: What would you like to see most in minix?
Summary: small poll for my new operating system
Date: 25 Aug 91 20:57:08 GMT
Organization: University of Helsinki

Hello everybody out there using minix –

I’m doing a (free) operating system (just a hobby, won’t be big and
professional like gnu) for 386(486) AT clones. This has been brewing
since april, and is starting to get ready. I’d like any feedback on
things people like/dislike in minix, as my OS resembles it somewhat
(same physical layout of the file-system (due to practical reasons)
among other things).

I’ve currently ported bash(1.08) and gcc(1.40), and things seem to work.
This implies that I’ll get something practical within a few months, and
I’d like to know what features most people would want. Any suggestions
are welcome, but I won’t promise I’ll implement them šŸ™‚

Linus (

PS. Yes – it’s free of any minix code, and it has a multi-threaded fs.
It is NOT protable (uses 386 task switching etc), and it probably never
will support anything other than AT-harddisks, as that’s all I have :-(.

Setup The Canon MX330 Printer in Ubuntu

It seems like every time I reinstall Ubuntu, I also have to reconfigure my personal Canon MX330 printer. I admit it’s not a straightforward install. It usually involves a few Google searches to look for the drivers as well as performing a few manual commands on the Terminal.

So, I decided to document the Canon MX330 printer setup in Ubuntu for future reference.


To get started, first, we need to download the Canon MX330 drivers directly from Canon’s website. Select “Support and Services” from the menu, andĀ  then select “Driver Downloads.” You’ll need to choose the appropriate tarball for your distro. For Ubuntu, you need the “Debian” tarball.


Download and extract the files to your local directory. Access the extracted directory and go to the “cnijfilter-mx330series-3.10-1-i386-deb/packages” directory.


Now, type the following commands on the Terminal:

sudo dpkg -i --force-architecture cnijfilter-common_3.00-1_i386.deb
sudo dpkg -i --force-architecture cnijfilter-mx330series_3.10-1_i386.deb

Add Printer

Go to System->Administrtion->Printing, then select New->Printer. The Canon MX330 should be on a list of available printers. Select it and send a short print test. Simple. That’s it.

Change Gnome Keyring Password

If you are like me, you probably just changed your Ubuntu password. Everything worked fine, but the problem is, every once in a whileĀ  you’llĀ  get an annoying message to enter your Gnome keyring password, which is still set to your old password. To fix this issue, you will need to delete the default keyring. You can do so using the following command from the Ubuntu Terminal.

rm ~/.gnome2/keyrings/default.keyring

The command above will delete your keyring password. You will be asked to set a new gnome keyring password the next time you visit a site or need to authorize something. You can then set your new keyring password to match your current Linux password.

If you want to disable the keyring password altogether, you can do so by reading this article by noob2geek.

Linux 3.0 Faster Than Linux 2.6

Linus Torvalds wrote:

Well, so far I haven’t really seen any suggestions on how to improve
it much further.

3.0 will still be noticeably faster than 2.6.39 due to the other
changes made (ie the read-ahead), so yes, the regression itself is

But performance on that particular benchmark with that particular
machine is clearly not optimal, in that there are known setups that
would be faster still.

Of course, the reason for the mutex conversion was _other_ loads,
where the spinlocks had bad behavior. So it’s a balancing act. And I
suspect we’ve reached a reasonable point in that balancing, yes.


Here’s the original thread.

Bind: Resolve Hostnames Only

Four years ago, I wrote a tutorial on how to install DNS on your Ubuntu desktop. The tutorial still works and is valid to this day. I recently referred to that article when I installed DNS on a machine running on Ubuntu server. While going through the DNS configuration, I couln’t get the DNS to resolve to hostnames only. It’s working with a fully qualified domain name (FQDN), but not the hostname. So, here’s the simple fix to get the DNS to resolve to hostnames.

The Test

ping serverĀ  # pinging the hostname doesn't work
ping: unknown host server
ping  # pinging the FQDN works
PING ( 56(84) bytes of data

The Fix

Edit /etc/resolve.conf and add this to the top of the file.


Restart Bind

sudo /etc/init.d/bind9 restart


ping serverĀ Ā # now the hostname works

Apple Should Keep The Finder

I happen to like the Finder application on the MacOS. I use it a lot. There are rumors around Apple that they might drop the Finder application in exchange for an OS that is more intuitive. Working with file managers can be a daunting task, but it’s not that difficult. I can’t imagine an OS without a file manager. Every OS has their own version of a file manager. Windows has Explorer, Linux has Gnome’s Nautilus, and Ā the Mac has the Finder. So, Apple better not drop the Finder because it’s not intuitive enough, unless Apple has a better alternative for navigating the file system.