Sunday 22 February 2009

TomTom Go Live 540 GPS - Review

Following the purchase (and return) of a Navman S80 Deluxe GPS, I plunged for the TomTom Go Live 540, and haven't regretted it since.

Conclusion

GPS - 9/10 - A well engineered device, with good quality accessories. Flexible, adaptable, re-configurable.


There is a different blog entry for the Live services, which can be found here.

Series

The TomTom Go Live series in the UK has the TomTom Go Live 540, Tom Tom Go Live 740 and Tom Tom Go Live 940.

These devices have similar functions, and the main difference is the maps:
  • The 540 covers the UK and Republic Of Ireland
  • The 740 also Includes Europe
  • The 940 also Includes the US and Canada
You can buy add-on maps at a later date, so it is possible to buy the 540 and add the Europe Maps with an online download.

One other difference is the MP3 license. The 540 does not come with an MP3 license, so you can't use it to play music whilst you drive.

Build Quality


The GPS itself is extremely well built, with a slightly rubberised casing, which makes it easy to grip. The large wide screen is extremely clear and easy to see.

The GPS comes with a windscreen mount, which has a screw-fitting to enable / disable the suction cup, making it very easy to fit and remove, and very secure once installed.

The docking station is robust and heavy, and doesn't slide around on the desk when the wind blows the USB cable.

Navigation and Map Accuracy

I have had the GPS since December 2008, and have been extremely happy with the quality and accuracy of the maps, and the navigation method.

When driving, you can use either the 2D or the 3D view. You can configure the screen to show key navigation information, such as time to go, road speed, and guidance for the next junction. Touching different parts of the screen brings up different menus - many of these menus can be moved to your liking, but in the images displayed on this blog:
  • Middle of the screen brings up the main menu.
  • Bottom of the screen brings up the current route navigation meu.
  • Right of the screen brings up the traffic menu.
  • The Arrow icon shown on the screen brings up a configurable quick menu.
  • You can also add a Voice Control icon to the screen (see voice control below).
Planning

Planning a route is extremely easy - you can just hit the screen, and select 'Navigate To'.

Or you can pre-plan a route, which is particularly useful if you are inside and out of GPS reception.


You can then choose to navigate to:
  • Home
  • A Favorite
  • A Point of Interest
  • A Town / Street Name / Postcode
  • Recent Destinations
  • Position on a Map
  • Latitude / Longitude
  • Position of Last Stop
When using the TomTom Services, you can also do an online search, and navigate there.

Voice Clarity

There are two different types of voice you can use on the GPS, Sampled Voices and Computer Generated Voices. If you use the Sampled Voices, you can have characters such as John Cleese telling you to "turn around and place the car in the opposite direction to the way you were previously facing", however, John's voice cannot synthesise all of the road and street names in the country.

Hearing street names means that you don't need to look at the GPS at all to check which turn it actually means - this makes driving with this GPS even safer. When I drive in to work, it will say to me things like "Go around the roundabout, second exit, A1, towards Stevenage".

Technology has got to a stage where it is beginning to be difficult to tell when the voice is computer generated. The two UK English voices (1 Male and 1 Female) are very clear and easy to understand.

Navigation

With the clear screen and the comprehensive voice directions, it makes things very easy to drive, and you rarely have to interact with the GPS itself.

The only real time that you may need to look at the device is to navigate complex junctions, to verify that you are in the correct lane, going the correct direction. For this, the advanced lane guidance comes to your aid. This system presents a large full-screen image of the exit, so all that is needed is a glance.

Map Updates

This is one of the areas where the TomTom comes into its own, up and above the other offerings, such as the Navman S80, reviewed earlier on this blog.

Maps are procured by TomTom from various different map providers around the world. For the UK, the map provider is the same as the one which supplies Google Maps.


I have used the "Report Map Error" feature a number of times, and recently checked on Google, and saw that one of the modifications I had made (identifying a road as being a footpath, and naming it "Old Tram Road") has made it from my GPS to TomTom, to the Map Provider, and to Google within about 6 weeks.

