James Little

Installing Ubuntu Feisty on Santa Rosa

leave a comment

If you’ve recently bought a laptop with an Intel Core 2 Duo CPU, the chances are it’s running on the Santa Rosa platform. Having wiped off the unfortunate Windows installation, you’ll want to install some flavour of linux, such as Ubuntu Feisty. Unfortunately the installation process is not as smooth as you might as expect. In fact, it prooved so troublesome for me that in the end I decided that upgrading to Gutsy would be a better idea. But first I’ll talk you through how you can go about getting Feisty installed:

When booting from the Feisty Live CD, the first problem you’ll encounter will probably be something like:
/bin/sh: can't access tty: job control turned off
(initramfs)

and the OS will not continue to load. I’m not sure on the cause of this, but to get round it hit F6 at the boot menu and append break=top to the list of options. You should then see a slightly different error message, and underneath it you should type:
modprobe piix
exit

The LiveCD should then continue to load the OS. After a minute or so you’ll probably see a lovely blue screen with a “Failed to start the X server…” error message. Hit Yes or No (whatever you fancy) and you’ll be dumped at the command line where you should type:
sudo dpkg-reconfigure xserver-xorg

Remember the sudo bit or you’ll be reminded that you are not a superuser; no password is required. The Xorg configuration screen will appear and you’ll be asked (a lot) of questions. Keep the driver on “vesa” and continue through the questions, providing the default answers. At the bit where it asks you something about monitor config options and gives you the choice of “Simple”, “Medium” and “Advanced” I hit Medium and continued through. The vesa driver might not support your resolution if you have a widescreen aspect ratio (1280×800, 1440×900, etc.). Don’t worry about this for now and continue. Eventually you’ll be dumped back to the command line. Now type:
sudo /etc/init.d/gdm restart
and the Gnome desktop environment should start to load. From here you can perform your installation as required.

When you boot Feisty for the first time you’ll notice some more problems, such as the lack of an Intel graphics driver if your laptop uses the onboard Intel GMA965 chip, and non-functional sound & wireless. For me it was the lack of graphics driver that prompted me to upgrade to Gutsy, since the solution for Feisty involved upgrading the kernel to 2.6.22 anyway, which is the kernel version used in Gutsy (see http://ubuntuforums.org/showthread.php?t=494943 for more info). At the time of writing, Gutsy Tribe 5 has just been released and it seems to be stable. You can save yourself a lot of hassle where Santa Rosa is concerned by downloading the tribe 5 live CD which boots with no problems whatsoever for me, including desktop effects, wireless (my laptop has the 4965AGN chip) and sound. If you’ve already installed feisty you can upgrade to Gutsy by running “update-manager -d”.

Written by James Little

August 30th, 2007 at 9:40 pm

Posted in Linux

Tagged with , ,

How to Mount VMDK files in Linux

4 comments

There’s various tools for Windows that allow you to mount VMware images, which offers a convenient way to transfer files to/from the Virtual Machine. The solution in linux seems to be a little less well-known, but it is effectve nonetheless, and I find it preferable to using SSH/FTP/NFS etc. to transfer files.

First you’ll need to download a copy of VMware server, which is free. You may be using VMware player to run your virtual machines, but unfortunately it doesn’t include the tool needed to mount VMware images. It’s not a major problem though; just unpack the VMware server archive you just downloaded and copy the files “vmware-mount.pl” and “vmware-loop” from its “bin” directory to your /usr/bin directory (or whatever directory you have VMware Player installed). There’s no need to install VMware Server if you already have Player. If you have neither installed then obviously you will need to install one of them. Now navigate to that installation directory and follow my lead:

jim@jim-desktop:/usr/bin$ ./vmware-mount.pl

This script requires 3 (not 0) mandatory argument(s).

Usage: ./vmware-mount.pl
-p : Print the partition table
disk : Name of the Virtual Hard Disk file
or
disk : Name of the Virtual Hard Disk file
partition : Number of the partition
[-t type] : Partition type
[-o options]: Partition mount options(s)
mount-point : Directory where to mount the partition

Here we see the usage instructions for the vmware-mount script. I’ll run with the ‘-p’ option so I can see the partition structure of my image:

root@jim-desktop:/usr/bin# ./vmware-mount.pl -p /home/jim/'My Virtual Machines'/windows.vmdk'

--------------------------------------------
VMware for Linux - Virtual Hard Disk Mounter
Version: 1.0 build-44356
Copyright 1998 VMware, Inc. All rights reserved. -- VMware Confidential
--------------------------------------------

Nr Start Size Type Id Sytem
-- ---------- ---------- ---- -- ------------------------
1 63 2097088 BIOS 6 FAT16

That tells me that the partition number I’ll need is 1, and it’s the only partition available. So to mount the image I run the following:

root@jim-desktop:/usr/bin# mkdir /media/vmware-image
root@jim-desktop:/usr/bin# ./vmware-mount.pl /home/jim/'My Virtual Machines'/windows.vmdk 1 /media/vmware-image

The script warns you about untested support for kernels > 2.4 and has a whinge about network block devices, but type ‘Y’ on both counts to continue and the image will mount to your specified location (in this case, /media/vmware-image). You can now open another terminal window and explore the image. In Ubuntu w/ Gnome I’m able navigate via Nautilus, and it even creates a nice image on the desktop for me. You may find additional switches such as “-o ro” to make the image read-only will come in handy.

Written by James Little

August 29th, 2007 at 9:31 pm

Posted in Linux

Tagged with ,

Feisty – “No volume control GStreamer plugins and/or devices found.”

3 comments

So suddenly I see “No volume control GStreamer plugins and/or devices found.” instead of the usual volume control tool in Feisty. I googled the problem and most of the solutions hinged around the system not detecting the soundcard, or the user forgetting that they didn’t have one =) But my sound had been working fine for a few months, so it had to be something else. In this case, careless use of the ‘usermod’ command; I used the command ‘usermod -G groupname’ to add my user to a group I had just created. Unfortunately it removed me from every other group, including the ‘audio’ group.

