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.

Thursday, November 20, 2008

Installing logwatch

I recently installed logwatch on all of my systems using these directions. Basically I just ran the following on reach system:

# aptitude install logwatch

Since I already had email to root forwarded to me, no other configuration was necessary. Now I get a nice daily email summary from each system.

Monday, November 3, 2008

NameVirtualHost *:80 has no VirtualHosts

After upgrading to 8.10 I saw the following error on an Apache reload:

# apache2ctl restart
[Sun Nov 16 13:36:23 2008] [warn] NameVirtualHost *:80 has no VirtualHosts

Updated Nov 16, 2008: My first solution (below) didn't work, correct solution now immediately follows...

Looks like the problem was I had to NameVirtualHost statements, one in /etc/apache2/ports.conf and one in /etc/apache2/sites-enabled/000-default.

To fix the problem, I simply commented on the declaration in /etc/apache2/ports.conf:

grep NameVirtualHost /etc/apache2/ports.conf
#NameVirtualHost *:80

Old solution I posted, that turned out, did not work.

To fix this, I added a ServerName directive, as follows:

<virtualhost *:80>
    ServerName hostname
    ServerAdmin webmaster@localhost

Sunday, November 2, 2008

Upgrading my laptop to Ubuntu 8.10 - network manager applet woes!

After upgrading my Ubuntu servers to 8.10, I turned my attention to my Ubuntu laptop running Ubuntu desktop. I used the Network Upgrade for Ubuntu Desktops.

The upgrade went smoothly, though it took a few hours (much longer than the server upgrades) and seemed to go in spurts (perhaps because of apt-cacher?). I did get one pop-up message I noted for later:
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.

I installed new versions of:
  • /etc/init.d/mountdevsubfs.sh

Files I kept:
  • /etc/services

55 obsolete packages were removed.

Afterwards, I rebooted and the fun began as the system couldn't connect to my wireless network. First thing I noticed was the following message in /var/log/messages:
Nov 1 16:31:32 von-laptop kernel: [ 470.051333] input: b43-phy0 as /devices/virtual/input/input14
Nov 1 16:31:32 von-laptop kernel: [ 470.256065] b43-phy0: Loading firmware version 351.126 (2006-07-29 05:54:02)
Nov 1 16:31:32 von-laptop kernel: [ 470.256080] b43-phy0 warning: You are using an old firmware image. Support for old firmware will be removed in July 2008.
Nov 1 16:31:32 von-laptop kernel: [ 470.256085] b43-phy0 warning: You must go to http://linuxwireless.org/en/users/Drivers/b43#devicefirmware and download the latest firmware (version 4).

Following the directions pointed to by the log message I ran the following command which installed new wireless drivers.
# /usr/share/b43-fwcutter/install_bcm43xx_firmware.sh

I rebooted and the driver message disappeared, but didn't fix the original problem and I still wasn't getting on the network.

So, next I connected to my wired network. Or at least I tried. Evening after plugging into my cat5 ethernet, I still wasn't getting a network connection. Very weird.

After poking around some I realized that the system was actually connecting to the wireless network, it's just that it wasn't getting an IP addresss via DHCP correctly. If I ran 'dhclient' manually, I got on the network just fine. Only problem was every few minutes the network manager tried to reconnect me, so I had to kill it ('killall nm-applet') to stay connected.

Next I tried upgrading to the latest network manager (as I did previously). I added the following lines to /etc/apt/sources.list. Note these are the same lines I had before that the upgrade commented out, but with "hardy" changed to "intrepid".
deb http://ppa.launchpad.net/network-manager/ubuntu intrepid main
deb-src http://ppa.launchpad.net/network-manager/ubuntu intrepid main

And upgraded via apt-get:
# apt-get update
# apt-get upgrade

Which installed new versions of libnm-glib0, libnm-util0, and network-manager. And then I rebooted... and my network came back up!

Ok, lesson learned is apparently I need to be prepared to keep up to date with the network manager applet separately.

Update: One annoyance still remaining, my firefox is all messed up. Google toolbar and all my other extension buttons are gone. To get them back I had to disable the "Ubuntu Firefox Modifications" and then I was able to restore everything.

Saturday, November 1, 2008

Getting VMWare back up and running under 8.10

After upgrading to 8.10 VMWare wasn't working. I started by following these directions to install VMWare server.

Following that, I upgraded vmware-tools on each vm using these directions (I couldn't find any explicitly for 8.10).

Note that you'll want to do this from the console, as you'll lose networking during the process.

I ran into the following problem at one point:

Error: Unable to execute "/usr/bin/vmware-uninstall-tools.pl.

Following the advice in this thread, I ran vmware-tools-distrib/bin/vmware-uninstall-tools.pl and though it returned a few errors itself, it cleared up the problem.

Things seemed to work OK, except the vmhgfs and vmxnet drivers both failed to build. I don't care about vmhgfs since I don't use shared folders, but vmxnet (the "fast network interface") sure sounds handy. So I hope to come back to this.

Upgrading to Ubuntu 8.10

Ok, upgrading from 8.04 to 8.10. I started with my servers and followed the directions at Network Upgrade for Ubuntu Servers.

update-manager-core was already installed. I edited /etc/update-manager/release-upgrades and set "Prompt=normal", changing from "lts".

Then I tried running 'do-release-upgrade' and ran into my first problem:
# do-release-upgrade
Checking for a new ubuntu release
Failed Upgrade tool signature
Done Upgrade tool
Done downloading
extracting 'intrepid.tar.gz'
authenticate 'intrepid.tar.gz' against 'intrepid.tar.gz.gpg'
exception from gpg: GnuPG exited non-zero, with code 131072
Debug information:

gpg: WARNING: unsafe permissions on homedir `/tmp/tmpc88EwD'

gpg: can't open `/tmp/tmpc88EwD/intrepid.tar.gz.gpg'
gpg: verify signatures failed: file open error

Authentication failed
Authenticating the upgrade failed. There may be a problem with the network or with the server.


I suspected this has something to do with my use of apt-cacher. Poking around the net I found this bug which backed that up and provided a patch to apt-cacher.

Back on my caching system, I did the following to apply the patch:

# cp /usr/sbin/apt-cacher /usr/sbin/apt-cacher.orig
# vi /usr/sbin/apt-cacher
# diff /usr/sbin/apt-cacher.orig /usr/sbin/apt-cacher
111c111,112
<                  'Translation-.+\.bz2'
---
>                  'Translation-.+\.bz2',
>                    '[:alpha:]*\.tar\.gz\.gpg$'

And then I had to restart apt-cacher:
# /etc/init.d/apt-cacher restart
Restarting Apt-Cacher: apt-cacher.

Then back on my upgrading system, I ran 'do-release-upgrade' again and it worked fine.

On various systems, I installed the new version of:
  • /etc/dhcp3/dhclient.conf
  • /etc/apt/apt.conf.d/01ubuntu

I kept my versions of the following files:
  • /etc/apache2/apache2.conf
  • /etc/apache2/sites-available/default
  • /etc/php5/apache2/php.ini
  • /etc/smb.conf
  • /etc/services
  • /etc/smb.conf
  • /etc/apt-cacher/apt-cacher.conf

I removed 19-20 obsolete packages and then answered "y" to reboot at the end. When the system came back up, all looked good:

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"

For my mythbuntu box, I followed the same network upgrade procedure as above. 54 obsolete packages were removed.

Still to go is getting VMWare back up and working and upgrading my Ubuntu laptop. Those will follow in separate posts.