It is highly likely that you are on the road when you spot a map error. It is possible with a quick link on the screen, to bookmark a site which needs correction, and make the correction when you get home. This includes renaming roads, changing road directions, renaming or moving points of interest, and reporting new safety cameras.

Bluetooth and Voice Control

Voice Control

The GPS can be controlled by voice, using the in-built microphone, or through a bluetooth headset, so rather than navigating through the menus to get what you want, all you need to do is hit a microphone icon on the screen, and use one of the many pre-defined commands to directly drive the GPS. The GPS does not need any voice training, it just works, out of the box. There are dozens and dozens of commands, which include:
  • "Calculate Alternative"
  • "Calculate Original"
  • "Avoid Roadblock"
  • "Add Favourite"
  • "Brightness Up"
  • "Call Home"
  • "Map Error"
  • "Minimise Delays"
  • "Navigate to a Postcode"
  • "Navigate to the Nearest Cash Machine"
TomTom Live Services

TMC Cables


I bought a TMC cable with the TomTom - these contain an FM radio aerial, which you drape around your windscreen. In the UK, Classic FM transmits the TMC traffic messages for motorways and major roads.

If you have an active subscription to the TomTom Live Services, this will always override the TMC traffic function. The TomTom Live Service now works in other countries without any additional subscription, so all you need to have are the maps.

There is little need for a TMC cable (it is only useful if you do not have any Live coverage, which is rare). I would recommend buying a TMC cable when you need one (perhaps travelling to a country that supports TMC, but not Live services), not when you buy your Go Live GPS receiver.

The Live Advantage

When I bought my GPS, I intended to use the live services for the free 3 months, and then go on to using the TMC cable, however, the Live Services have a much better reception than TMC, far better coverage, and other useful features, such as an itegrated Google Search for locations. See the Live Blog Entry (comming soon) for more a much more thorough write-up.

External Links

Saturday 21 February 2009

Can't See my FSG3 Shares on Mandriva

Following the installation of Mandriva Linux on my desktop PC, I have been unable to simply access shares on my FSG3 Network Storage box.

I use the browse shares, but the contents of the FSG3 always appear empty. I can mount the share manually, by typing:
smb://media/sharename
But I can't browse all of the shares. On looking at the smb.conf file (which is located on the FSG3 in the /usr/local/samba/lib directory, it is clear that it doesn't actualy have any specified ones (unless you are the administrator).

I have therefore modified the /usr/local/samba/lib/smb.conf file to include a 'HOME' section, as shown below.
[global]
workgroup=LOCAL
netbios name=media
server string=Freecom StorageGateway
security=user
encrypt passwords=Yes
null passwords=Yes
admin users=admin
disable spoolss=Yes
max log size=50
socket options=TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
use mmap=Yes
use sendfile=Yes
lock directory=/ramdisk/samba

[FSG]
comment=Admin access to entire disk
path=/home
writeable=Yes
browseable=No
valid users=admin
create mode=0666
directory mode=0777

[HOME]
comment=Home directories
path=/home
writeable=Yes
browseable=Yes
create mode=0664
directory mode=0775
Following this update, the server is re-started:
/etc/init.d/samba stop
/etc/init.d/samba start
I can now browse to smb://media/home, and see all of the user areas. Note that unix file and directory permissions still apply, and that you have to be logged in as the correct user, and be in the correct group.

Sunday 15 February 2009

Webcam Manipulation with Javascript

I purchased an IcamView web server, and megapixel webcam, which I have waterproofed, and placed in the garden.

The IcamView web server has a low power processor, and is unable to manipulate the images at all. When you use the ActiveX or Java video viewer, the viewer manipulates the image for you (on the client PC).

If you access still frames, you have no such tool, and the frames come straight from the camera, warts and all. The most obvious issue is when images are flipped by the camera, and it expects the software to flip the images back.

I have created a Javascript file (webcam.js), which can post-process images from webcams. It is intended for people who don't know or want to know how to perform any Javascript programming.

Adding the Code in your HTML File

