Saturday, June 25, 2011

Getting Instiki wiki working on Ubuntu 11.04

Previous: Installing rvm on Ubuntu 11.04

I started by copying my backup of the whole directory .wiki from an external drive to /home/.wiki.
Then I ran the following commands:
rvm gem install bundler
sudo apt-get install
libxml2-dev
libxslt1-dev
sqlite3
libsqlite3-dev
cd .wiki
bundle
Bundler installed other components Instiki uses, including nokogiri, rubyzip, and sqlite3-ruby.

Instiki did not start, and reported this error:
/home/dave/.rvm/rubies/ruby-1.9.2-p180/lib
/ruby/1.9.1/psych.rb:148:in `parse':
couldn't parse YAML at line 18 column 14 (Psych::SyntaxError)


I found an explanation and workaround by vicvega on
Stack Overflow. I added the lines
require 'yaml'
YAML::ENGINE.yamler= 'syck'
at the top of Instiki's config/boot.rb file (just above the comment that reads, "Don't change this file!"), and Instiki started up clean. In a nutshell, the problem was that bundler uses psych as the default yaml parser, psych is not compatible with rails, and Instiki is a rails app.

In .bash_aliases I added a line to start the wiki conveniently:
alias wiki=~/.wiki/instiki


Next: Ubuntu 11.04 on Dell Vostro 3550 - FAIL

Installing rvm on Ubuntu 11.04

Previous: GoogleEarth installation on Ubuntu 11.04

I started by referring both to the rvm installation guide and to the notes I had made when I installed rvm on 10.04: Ubuntu 10.04 upgrade on Toshiba Satellite: Ruby Version Manager.

They have simplified the installation process for rvm. You used to have to comment a line in .bashrc and then run a script and
then uncomment the line again. They've improved the process so that isn't necessary anymore. Makes the world a better place.

The rvm installation itself worked exactly as documented in the rvm installation guide, so I won't repeat the steps here.

Installed ruby 1.9.2 and 1.8.7 and set 1.9.2 as the default ruby version:
rvm install 1.9.2
rvm install 1.8.7
rvm --default use 1.9.2
This all worked fine and it was easy to switch between versions:

ruby -v (it reported 1.9.2)
rvm use 1.8.7
ruby -v (it reported 1.8.7)
use default
ruby -v (it reported 1.9.2)

Next: Getting Instiki working on Ubuntu 11.04

GoogleEarth installation on Ubuntu 11.04

Previous: Ubuntu 11.04 on VmWare Player with Windows 7 host

The GoogleEarth installation on Ubuntu has changed since I last installed it. This time, the installation went this way:

(1) From the GoogleEarth download site at http://www.google.com/earth/download/ge/agree.html download "64 bit .deb (For Debian/Ubuntu)".
(2) In a Terminal window, install the Microsoft TrueType basic font set:
sudo apt-get install ttf-mscorefonts-installer

(3) In a Terminal window, install prerequisite packages to support GoogleEarth:
sudo apt-get install lsb-core
If Ubuntu complains about missing prerequisites for lsb-core, run:
sudo apt-get -f install

(4) In a terminal window, install the .deb package downloaded from the GoogleEarth site:
sudo dpkg -i google-blah-blah.deb

(5) Log out and back in again so that the fonts will be available to Google

Next: Installing rvm on Ubuntu 11.04

Ubuntu 11.04 on VmWare Player with Windows 7 host

Previous: Ubuntu 11.04 on Virtualbox with Windows 7 host - FAIL

Despite the issues with Virtualbox, I still felt the VM approach was the way to go to run Ubuntu 11.04 with Windows 7 on the Dell Vostro. It seemed as if there was no free virtualization proram available that would do the job, so I went to the VmWare site expecting to pay around $80, as in years past. I didn't like the idea of having to pay just to use my personal system when on the road, so I was pleasantly surprised to see that VmWare now offers a product called VmWare Player that is available free for personal use. I tried installing Ubuntu 11.04 on the Dell laptop using VmWare Player.

The installation went smoothly and it was easy to see what was going on at all times.

Just as with Virtualbox, VmWare Player "thought" the system lacked the hardware necessary to run Unity. I don't understand well enough how virtualization software works to have a guess as to why that might be. The "real" hardware is certainly adequate. Of course, for this limited purpose the classic Gnome desktop is perfectly adequate, too.

On edit: Found a solution from David Tam on his blog. It seems Unity depends on hardware 3D graphics acceleration, which is not supported in a guest VM. The solution is to switch to a 2D version of the Unity desktop:
sudo add-apt-repository ppa:unity-2d-team/unity-2d-daily
sudo apt-get update
sudo apt-get install unity-2d-default-settings
then log out and in again. Voilá!

Network connectivity from the guest OS was seamless. I plugged a USB stick into a port, and VmWare Player connected it to the Ubuntu instance with no problem.

I shut down the Ubuntu guest from inside the guest, then double-clicked its entry in VmWare Player's list to restart it. All normal.

Good to go.

Next: GoogleEarth installation on Ubuntu 11.04

Ubuntu 11.04 on Virtualbox with Windows 7 host - FAIL

Previous: Windows 7 boot menu issues

With Ubuntu 11.04 running as a VirtualBox VM on a Microsoft Windows 7 host system, USB devices are not visible to the guest Ubuntu instance. Community documentation at https://help.ubuntu.com/community/VirtualBox/USB says, "Add yourself to the user group vboxusers, then log out and back in." I found no group named vboxusers, so I created one and added my own account, logged out and back in. This had absolutely no effect.

Another source at http://www.ubuntugeek.com/running-ubuntu-11-04-natty-unity-3d-on-virtualbox-4-x.html suggested installing "Virtualbox guest additions," and said to "click on Devices->Install guest additions," which I could not find anywhere, in any menu of any application on either the host or guest systems.

As a last resort, I looked at the Virtualbox user manual. On this page http://www.virtualbox.org/manual/ch04.html#idp11234128 it suggested the following procedure to install Virtualbox guest additions for Ubuntu:
apt-get update
apt-get upgrade
apt-get install dkms
and then...oops...point to the VBoxGuestAdditions.iso file, which doesn't seem to exist anywhere at all. Searching further, I found a thread on Ubuntu Forums at http://ubuntuforums.org/showthread.php?t=584763 where people were looking for this file. This thread also recommends opening the "Devices" drop-down menu in Virtualbox, but there is no such menu item. A thread on the Virtualbox forums at http://forums.virtualbox.org/viewtopic.php?f=3&t=7007 also recommends using this drop-down menu, which does not exist.

Finally, I found an answer at http://forums.virtualbox.org/viewtopic.php?f=2&t=38548. The Virtualbox menu bar in the guest window does not appear when running in "scale" mode. Used host-C to get out of "scale" mode, and the menu appeared. (I had switched to scale mode early on, since the Ubuntu screen image does not fit inside its Windows window, and resizing the Windows window had no effect on the size or aspect ratio of the Ubuntu screen.) The option to install the virtual guest additions resulted in an iso file appearing as an external CD-ROM drive in the guest Ubuntu instance.

At that point, I ran the update and upgrade and installed dkms. Upgrade did quite a lot and took several minutes to run.

After following the instructions at http://www.virtualbox.org/manual/ch04.html#idp11234128, the guest OS still did not see the USB drive. Virtualbox reported the error, "USB device ' ' with UUID {blah} is busy with a previous request. Please try again later," and under Details it gave the result code E_INVALIDARG (0x80070057) for component HostUSBDevice and interface IHostUSBDevice.

Next: Ubuntu 11.04 on VmWare Player with Windows 7 host

Windows 7 boot menu issues

Previous: Ubuntu 11.04 on Wubi with Windows 7 - FAIL

After I removed the Wubi-installed copy of Ubuntu from the Dell laptop, there was just the one OS on the system. Yet, the boot menu continued to appear on startup, showing the now-defunct entry for Ubuntu. I discovered that Microsoft had made Windows a bit harder to use since Vista, in that there was no easy way to remove this entry from the boot menu. Msconfig was mentioned on several forums, but it doesn't appear to include a boot menu editor.

I took a chance on a downloaded product from NeoSmart Technologies called EasyBCD. It was intuitive to remove the entry from the boot menu and did no collateral damage. However, on restart the system still displayed the boot menu, now showing only one entry. When there is only one OS installed, there is no need to display the boot menu. It's just a waste of time. Haven't found a fix yet.

Next: Ubuntu 11.04 on Virtualbox with Windows 7 host - FAIL

Ubuntu 11.04 on Wubi with Windows 7 - FAIL

Previous: Ubuntu 11.04 installation

Recently I joined a company as a consultant, and the job requires frequent travel. The company laptop runs Microsoft Windows 7, and some of the company's software tools require Windows. I wanted to have some personal computer time while on the road but I didn't want to have to take two laptops with me, so I decided to install Ubuntu 11.04 under Wubi on that machine. This is a Dell Vostro laptop.

I was never able to get 11.04 to run properly after a Wubi install. There seemed to be some problem related to the video driver. Unfortunately, I could not get to a command line prompt at all. Once the machine reached a certain point in the installation, the display just displayed multicolored garbage or part of a memory dump, and did not respond to the keyboard or mouse.

I did not want to mess with the partitions on that machine, since Windows tends to be very sensitive to that sort of thing (see [blog post link]. Instead, I downloaded VirtualBox and installed 11.04 in a VM. It's functional, but doesn't take good advantage of the host system's video adapter. It won't even run Unity, thinking the "hardware" isn't up to the challenge.

One strange thing...after installing and creating a user account and so forth, when I restarted the guest OS it always wanted to install Ubuntu from scratch. I never found a good reason for it, but when I deleted all the Virtualbox log files (but not the log directory), the problem went away and the guest OS came up normally. After Virtualbox wrote to its log files again, the problem reappeared. Therefore, there did not seem to be any way to establish a reusable Linux instance. Every time I started the virtual machine I had to install Linux again. This is not especially useful.

Due to the issues with a Wubi install of 11.04, I decided not to upgrade the Acer Netbook. It happily runs 10.10.

Next: Windows 7 boot menu issues

Ubuntu 11.04 installation

Previous: Installing Android SDK and Eclipse ADT plug-in

I managed to corrupt the root partition on my main personal system, a Toshiba Satellite P500. Since I had to re-install Ubuntu anyway, I took the opportunity to move on to 11.04.

I wanted to keep the same partition structure as I had before on the Toshiba, with a 30GB partition mounted at /, an 8GB swap partition, and the rest of the disk as a single partition mounted at /home. The installation went smoothly. Just remember to connect your machine to the internet by wire for purposes of the installation. It won't find your wireless adapter during the installation process.

Default settings in .bashrc are a little different in 11.04 than they were in 10.04.
It ships with popular ls aliases and with .bash_aliases already sourced.
I made no changes to .bashrc this time.

Next: Ubuntu 11.04 on Wubi with Windows 7 host - FAIL