Friday, 24 December 2010

SpiderOak Backup

I have been using SpiderOak for my offline back up solution for some time now. The main advantage I have found is that you don't need a separate folder like in Dropbox and the synchronisation feature works really well. So I currently have three computers all sync'ing wonderfully with each other. Anyway, there is now a referral programme and so I thought I would take advantage. If you use this link you get the standard 2GB + another 1GB free for life.

Download SpiderOak Backup and get extra 1GB free

Wednesday, 21 April 2010

Mounting virtualbox shares in a linux (Ubuntu) guest

Mounting VirtualBox shares in a Linux guest is not as straight forward as for a Windows guest. I have only tried this on a Ubuntu guest but I see no reason why it wouldn't work in other flavours.

Some pre-requisites:
  1. Make sure the VirtualBox guest additions have been installed. There are plenty of guides about this
  2. When you create your shared directories DO NOT accept the default name. Use a prefix. For example HostDocuments for the host Documents folders instead of Documents.
    The reason for this is if you use the default name a protocol error will be reported when you mount the shared dir. I don't know why but this small work around fixes the issue
  3. Make sure the vboxvfs module is loaded by adding vboxvfs to the end of /etc/modules

    sudo sh -c 'echo "vboxvfs" | cat >>/etc/modules'
Now we need to allow mounting of vbox shares by normal users.

  1. sudo select-editor and make sure nano is selected. This is a much nicer editor than vi
  2. Now edit the sudoer file using sudo visudo.

    Add the line: %plugdev ALL=(ALL)NOPASSWD:/sbin/mount.vboxsf
    It may be that the group plugdev is a Ubuntu only group. Choose a group that all users belong to. Or create a 'users' group and add the users to it
  3. Create a mounting script in /usr/local/bin.

    sudo nano /usr/local/bin/mountVboxShares

    Paste the following code, but replace the variables at the top and add sections as appropriate.




    if [ ! -d "$PROJECTDIR" ]; then
    mkdir "$PROJECTDIR"
    /usr/bin/sudo mount.vboxsf -o uid=`id -r -u`,gid=`id -r -u` "$PROJECTSHARE" "$PROJECTDIR"

    if [ ! -d "$DOCSDIR" ]; then
    mkdir "$DOCSDIR"
    /usr/bin/sudo mount.vboxsf -o uid=`id -r -u`,gid=`id -r -u` "$DOCSSHARE" "$DOCSDIR"

  4. Allow everyone to execute this script sudo chmod 755 /usr/local/bin/mountVboxShares
  5. Finally add the mount script to the end of the system wide profile script sudo sh -c 'echo "/usr/local/bin/mountVboxShares" | cat >>/etc/profile'

Monday, 1 March 2010

Converting Joomla sites from 1.0 to 1.5 cheatsheet

Some useful links for Joomla 1.5 component development:

Monday, 8 February 2010

Ubutnu ext3 to ext4 upgrade - won't mount filesystem!

I have just had a little heart stop moment.

I followed the Ubuntu wiki instructions on migrating from ext3 to ext4. After the tune2fs bit I rebooted as instructed and the system could not mount the new filesystem. Errors about bad superblocks and bad group descriptors, but nothing being done about them. fsck did not run correctly and I was left with an un-mountable drive, so I could even mount as ext3. Ahhhh....

Fortunately I have a live CD install of 9.10 on USB from which I could boot and run a fsck.ext4 on my partition.

So my suggestion is that before migrating from ext3 to ext4 do two things:
  1. BACKUP all your data
  2. Do the migration from a live CD / USB. The advantage of this is that you save on all the reboots too.