All you need to do is use your favorite web editor, and include the Javascript, a webcam tag, and a normal img tag for backwards comatibility with non-Javascript capable browsers.
<script language="javascript" src="webcam.js"></script>

<webcam src="http://www.trumpton.org.uk/webcam/garden0.jpg"
graceful="yes" errsrc="http://www.trumpton.org.uk/webcam/offline-320x200.jpg" alt="Tomy Cam" showdate="yes" bgc="black" fgc="white" refresh="310" />

<noscript><img class="webcam" src='http://www.trumpton.org.uk/webcam/garden0.jpg' alt="Tomy Cam" /></noscript>
The Code all belongs in the <body> section of the web page.
  • The <script> tag loads the Javascript file.
  • The <webcam> tag is interpreted by the script, and loads / edits the image.
  • The <noscript> tag is ignored by browsers that can process Javascript, and handled by any other ones - the images displayed on these browsers will not be flipped / rotated or labelled.
More Information

More information, including the source code, can be found here.



Thursday 5 February 2009

Linux Kernel Installation with VirtualBox

Following the installation of virtualbox, I have downloaded and built my own Linux kernel and applications from scratch. This blog entry is a step-by-step description of what I've done.

Contents

Build Machine
Development Tools
Ipkg Manager
Directory Structure
bin Directory and Tools
etc/ipk Directory
makefiles Directory
Packages
Downloading
Building Packages
Creating the Filesystem
Building the Kernel
Building Glibc
Building Busybox
Installing Packages
Building Image
Creating CDROM
Making Bootable


Build Machine

The machine used to build is a Packard Bell desktop, with an Intel Quad CPU Q6600 @ 2.40GHz (19200 BogoMIPS total), with 1Gb RAM.

Each of the compile steps below, was performed in sequence, and has an indication of how long it took on my machine. Once you have performed one of the steps, you should gain an understanding of how each step takes (releatively).


Development Tools

A number of development tools are needed to build a software release - with Mandriva, all of these tools can be installed through the admin menu.
  • GCC 4.3.2 or later
  • GNU Make
  • GNU Bison
  • GNU binutils 2.9.1.0.23 or later
  • Other standard GNU/Unix tools
  • LZO 1.02 (devel) or later
  • Ruby
IPKG Manager

From the installation files, you will see that I am always trying to keep the install size down, that's why I selected busybox. This is also why I've selected to use the itsy package manager which is a cut down version of the Debian package manager. It creates ipk files, and the tools can be downloaded from here:
  • ipkg-tools
  • ipkg-build

Directory Structure

I've created a directory hierarchy on my Linux machine, which will contain files as follows:
  • bin - contains scripts and programs I used to develop the build
  • build - working directory where all of the compilation is performed
  • etc - directory, where I include all of my configuration files for the build
  • ipk - directory where all of the ipk install files are stored
  • makefiles - I use make to control all of the building, and the makefiles live here
  • sources - holds the downloaded source code
  • image - where a build image is created
  • iso - where the iso cdrom images are stored
Bin Directory and Tools

In the bin directory, I have several scripts, the first being 'setpath', which is used to set up the build environment, and is sourced by typing a dot, space and setpath, i.e.: . setpath

setpath file contents:
#
# Root work area
#
ROOT="/home/blin"
export ROOT

PATH="$ROOT/bin:$PATH"
export PATH

#
# Source Tarball directory
#
SRC="$ROOT/source"
export SRC

#
# SVN Archive directory
# Used for locally developed applications
#
SVN="$ROOT/svn"
export SVN

#
# Build directory
# Used to compile programs
#
BUILD="$ROOT/build"
export BUILD
#
# Installation directory
# Used to install programs (full development tree)
#
INSTALL="$ROOT/install"
export INSTALL

#
# IPK directory
# Used to create distribution packages from installation
#
IPK="$ROOT/ipk"
export IPK

#
# Image directory
# Used to create distribution image from packages
#
IMAGE="$ROOT/image"
export IMAGE

