My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Sunday, April 26, 2009

Evernote under Ubuntu with wine

I've been using EverNote for a while. It's nice on my Mac with the native client, and I have been using it via the web interface from my Ubuntu laptop. Looks like others have had success running it under wine, so I thought I'd give it a try.

I started by downloading the windows binary from http://www.evernote.com/about/download/

Then I ran the installer under wine:
% cd ~/Downloads/
% wine Evernote_3.1.0.1139.exe
There was a lot of warnings printed to the shell, but the install worked (I chose the "Express" option BTW).

EverNote started up. The first thing it does is sync and the message telling you it's syncing is a small message in the lower right, which is easy to overlook it turn giving the false impression it's hung. But after a couple minute it finished and I saw all my notes.

I've played with it a little so far. The video is a little sluggish, but still more spry than the web interface, so I'm happy.

Installing TweetDeck on Ubuntu

I was interested in a Twitter client I could use cross-platform so I decided to try out TweetDeck. Here's my install process on Ubuntu.

I started by installing Adobe Air:
% wget http://airdownload.adobe.com/air/lin/download/latest/AdobeAIRInstaller.bin
% chmod +x AdobeAIRInstaller.bin
% sudo ./AdobeAIRInstaller.bin
Then I went to install TweetDeck. I could not get it to work from the TweekDeck homepage (I would click on the download button but nothing would happen), but it did work for me through the Adobe site. The installer ran and it just worked.

It did mention it would install Adobe Air in the process, so it is possible I could have skipped the first part of this post.

Saturday, April 25, 2009

Had to re-patch apt-cacher-report.pl

Looks like around April 15 a new version of apt-cacher got pushed out, which overwrote my previous fixes. The file apt-cacher-report.pl didn't change though, so I just re-applied the same fixes and saved a copy of the patched script in case it happens again.

BTW, here are the latest numbers. apt-cacher has saved me 10GB in traffic over the past 6 months.

cache efficiency


Cache hitsCache missesTotal
Requests 31818 (65.15%)17015 (34.84%)48833
Transfers 10.641 GB (72.34%)4.068 GB (27.65%)14.71 GB

LifeHacker Top 10 Ubuntu Downloads

Nice list.

Upgrading Ubuntu 8.04 Desktop VM to 9.04

Short version: Don't try upgrading a 8.04 Ubuntu Desktop VM with only 4GB of disk to 8.10 - there isn't enough disk space.

I decided to start playing with Ubuntu 9.04 by upgrading a 8.04 Ubuntu Desktop VM I had. Since it was two version behind I followed the upgrade directions to bring it up to 8.10 first. A key bit in the directions is opening Software Sources and selecting "Normal releases" under the Updates tab, otherwise Update Manager won't show the update version.

I fired up the Update Manager, upgraded a number of packages, and then fired up the upgrade to 8.10. Unfortunately it died with the following message:
The upgrade aborts now. The upgrade needs a total of 649M free space on disk '/'. Please free at least an additional 243M of disk space on '/'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.
So I did as it suggested and ran 'apt-get clean', which seemed to free up ~720MB of disk space:
# apt-get clean
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 3920768 2993528 729644 81% /
...
Now I trued Update Manager again, but it failed again with a similar message:
The upgrade aborts now. The upgrade needs a total of 975M free space on disk '/'. Please free at least an additional 306M of disk space on '/'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.
So now I need 975MB of space. I give up.

Lesson learned, give Ubuntu more than 4GB if you think you might want to upgrade it.

Friday, April 24, 2009

New VM checklist

Things to do in a new Ubuntu VM after I create it:
  1. Install a apt-cacher proxy. This involved editing /etc/hosts to add the caching host and then creating /etc/apt/apt.conf.d/90local-proxy with contents of: Acquire::http::Proxy "http://cache-host:3142";
  2. Install vmware-tools.
That's it for now.

Upgrading Ubuntu Desktop from 8.10 to 9.04 - wireless woes again.

Turning now to upgrading my Ubuntu laptop from 8.10 to 9.04 using the Network Upgrade method. I started by checking to make sure I'm up to date:
# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Then I ran System/Administration/Update Manager, hit Upgrade and followed the directions.

The irst time through I saw the following, which turned out to be caused by a misconfigured apt-cacher on my apt-cacher system (which I had just upgraded):
Third party sources disabled

Some third party entries in your sources.list were disabled. You can re-enable them after the upgrade with the 'software-properties' tool or your package manager.
Followed by:

Error during update

A problem occurred during the update. This is usually some sort of network problem, please check your network connection and retry.

W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/restricted/i18n/Translation-en_US.bz2 Error reading from server - read (104 Connection reset by peer)
, W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/multiverse/i18n/Translation-en_US.bz2 Error reading from server - read (104 Connection reset by peer)
, W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/restricted/i18n/Translation-en_US.bz2 Error reading from server - read (104 Connection reset by peer)
, W:Failed to fetch http://security.ubuntu.com/ubuntu/dists/jaunty-security/restricted/i18n/Translation-en_US.bz2 Error reading from server - read (104 Connection reset by peer)
, E:Some index files failed to download, they have been ignored, or old ones used instead.
After fixing apt-cacher, I ran System/Administration/Update Manager again and it went much more smoothly. Questions asked during the upgrade and my answers:

Replace /etc/services? Yes
...