A quick gedit of /etc/group and I was back in business. The moral of the story: if your sound suddenly stops working, check that your user is still a member of the audio group. Oh, and use ‘usermod’ more carefully than I did.

Written by James Little

August 27th, 2007 at 1:00 pm

Posted in Linux

Tagged with ,

Installing VMWare on Ubuntu Gutsy

4 comments

Unfortunaltely the latest kernel included in Gutsy (2.6.22-10) isn’t supported by VMware yet, so you’ll run into a few problems when attempting to install VMware Server. If you’re running 64bit Gutsy and you haven’t already installed the ia32 libraries then you’ll probably see this message to start with:
The correct version of one or more libraries needed to run VMware Server may be missing. This is the output of ldd /usr/bin/vmware:
linux-gate.so.1 => (0xffffe000)
libm.so.6 => /lib32/libm.so.6 (0xf7f93000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7f8f000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7f76000)
libX11.so.6 => not found
libXtst.so.6 => not found
libXext.so.6 => not found
libXt.so.6 => not found
libICE.so.6 => not found
libSM.so.6 => not found
libXrender.so.1 => not found
libz.so.1 => /usr/lib32/libz.so.1 (0xf7f60000)
libc.so.6 => /lib32/libc.so.6 (0xf7e16000)
/lib/ld-linux.so.2 (0xf7fc6000)

This program cannot tell for sure, but you may need to upgrade libc5 to glibc
before you can run VMware Server.

which is easily remedied by running:
sudo apt-get install ia32-libs

The next error message occurs when the vmware-config script attempts to build the vmmon modules:

None of the pre-built vmmon modules for VMware Server is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes]

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.22-10-generic/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmmon-only'
make -C /lib/modules/2.6.22-10-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-10-generic'
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:80:
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-10-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.

To get around this we need to apply a patch called vmware-any-any (see here for more info). I used version 113 as it seems to be the latest; it can be downloaded here. Extract the contents of the archive, navigate to their location and simply run:
./runme.pl
to install the patch. You’ll see the following:
Updating /usr/bin/vmware-config.pl ... now patched
Updating /usr/bin/vmware ... No patch needed/available
Updating /usr/bin/vmnet-bridge ... No patch needed/available
Updating /usr/lib/vmware/bin/vmware-vmx ... No patch needed/available
Updating /usr/lib/vmware/bin-debug/vmware-vmx ... No patch needed/available
VMware modules in "/usr/lib/vmware/modules/source" has been updated.

Before running VMware for the first time after update, you need to configure it
for your running kernel by invoking the following command:
"/usr/bin/vmware-config.pl". Do you want this script to invoke the command for
you now? [yes]

Hit enter to invoke vmware-config.pl and the rest of the installation should now run smoothly. Note that you will need a C++ compiler to build the vmmon modules. Enter the following to install such development tools:
sudo apt-get install build-essential
sudo apt-get install linux-headers-'uname -r'

The final message you should see is:
The configuration of VMware Server 1.0.3 build-44356 for Linux for this running kernel completed successfully.

and you should now have a fully-functional version of VMWare Server; launch it by typing ‘vmware’ at the command line, or from the menu entry.

Written by James Little

August 25th, 2007 at 7:56 pm

Posted in Linux

Tagged with , ,