#
# Aliases
#
alias cdp="cd $ROOT"
alias cdb="cd $BUILD"
Now, I manage all of my source bundles with ipk control files, which are stored in etc/ipk (see below). There are two scripts that extract information from these files: getversion and download.

getversion looks into the appropriate ipk control file, and extracts the version number of the requested application:

getversion file contents:
#!/bin/sh

if [ "$ROOT" == "" ]
then
echo "\$ROOT not set, did you source setpath?"
exit
fi

cd $ROOT/build

if [ "$1" == "" ]
then
echo "getversion application"
echo ""
echo "e.g. getversion glibc"
echo ""
exit
fi

if [ -f $ROOT/etc/ipk/$1 ]
then
VERS="`cat $ROOT/etc/ipk/$1 | grep Version | cut -d' ' -f2-`"
echo "$VERS"
else
echo "0.0.0.0.0.0.0"
fi
download is used to download the requested file from its source, and store the resulting tar / bzip file in the sources directory.

download file contents:
#!/bin/sh

DATE="`date +%y%m%d`"

if [ "$ROOT" == "" ]; then
echo "ROOT environment variable is not set."
echo "has setpath been sourced?"
exit
fi

if [ "`which wget`" == "" ]; then
echo "wget is required, please install."
exit
fi

cd "$ROOT/sources"

#
# Download via wget
#

if [ "$1"=="" ]; then
SOURCES="cat /etc/ipk/* | grep Source: | grep wget, | cut -d ',' -f2-`"
else
SOURCES="cat /etc/ipk/$1 | grep Source: | grep wget, | cut -d ',' -f2-`"
fi

for SOURCE in $SOURCES
do
FILE=`basename $SOURCE`
NAME="`echo $FILE | cut -d- -f1`"
if [ -f $FILE ]
then
echo "$NAME has already been downloaded, skipping."
else
echo "Downloading $NAME from $SOURCE."
mv -f "$NAME-*" old > /dev/null 2>&1
wget -nv "$SOURCE"
fi
done

#
# Download via git
#

if [ "$1"=="" ]; then
SOURCES="`cat ../etc/ipk/* | grep Source: | grep git, | cut -d',' -f2-`"
else
SOURCES="`cat ../etc/ipk/$1 | grep Source: | grep git, | cut -d',' -f2-`"
fi