Could not install 'b43-fwcutter'
subprocess post-installation script returned error exit status 1
This turned out to be the sources of wireless woes (more about that later).

Then a couple scary messages I think related to the b43-fwcutter failure.

Could not install the upgrades
The upgrade is now aborted. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a).

...

Upgrade complete

The upgrade is completed but there were errors during the upgrade process.

...

Then I went ahead and did a...

#reboot
Booting the system did a "Routine check of drives" took several minutes

And then when it came up, I had no wireless, like last time. I plugged into wired ethernet and that worked - so that's better than last time. First thing I tried was re-enabling third party sources and seeing if there was a new Network Manager. I edited /etc/apt/sources.list and uncommented the following lines:

# Latest version of Network Manager
deb http://ppa.launchpad.net/network-manager/ubuntu jaunty main # disabled on upgrade to jaunty
deb-src http://ppa.launchpad.net/network-manager/ubuntu jaunty main # disabled on upgrade to jaunty

# Dropbox
deb http://linux.getdropbox.com/ubuntu jaunty main # disabled on upgrade to jaunty
deb-src http://linux.getdropbox.com/ubuntu jaunty main # disabled on upgrade to jaunty

#WineHQ - Ubuntu 8.10 "Intrepid Ibex"
deb http://wine.budgetdedicated.com/apt jaunty main # disabled on upgrade to jaunty

# SKYPE
deb http://download.skype.com/linux/repos/debian/ stable non-free # disabled on upgrade to jaunty

And then I ran:
# apt-get update
# apt-get upgrade
But the only packages that were upraded were nautilus-dropbox and wine. So no luck there.

Ok, going back to b43-fwcutter, I tried the following:
# /usr/share/b43-fwcutter/install_bcm43xx_firmware.sh
...
# reboot
And that did the trick!

Now I just did the usual vmware re-configure:
# /usr/bin/vmware-config.pl
I accepted all the default. Afterwards, don't forget to fix /etc/vmware/config.

At this point everything seems good...

Upgrading Ubuntu server VMs from 8.10 to 9.04

After my first attempt to upgrade a Ubuntu VM desktop image didn't work work due to lack of disk space, I decided to try my Ubuntu server VMs, which I had previously upgraded to 8.10.

I started by backing up the virtual machines (basically shut them down and tar'ed them up). Then I followed the direction for doing a network upgrade for Ubuntu servers. BTW, this took a while, I should have done it inside a screen session.

# apt-get install update-manager-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
update-manager-core is already the newest version.
Presumably I did that during the 8.10 upgrade, so on to step 2:
# do-release-upgrade
Checking for a new ubuntu release
Done Upgrade tool signature
Done Upgrade tool
Done downloading
extracting 'jaunty.tar.gz'
authenticate 'jaunty.tar.gz' against 'jaunty.tar.gz.gpg'

...a few minutes go by here...

1 package is going to be removed. 23 new packages are going to be
installed. 270 packages are going to be upgraded.

You have to download a total of 188M. This download will take about
15 minutes with your connection.

Fetching and installing the upgrade can take several hours. Once the
download has finished, the process cannot be cancelled.

Continue [yN] Details [d]y
Fetching

...25 minutes of downloading go by here...
At this point installs started and I answered various questions. I won't mention all of them, just hit the highlights...

I kept my version of the following files:
  • /etc/apache2/ports.conf and /etc/apache2/sites-available/default
  • /etc/apt/apt.conf.d/50unattended-upgrades
  • smb.conf
I went ahead and said "yes" to "17 packages are going to be removed."

Then I went ahead and answered yes to reboot and when the VM came back up, all looked good.

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
VMWare tools were even running:

$ ps auxwww | grep vmware
root 2448 0.3 0.1 2204 660 ? Ss 22:21 0:02 /usr/sbin/vmware-guestd --background /var/run/vmware-guestd.pid
That's it.

Upgrading another VM, I saw the following message, which I thought was interesting. I went ahead and said "y":
Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, a additional ssh daemon will be started at port
'9004'.
Do you want to continue?

whatismyip quit working for ddclient... change to checkip.dyndns.com

Suddenly ddclient started generating errors trying to determine my local IP address:
/etc/cron.daily/ddclient:
WARNING: cannot connect to whatismyip.org:80 socket: IO::Socket::INET: connect: Connection timed out
WARNING: unable to determine IP address
Pointing a browser at whatismyip.org:80 seemed to confirm the site is down - just kept getting connection refused.

Well, time to find an alternative for whatismyip. Poking around with google, I found this page which described using checkip.dyndns.com. Following those directions I edited /etc/ddclient.conf and replaced the following line:
use=web, web=whatismyip.org
With:

use=web, web=checkip.dyndns.com/, web-skip='Current IP Address: '
And then ran ddclient again to check:
# /etc/cron.daily/ddclient
#
No output, all seems well....But no, it isn't. Visiting DynDNS indicates I still haven't updated my information recently. Remembering my previous experience with ddclient hanging, I checked for a hung process and sure enough, there was one:

# ps auxwww | grep ddcl
root 15725 0.0 0.0 7548 3032 ? S Mar29 0:00 ddclient - read from whatismyip.org port 80
root 30771 0.0 0.0 3240 804 pts/2 S+ 21:26 0:00 grep ddcl
So I killed it:
# kill -9 15725
And reran ddclient (I found I hat to use the -force flag to get it to do anything):
# /usr/sbin/ddclient -force

And all was good.