Friday, June 19, 2009

VirtualBox Kernel driver not installed

After installing the new 2.6.28-13 kernel yesterday, running a virtual machine in VirtualBox aborts with the following error:


As the message says, the VirtualBox Linux kernel driver for the running Linux kernel isn't installed.

To re-setup the kernel module you just need to:

$ sudo /etc/init.d/vboxdrv setup

Thursday, June 11, 2009

Add a new partition to your system

Imagine you buy a new hard drive. Here's a few easy steps to create a partition in that drive, and a mount point, so you can have that partition available to you at boot time.

If you have an easy way to add a new partition in your system, let me know.

I usually use GParted to create the partition.

Add a partition

Just follow the following screenshots to create a partition in GParted. Make sure you choose a Label for your partition. In this example is Storage.


 

Create a mount point to the new partition

Now that you have a new partition created, you need to create a mount point. Basically a mount point maps a partition to a directory.

In this example we will map the partition Storage to the location /media/storage.

  • Find out the UUID (Unique Unit ID) of the device
$ sudo vol_id -u /dev/sdb1
  • Create a folder for your new mount point
$ sudo mkdir /media/storage
  • Open /etc/fstab with gedit (or your favourite editor)
$ sudo gedit /etc/fstab
  • Add the mount point using the UUID you got before, save the file and exit gedit
UUID=ad02cb4e-f9cf-491a-b661-d96ed2c456be /media/storage ext3 relatime 0 2
  • Add permissions to the mount point to youruser
$ sudo chown -R youruser:youruser /media/storage
$ sudo chmod -R 755 /media/storage
  • Reboot and confirm that /media/storage allows you to create your files and folders and has the size of the new partition

Wednesday, June 10, 2009

Filesystem check in your USB external hard drives

Typically, every number of mounts, your partitions are automatically checked (e2fsck) at boot time. This will check and repair your hard drives.

But, if you have external hard drives connected only when needed, this automatic checks aren't performed.

I recommend you to check your hard drive after like 30 mounts. See what is the maximum mount count in your internal system hard drive and use that count as reference.

I will list a number of useful commands to gather information about your drives and to check and repair them.

If you have suggestions, please let me know.

Checking your partitions

Use the command tree to list all your partition and find out witch device you want to check.

  • Install tree
$ sudo apt-get install tree
  • List all drives
$ tree /dev/disk
  • List drives by label (probably more easy)
$ sudo ls -l /dev/disk/by-label

Tuesday, June 9, 2009

Sync any folder outside your Dropbox folder


If you don't know Dropbox, try it. Basically you can sync your files between computers and OS's.

You define in each computer you install Dropbox a "Dropbox folder" (it doesn't need to be the same in every computer) and every file and folder inside the folder will be synced.

Example - Computer A - Linux
/home/youruser/Dropbox/folderA/
/home/youruser/Dropbox/fileA.txt

Example - Computer B - Windows
C:\My Dropbox\folderA\
C:\My Dropbox\fileA.txt
In this examples, the folder folderA and every file and folder inside, and the file fileA.txt, are synced between both computers.

Only the files and folders inside your "Dropbox folder" are synced, but if you create a symbolic link to a file or folder outside the "Dropbox folder" it will also be synced.

Create a symbolic link
$ ln -s '/storage/outsidefolder/fileB.txt' '/home/youruser/Dropbox/insidefolder'
$ ln -s '/storage/outsidefolder/folderB' '/home/youruser/Dropbox/insidefolder'
The fileB.txt and the folderB will be synced into your "Dropbox folder" and synced into the the "Dropbox folder" in Computer B.

Check how to create symbolic links in Windows here.

Problem

If you try this between two similar Linux computers, the files in the second computer will not be created in the same outside folder. It will stay in the "Dropbox folder" of that second computer.

fileB.txt in Computer A: /storage/outsidefolder/fileB.txt

fileB.txt in Computer B: /home/youruser/Dropbox/insidefolder/fileB.txt

If you know a way to do this please let me know by commenting in this post or by sending me an email :-)

Bandwidth


Here's my cable connection bandwith. It's a 8Mb/512Kb connection, so the results aren't bad.


You can check your connection here.


Monday, June 8, 2009

Recovering the update-notifier icon in Ubuntu 9.04

If you have installed Ubuntu 9.04 you probably noticed by now that the update-notifier icon no longer appears when there are new updates available. Instead the Update Manager window opens.

This may be a problem if you don't notice that window and shutdown your system. After that you have to wait for new updates (and notice the Update Manager window that time) or manually look for updates.

To get the update-notifier icon just run the following:

$ gconftool -s --type bool /apps/update-notifier/auto_launch false

Now, restart your system or restart the update-notifier:

$ killall update-notifier
$ update-notifier &
$ disown

If you want to go back to the original state run the following and restart your system ou update-notifier:

$ gconftool -s --type bool /apps/update-notifier/auto_launch true

Monday, June 1, 2009

GNOME Do 0.8.1

It's been almost a year when I last talked about GNOME Do.

GNOME Do is basically a keystroke launcher. This means you can start typing the name of a program or a location and GNOME Do will launch it.

There are also a ton of plugins that allows you to do many other things, like quickly access your bookmarks, run terminal commands, post to twitter, use the calculator, control the sound in your system... Well, your have to see it to believe it.

Install

Add the following to your Software Sources

deb http://ppa.launchpad.net/do-core/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu jaunty main
Install GNOME Do

$ sudo apt-get install gnome-do
It's that easy.

How to use GNOME Do

You can find GNOME Do at Applications > Accessories > GNOME Do.

To use GNOME Do you must summon it pressing Super+Space (the Super key is typically the Windows key).

Then just start typing.

Use the Down key to see the several results from what you typed.

Use the Tab key to see the options you have from the result you chose.

Tips

Check the Preferences and choose your favourite plugins.

There are also several themes, but the Docky one is the most interesting because it gives you a very nice dock.