for SOURCE in $SOURCES
do
NAME=`basename $SOURCE`
FILE="$NAME-$DATE.tar.bz2"
if [ -f $NAME-*.tar.bz2 ]
then
echo "$NAME has already been downloaded, skipping. (Manually remove $FILE to force download)"
else
echo "Downloading $NAME from $SOURCE."
cd ../tmp
rm -rf ../tmp/*
git clone $SOURCE > /dev/null
mv $NAME $NAME-$DATE
rm -rf $NAME-$DATE/.git
tar cf ../sources/$NAME-$DATE.tar $NAME-$DATE
rm -rf $NAME-$DATE
cd ../sources
bzip2 $NAME-$DATE.tar
fi
done
In order to unpack the downloaded bundles for compilation, I use an unpack script called, unpack!

unpack file contents:

#!/bin/sh

if [ "$ROOT" == "" ]
then
echo "\$ROOT not set, did you source setpath?"
exit
fi

if [ "$ARCH" == "" ]
then
echo "\$ARCH not set, did you remember to set and export it?"
exit
fi

HOSTP="`cat $ROOT/etc/ipk/$1 | grep Depends | cut -d' ' -f2`"
if [ "$HOSTP" == "host-development-environment" ]
then
export ARCH="host"
fi

mkdir -p $ROOT/build/$ARCH
cd $ROOT/build/$ARCH

if [ "$1" == "" ]
then
echo "unpack application"
echo ""
echo "e.g. unpack glibc"
echo ""
exit
fi

if [ -f $ROOT/sources/$1-* ]
then
FILE="`ls $ROOT/sources/$1-* | head -1`"
EXT="`echo $FILE | awk -F . '{print $NF}'`"
DONE="0"
if [ "$EXT" == "tar" ]
then
echo "Unpacking $FILE"
tar xf $FILE
touch $1-*
DONE="1"
fi
if [ "$EXT" == "gz" ]
then
echo "Unpacking compressed $FILE"
tar xzf $FILE
touch $1-*
DONE="1"
fi
if [ "$EXT" == "bz2" ]
then
echo "Unpacking bz2 compressed $FILE"
bunzip2 -dc $FILE | tar xf -
touch $1-*
DONE="1"
fi
if [ "$DONE" == "0" ]
then
echo "Unknown file extension, or file not found for $0"
fi
else
echo "package $1 not found in $ROOT/sources"
echo "ensure that the ipk control file exists in $ROOT/etc/ipk"
echo "then run download"
exit
fi
etc/ipk Directory

The etc/ipk directory contains the control files for all of the applications to be downloaded and used in the image. The ipkg manager understands the concept of dependencies, and requires that specific packages are installed in order to use other packages. Each package has a control file, which contains this and more information. Control files are in the following format:
Package: packagename
Section: admin / base / comm / editors / extras / graphics / libs / misc / net / text / web / x11
Priority: required / optional / standard / important / extra
Version: version.number
Architecture: ARCHITECTURE / all
Maintainer: www.vizier.co.uk
Source: wget,url / git,url
Depends: dependencies,separated,by,commas
Description: Textual Description of the package
Packages are downloaded and stored in files containing their package name and version number, e.g. packagename-version.number.tar.bz2. The word ARCHITECTURE is automatically replaced during compilation with the processor architecture of the release, e.g. i586. When they are built, they end up in an ipk file with a name such as busybox-1.16.0-i586.ipk.

The source field is used by the download script to fetch the appropriate sourcecode and place it in the sources directory.

Depends is a list of the packages that must be installed for this package to work. The root package is named filesystem, onto which the linux kernel is installed. The main library glibc needs the kernel, and most applications need glibc. The hierarchy of dependencies is shown in the Packages section below.

There are also 4 scripts which may be used during installation / removal of a package - these are:
preinst [runs prior to install]
postinst [runs after files are installed]
prerm [runs prior to removal]
postrm [runs after files are removed]
These scripts may also exist in the etc/ipk directory, and be named packagename-preinst, packagename-postinst etc.

makefiles Directory

Building packages is performed using makefiles. In order to place all of the customisation in a single place, it is all done in the apporpriate make file.

... add words on makefiles here ..

Packages

The packages are all identified in the etc/ipk directory, and have the following dependency hierarchy:
filesystem
linux
glibc
busybox
ipkg
brltty
Rather than show the contents of all of the packages here, they can be downloaded as part of the install tree from here.

Downloading

With the configuration files created, downloading is as simple as typing 'download', which runs the script from the bin directory.

Building Packages

Downloaded packages all need to be configured and compiled for the target architecture.

Creating the Filesystem

The target machine filesystem needs some basic directory structure, and some system device 'files' creating. This can all be done inside an ipk install script.

.. list the ipk install script here as it is interesting ..

Once the ipk install script has been created, it should be saved as a source tarball (remember that this one is created and cannot be downloaded, so be careful about removing everything in the sources directory).

.. create the filesystem tarball ..

.. create the filesystem ipk file ..

Building the Kernel

Building the linux kernel is probably one of the longest individual tasks that you will need to do - for me, the compilation took 25 minutes.



Building Glibc
Building Busybox


Installing Packages


Building Image


Creating CDROM


Making Bootable





Unpacking, Configuring and Building the Kernel (25 minutes )

For my first build, I've decided to build the kernel with its default configuration. I've downloaded the kernel source, and unpacked into source/linux-2.6.28.10 and compiled it:
# unpack

cd sources
tar xzf ../0-tarballs/linux-2.6.28.10.tar.gz

# configure kernel

cd source/linux-*
make mrproper
make menuconfig
cp .config* ../kernel-config

# compile

make
make bzImage
make modules
rm -rf ../../images/kernel
mkdir ../../images/kernel ../../images/kernel/boot
make INSTALL_MOD_PATH=../../images/kernel INSTALL_PATH=../../images/kernel/boot modules_
install install
* Note - need to install the kernel and header files in images, so that glibc can use them when it is being compiled.

This installation created .... in ....


Unpacking and Building GLibC (15 minutes)

GLibC is configured and built in the images directory:
# unpack

cd sources
tar xzf ../tarballs/glibc-2.10.tar.gz


# build

mkdir ../root ../root/etc
cd ../images/glibc
../../source/glibc*/configure --prefix=`pwd`/../root CFLAGS="-march=i586 -O2"
make
echo > ../root/etc/ld.so.conf
make install
This installation creates libc.a and libc.so in images/glibc, along with the header files.

