Dec 042010

I was trying to use the Knowledgetree automated installer on a fresh install of Ubuntu 10.04.01 64-bit server. While trying to install, I received an error about swftools, which I was able to install thanks to the directions here (in post 2):

However, I then received an error that read:
Failed to fetch Hash Sum mismatch
Followed by a few zend packages that couldn’t be installed.

After much purging and googling, I found that this worked well:

  1. Go to /var/lib/apt/lists/partial/ and delete the files that failed to download. (If you are curious, I looked at the file that was supposed to be correct in the partial directory, and noticed it was encoded still. I suspect an incorrectly expanded archive file that was causing the problem. Some people reported that simply deleting these files fixed the problem, but it did not help for me.)
  2. Using the root URL of the repo that had the hash problem….go to the site. So for me it is
    • Here I noticed that there were a number of files that had the packages. The file it failed on was the bz2 file, however, there is a plain text one available called Packages
    • I clicked on Packages and copied all of the text.
    • On the server, I created a new file in the /var/lib/apt/lists/ directory with the same name of the file that failed/was encoded in the partial directory (sudo vim repos.zend.com_zend-server_deb_dists_server_non-free_binary-amd64_Packages) and pasted all of the text in there.
  3. Then I ran apt-get update and it ran without errors.
  4. Finally, I ran the Knowledgetree install again, and it downloaded all of the required packages fine.

I imagine this would work on any repo that is having a similar problem with Hash Sum mismatch, but of course the URL you will visit, and the file name you will use will be different.

Apr 052010

I recently installed the excellent OpenShot video editor for Ubuntu because I had to splice together some video from our curling league. We had two cameras shooting the action from the Semi-Final, and Final games.

OpenShot is a very easy to use program from making some basic movies and it handled the two different format videos pretty well.

However, after installing, I noticed that I could no longer use AMSN, my instant messenger of choice. When launching from the terminal, I would receive an error about GStreamer problems. This also affected Pidgin, and I’ve heard reports of problems with Empathy and others too. The problem lies in frei0r-plugins package, which messes up gstreamer for some programs, and is required by OpenShot. The easy solution to get it working is to remove frei0r-plugins, but of course, OpenShot won’t work anymore.
sudo apt-get purge frei0r-plugins

After searching the net a bit, I ran across a launchpad page that pointed the finger at libgavl. The problem is fixed in libgavl 1.1.1. Of course, 1.1.0 is the highest version you can get with Ubuntu 9.10.

So, to correct this once and for all, you can compile 1.1.1 yourself, or you can download the .deb for Ubuntu 10.04. So, go here: and download the correct version for your architecture, and you should be good to do.

I got some warnings about an older, more supported version being available in the repositories, but you can safely ignore that.

Mar 122009

I recently updated my server and I store a good number of passwords in my pwman database. It is a great little command line program for storing passwords in a secure manner. I do this so that I can log into my machine from anywhere in the world to retrieve passwords if needed, and I’m not tied to a thumb drive that I could lose/break, or a computer that may not have the necessary OS/ports for me to use.

If you need to migrate your database, you can follow these steps:

  1. Grab a copy of your old database. It is usually called pwman.db and is stored in your /home/yourname/.pwman/ If you can’t find it, there is a config file in this directory that will tell you where it is.
  2. Install pwman3 on your new server. (command for Debian based Linux OSes)
    apt-get install pwman3
  3. Run pwman3 and configure the same master password as your old database. (Not sure if this is required, but I thought it was a good idea)
  4. Make a copy of your database, and then put your old one in your new /home/yourname/.pwman/ folder.

The next time you run pwman3, you will have all your old passwords!

Feb 192009

In my last few attempts at configuring my mythtv installation (my most recent being today when I replaced the hard drive), I’ve gotten this error when I log into my box through SSH:

