Wednesday, February 28, 2007

Installing Parallels 2.2 on Ubuntu 6.10 (Edgy)

Installing Parallels Workstation on Ubuntu can be a bit of a challenge. There are a few minor (yet fatal) issues encountered whether using the Debian package or the install script which prevent Parallels Workstation from running. This article shall explain how to overcome these issues.

Overview
The biggest challenge between Parallels Workstation & Ubuntu is /bin/sh . If you open a shell in Ubuntu and type 'll /bin/sh' you'll see the following:

lrwxrwxrwx 1 root root 4 2007-01-29 10:19 /bin/sh -> dash
What this means is that sh is a symbolic link to dash. What's dash? Its a replacement shell for bash (a popular shell environment) which includes various enhancements over bash. However the scripts packaged with Parallels have compatibility issues with dash, and as a result encounter errors which prevent Parallels from running.

So to sort out this mess we'll make some minor edits to a few of the Parallels script files which will allow Parallels to successfully run.


Dependencies
In addition to the script issues discussed above, there are undocumented package dependencies. These dependencies are due to the manner in which Parallels configures its kernel modules -- running the command parallels-config essentially builds these modules specific to your environment.

So to complete the software build environment in preparation for building the Parallels Workstation kernel modules, these packages should be installed on your system:

sudo apt-get install build-essential
sudo apt-get install kernel-package

Install these before installing Parallels Workstation.

(Note that you are free to install Parallels Workstation first if you wish; however Parallels does not run a dependency check and will not alert you if these packages are missing. The first clue that you will see is that parallels-config will fail to build the modules due to missing header files. So it is simply best to just install these dependencies beforehand.)

Installation

For clarity, we shall assume installation using the Parallels Debian package. However the principles described here remain the same for those using the Parallels install script.

First step is to obtain and install the Parallels Workstation Debian package. This can be found on the Downloads page of the Parallels website.

If the package installed successfully, you likely received a message indicating that parallels-config must be run prior to running parallels. Don't do it just yet, as some changes must be made beforehand.

Exercise your sudo powers and edit these Parallels scripts:
/usr/bin/parallels-config
/usr/lib/parallels/autostart/drivers_start
/usr/lib/parallels/autostart/drivers_stop
/usr/lib/parallels/autostart/iscripts
/usr/lib/parallels/autostart/parallels
/usr/lib/parallels/tools/mimelink
/usr/lib/parallels/tools/network.sh

In each of these files, do a search & replace for all instances of /bin/sh replacing it with /bin/bash. (Keep in mind there may be multiple instances of /bin/sh in each file.)

Once the above files have been updated and saved, launch the parallels-config command:
sudo parallels-config
This should successfully build the kernel modules. If it doesn't complete successfully, double-check that you captured every step above.

Otherwise if parallels-config successfully completes, launch Parallels Workstation and enjoy.

No comments: