Ubuntu 10.10 Guest in VirtualBox Shared Folders Issues.

Posted: November 29th, 2010 | Author: | Filed under: Ubuntu, Virtual Box | Tags: , , , , , , , , , , , , | No Comments »

I have recently installed Ubuntu 10.10 as a VM to check out the Android SDK. After the basic install, I find the Shared Folder feature doesn’t work, even though I have installed the Guest Additions. I keep get the following error: /sbin/mount.vboxsf: mounting failed with the error: No such Device

I checked and under /sys/modules/ there is no vboxsf module, so obviously something in the VBoxLinuxAdditions-amd64.run script is not working.

After digging around I was told the simple way is to install the Guest Additions OSE version from apt-get. However since I am using the Closed Source edition (differences between versions can be found here). I thought there must be a better solution.

What happened is VBoxLinuxAdditions-amd64.run doesn’t do a sanity check for the existence of 3 components that Ubuntu needs to compile the modules, namely dkms, build-essential and linux-headers-generic. It requires a different set of packages for other Linux distributions. To solve the problem, run sudo apt-get install dkms build-essential linux-headers-generic. Then run VBoxLinuxAdditions-amd64.run, the modules will be compiled. Do a reboot to make sure the modules are loaded.

Once reboot, when you do lsmod | grep vbox. You should have something like this:

vboxvideo               1956  2
drm                   206161  3 vboxvideo
vboxsf                 34612  0
vboxguest             176030  9 vboxsf

To mount the folder (example):

  1. Create the Shared Folder on the Guest Window toolbar. For me I created a Folder Name with the name vb.
  2. In Ubuntu create the directory /mnt/vb
  3. Then run sudo mount -t vboxsf vb /mnt/tmp

Remember the files will not have the user’s ownership, so it is a good idea to cp the files into another folder, then do a chown user * to correct the ownership. The files will belong to root and root ownership group.
For more information : This post on VirtualBox forum

Some notes on submitting code to Drupal.org

Posted: May 27th, 2010 | Author: | Filed under: Drupal | Tags: , , , , , , , | No Comments »

The web browsers have improved by leaps and bounds. However it is still a pain for academics to communicate and present their formulas and graphs. Good thing there are now Javascript solutions like MathJAX and JSXGraph to bridge the gap (not to mention relatively cheap bandwidth). However there aren’t that many off the shelf plugins/modules that integrates easily to CMS systems like Drupal.

Recently I helped a friend create a Drupal plugin for JSXGraph. Since all the code is GNU. I applied for CVS access at Drupal.org. Here are some notes:
The code itself:
Formatting: Tab is 2 spaces. Give the Coding Standard document a quick read through.
3rd party code: In my case, the JSXGraph core files are not created by me, so they are not allowed into the drupal.org repository.

    Apply for CVS access:

  1. Have your source code production ready and have them in a zip file.
  2. Make an account on drupal.org.
  3. Apply for CVS access here. Once approved, it is attached to your drupal.org account.
  4. Attached the zip file into the review queue, and set the status tag to “need review”
  5. Patiently wait for volunteers to review your code and suggest changes

    Configure your client for CVS:

  1. I use TortoiseCVS under //s and Windows.
  2. Install Tortoise and create a local directory for CVS files (non zipped) to reside.
  3. Once your code has been reviewed, your Drupal account will be CVS enabled.
  4. Right click on the directory in Step 2 and select Check Out, paste in the CVSROOT information. You will check out all the directories in contribution/modules directory.
  5. Alternatively, I find it easier just to do a cvs checkout -l contributions/modules
  6. Once you have checked out the modules directory, you can create your own.
  7. For more information refer to here.
  8. Move your source files via Explorer into the directory you set Tortoise to in step 2.
  9. You can then Add and Commit the files and files will be added to the CVS!.

    Project Page

  1. Create your project page.
  2. Create a new release node BEFORE you create a new release, if not it will give you some weird errors like ‘The Patch-level must be “x” for snapshot release from a branch (or HEAD)’, even when you got everything right.
  3. Click on “Add New Release” at the Project page.

    Advantages of submitting your code to Drupal.org:

  1. Users of your module will able get to get the latest plugins on their Drupal installations automatically.
  2. You can use drupal.org to handle all feature requests and bug fixes.
  3. It is good to contribute to the greater good of the world.