MythTV status for localhost
Status...........: Wed Feb 18 2009, 8:30 PM
Total Disk Space.: Total space is 548,770 MB, with 158,049 MB used (28.8%)
Next Recording In: 2 Hours, 59 Minutes
mythbox (1) - Idle
Scheduled Recordings:
2009-02-18 23:30:00 - CSI: NY (WBZ)
2009-02-19 00:30:00 - Stargate SG-1 (Space: The Imagination Station)
2009-02-19 10:30:00 - Stargate SG-1 (Space: The Imagination Station)
2009-02-19 12:30:00 - First Wave (Space: The Imagination Station)
2009-02-19 19:30:00 - Coronation Street (CBNT CBC St. John's)
2009-02-19 22:30:00 - CSI: Crime Scene Investigation (WBZ)
Schedule Conflicts:
Unable to access MythTV Perl API. Try with --verbose to find out why.

I get most of the status for the server, but I don’t get the read outs of the conflicts because of the error.

What happens (as far as I understand it) is that when the cronjob generates the motd, it runs as root, and root does not have a link to the mythtv config, so it can’t get the data from the database.  So, to get around this, we need to create a link in /root/.mythtv/ to the config.xml file for the server.  For me, this runs from my home directory /home/thomas/.mythtv/config.xml so:

sudo ln -s /home/thomas/.mythtv/config.xml /root/config.xml

Once you make this change, the next time the cronjob runs it should populate the motd correctly.

Notes: I’m running this server on Ubuntu 8.04.02 64-bit.

You can find more information on this issue here.

Oct 182008

I was trying to fix a friends computer recently.  It was a Windows XP machine which would boot up (in both normal and safe mode) and give the error with services.exe:

This application has failed to start because MSVCP60.dll was not found.  Re-installing the application may fix this problem.

And then completely stop loading.  This appeared to begin after a botched SP3 install through automatic updates.  None of the normal tricks for getting into windows would work, so I booted to a Ubuntu live CD (7.04) and took a look at the hard drive.

All of the information was still there, that was good news.  I found a copy of MSVCP60.dll on the harddrive, but it wasn’t in the c:windowssystem32 folder, and hence the error.  So I tried to copy it, but Ubuntu 7.04 Live CD cannot write to NTFS partitions.  Bummer.

So, I copied the file from another computer to a USB key, put that into the Live CD Ubuntu desktop, copied the file to the floppy, rebooted into Windows Recovery mode (from an old Win XP CD I had) and tried to copy the file from the floppy to the hard drive, however I was getting “Permission Denied” errors.

So, I took a look at the C: and sure enough, Windows Recovery Console could not read any files there.  Another bummer.

So, I started downloading a new version of Ubuntu (8.10 beta) in order to get read/write NTFS in the live CD.  While I was waiting, I thought I’d try to fix the boot sector on the broken machine.  I poked around for a bit.  Tried chkdsk but got an error about ‘one or more unrecoverable file system errors’.  Then the fixboot command looked interesting, so I ran it.


It said it fixed the boot sector, and threw a nice FAT16 table at the beginning, after autodetecting what it was.  Huh?  Now when I search the C:, I get a message, “No Files Found”.

So, when I finally got Ubuntu downloaded and burned, I rebooted and took a look at the partition.  Double click…and nothing.  Can’t read the media.  I opened it Gparted partition editor, and sure enough, a nice 300GB FAT16 partition that cannot be read.  Well at this point I began to get worried.

I decided to take the machine home for the night, as I had more tools available there.

I knew that there was a backup boot sector on the drive, and what I had to do was to restore that.  But with what?  I did some searching and came across TestDisk.  I had used this in the past to try and recover an ext3 partition, but with no success.  Then I started poking around at a rescue CD that included TestDisk.  Ubuntu Rescue Remix is one of the rescue disks I cam across.  I also download Knoppix, but URR finished sooner because it was a much smaller ISO, so my success was with that one. 😉

Booted on the rescue disk.  It gives you a nice console.  Ran:

sudo testdisk

And started to get to work.  The drive was detected properly, always a good start.  I then scanned for partitions, there were 3 listed (actually only one on the drive) in the table, and they overlapped, which is not possible.  The application knew something was wrong, and did a slightly deeper scan and detected one NTFS partition that took up the whole drive.  I wrote this information to the disk.

I think I actually had fixed it at this point, but I kept on poking around.  I went back to the main menu, and went to the advanced tools.  I took a look at the boot sector recovery.  The detection showed both the master and backup being the same.  Not sure if when I rewrote it, it rewrote the backup too (that would make sense), but after writing once, the backup seemed unavailable as an option.

I then scanned the MFT to rebuild it if needed, but it was identical to what the application was going to reinstall.  So nothing to do there.  I rewrote the boot sector again, and then rebooted. (Have to take the CD out at this point, the boot menu gives you the option to boot to the hard drive, but that wouldn’t work for me)

I rebooted and got this error:

This application has failed to start because MSVCP60.dll was not found.  Re-installing the application may fix this problem.

Yeah!!!  Windows lives.  So, I rebooted, went into the new Ubuntu Live CD (8.10 beta) I had burned earlier and tried to access the drive.  No go.  Windows didn’t let go of it properly when it locked up.  Which isn’t a surprise really.  Ubuntu told me what command to use to force it to mount:

sudo mount /dev/sda1 /media/testdisk -t ntfs-3g -o force

I’m pretty sure that was it (from memory now).  /media/testdisk is a directory I created in order to mount the drive.

Mount successful.  File copy successful.  Rebooted, and Windows loaded!

It looked horrible.  The graphics driver was missing, probably killed in the botched SP3 upgrade.  There were still file missing errors, but I was able to get to the desktop.  I copied the files that were missing from somewhere else on the drive, back to c:windowssystem32 to make those errors go away.  I tried to download new video drivers, but Flash was also corrupted beyond repair it crashed all of the browsers when they loaded. All the websites that had the drivers (and the default homepages) used flash.  So I uninstalled flash, download new flash, and video drivers, installed both, and all is good.

The moral of the story, NEVER USE FIXBOOT!