* Note need to install glibc and header files in images so that applications can use them when compiling.

Unpacking and Building the Bootloader
# cd bld/grub-1.96
# DST=`pwd`/../../dst
# ./configure --prefix=$DST CFLAGS="-march=i586 -O2"
# make
# make install
Unpacking and Building Busybox

I've downloaded and unpacked busybox-1.13.2 into the bld/busybox-1.13.2 directory.
# unpack

cd source
tar xvf ../tarballs/busybox*.tar.bz2
cd busybox*
make defconfig
make
Busybox need libm.so.6, libc.so.6, linux-gate.so.1, ld-linux.do.2 - the above script need modifying to link against freshly compiled libraries.

This installation creates 'busybox' in the source/busybox* directory.


Building and Installing Grub

cd source/grub-1.95
./configure --prefix=`pwd`/../../root
make
make install

Building an Image
# Directories here need to be sorted out

cd distribution
rm -rf iso-boot
mkdir iso-boot
(cd kernel ; tar cf - . ) | ( cd iso-boot ; tar xf - )
(cd iso-boot/boot ; ln -s vm* vmlinuz)

genisoimage -o iso/boot.iso \
-b source/syslinux*/core/isolinux.bin -c source/syslinux*/core/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
images/iso-boot
The Automated Makefile

Booting VirtualBox

Modifying the Image

Distributing the Image


Notes

Builds should be done with the correct architecture in mind, for example:
CFLAGS="-march=i586 -O2"
The C Flag -march indicates that the architecture is for the Intel 586. This is particularly important when compiling low level code, such as parts of GLibC and Kernel Drivers, which use architecture-dependent assembler.

You can change the architecture, but you need to do it consistently.





Monday 2 February 2009

Eclipse Internet Backup Service and Linux / Wine

Eclipse Internet Home Broadband Pro comes with a free on-line backup facility, but only comes with a Windows based client. This note shows how the tool has been installed and operated under Wine on Mandriva 2009.

Installation
After downloading, double clicking on the .exe file, it installed into its default location. The account came with a username and password, which was prompted for and entered.

Backup Configuration

With the program, you can select which directories to back-up - remember that as this is a Wine application, you can only see the 'windows' drives.

Now, the backup offers you the choice of which drives to include for the operation.

By default, 'My Documents' is selected, and this maps onto whichever directory you have selected for the Documents folder in the Wine Configuation application (Desktop Integration / Shell Folders).

There is an advanced button, which I suspect is there to allow you to pick your own directories from the filesystem, however this does not appear to work properly.

When you select 'Advanced', you get a file hierarchy selection, but rather than containing a filesystem tree, it contains 'colours', 'sports' and 'food' - I presume that this is an internal development function that we should never see.

Having said that, it does not prevent us from using the tool to perform backups.

I have selected the tool to backup 'My Documents', which, for me, maps onto /home/steve/Documents (in the Wine configuration tool).

The backup tool follows softlinks, and also follows "hidden" .xxx files. I have other directories in /home/steve that I want to back up, so all I need to do is soft link them, for example:
ln -s /home/steve/directory1 /home/steve/Documents/.directory1
This way, the backup covers them, but I don't need to keep seeing them in the file manager on the computer.

Before backing up, the tool asks for a password to encrypt the uploaded data - this uses AES128, as symmetrically keyed algorithm.

Scheduled Backups

The application seems to run quite happily from the Linux systray, so it is just a matter of selecting the schedule configuration.

The only thing it doesn't seem to be able to do is display the start time that you have selected - I guess that there is a slight incompatibility or assumption in the font chosen in the drop-down boxes, and it doesn't quite fit. It doesn't, however, impede the selection of the start time.
Performing Restores

Restores are as simple as backups. Restores, by default, try to place the files into "c:\windows\profiles\username\My Documents", however, this uses the Microsoft "move-and-confuse" directory feature, whereby the c:\windows\profiles\username\My Documents" directory is actually the same directory as the one you specified in the Wine configuration program (e.g. /home/users/username/Documents), and is the same directory you used for the backup.

You can select a different directory for the restore, however, the tree does not offer you any of the other mounted drives. It is possible that these look like network drives to the application (I am not sure how Wine handles the drive mapping), so you won't see your drive D:, E: etc...

If you want to restore the files to a different directory, I'd suggest creating a 'restore' subdirectory in your 'Documents' folder, and restoring to there.

Automatic launching on Boot / Login

In order to be useful, the program needs to run in the background. It has a GUI, so running it as a Wine command-line application seems unlikely. I believe that the only realistic way to use the program is to auto-run it when you login.

If you want the program to backup multiple user's files through one account, I suspect that you are going to have to either run the application as root, or provide the current user with read permission for the other user's files, and soft-link. This could be achieved with a group access permission on the filesysytem.

Running the application as root could have possibilities, i.e. in root's Wine configuration, could point to root's Documents folder, which contains softlinks to all user's 'backup-me' folders. This program, however, would be accessible to the current user, who would be able to restore other people's files wherever he wanted.

Links

Sunday 1 February 2009

Installing VirtualBox on Linux Mandriva

VirtualBox is a free virtual machine developed by Sun Microsystems.

This is particularly useful when building kernels and checking that they boot correctly.

It is also useful if you wish to switch between operating systems, or have (as happens in so many cases), applications which will only run under Microsoft.

I personally have installed VirtualBox under Mandriva 2009, from the add/remove programs part of the computer configuration.

Permissions

The first time I ran it, it appeared to run perfectly, however, I believed I could not see all of the hardware, so I ran it as root. From then on, it would only run as root, and I received the following error message when I tried to run 'VirtualBox' from the command line as a mortal user:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (2.6.27.7-desktop586-1mnb) or it failed to load. Please recompile the kernel module and install it by sudo /etc/rc.d/init.d/virtualbox start.

You will not be able to start VMs until this problem is fixed. VirtualBox: SUPR3HardenedMain: effective uid is not root (euid=500 egid=500 uid=500 gid=500)
Now my Mandriva 2009 does not have 'sudo' installed - this appears to be a dependency of VirtualBox that was overlooked during installation. I installed 'sudo' through the system's Administration control panel. I also had to edit /etc/sudoers to include myself:
me ALL=/etc/rc.d/init.d/virtualbox
me ALL=/usr/bin/VirtualBox
This still isn't right - I can now sudo launch VirtualBox from the command line, but it doesn't work from the main menu. There are posts on the internet telling you to make sure that your user is in the correct group to get it to run as a mortal, however, I created the group, and changed the permissions on the application, but failed to get the program to work. I am therefore going onwards as root.

First Project

Before I started, I changed the directories used to store the virtual disks - this was as easy as clicking 'File Preferences'

Creating a new guest operating system is also very easy - it's all menu driven - select the 'New' button, identify your client operating system, and select the size of the boot disk.

I am making a small Linux distribution, so I have selected:
  • Linux 2.6256Mb RAM
  • 2Gb Fixed Size Operating System DriveBuilding the Distribution
This is continued in a different blog entry!

Errors

Failed to register hard disk - a hard disk with the same UUID or properties is already registered: Make sure you delete / unregister the disk using the Virtual Disk Manager (it's on the file menu) rather than removing the actual file.

Links

Virtualbox can be downloaded from: http://www.virtualbox.org/