New Software Released

I released a bunch of software related to a message passing middle-ware that I developed at work. My employer, Impact Technologies, agreed to release the code. I call the middle-wave iobroker. iobroker uses a post/subscribe mechanism and passes around arbitrary sized messages. Each message is given a class-id which is an arbitrary string. Clients subscribe using regular expressions telling the server what messages they are interested in receiving. When a message arrives matching a subscription the server forwards the message to the client. Communication is through UNIX sockets or via TCP or both. I’ve also released a number of supporting libraries. The support libraries all have BSD licenses while the iobroker server is licensed using GPL v2. See the software page for more info and to download the code.

Posted in Misc | Leave a comment

Grubs configfile Option

I recently learned about Grubs configfile option. At first it doesn’t seem very interesting but it solves an interesting problem. Suppose you have multiple installations of Linux on your system all on different partitions. Ideally they would all work together seamlessly and update one grub menu.lst file. But if you have them on different partitions that won’t happen. There are a lot of reasons why something like that is difficult. Enter configfile to save the day.

To solve this problem you could make one partition exclusively for grub. You would install grub to the master boot record and install the stage 1.5 files to this tiny grub partition. In that tiny partition you would have a menu.lst file that would call out all of your other installs. It’s similar to using chainloading but it’s not quite the same. You’d only have to edit this master menu.lst whenever you added a new OS. Here’s a contrived example:

title Debian Lenny configfile (hd0,1)/boot/grub/menu.lst title Ubuntu configfile (hd0,2)/boot/grub/menu.lst

You could do something similar using a chainloading approach and installing grub as the local boot record in each of your OSes but this way you have just one installation of grub to deal with.

Posted in Geek, Tips | Leave a comment

Virtual Box Fails to Install Debian

I recently attempted to install Debian 5 using the latest net install iso image using Virtual Box (the commercial/non-open source version). The installs kept failing. I finally tracked it down to not having enough RAM available. 256MB was not enough but bumping the virtual machine setting to 512MB did the trick.

Posted in Geek, Tips | Leave a comment

Evolution Gets out of Sync

(This tip provided by John Ghidiu)
Sometimes evolution will be out of sync with the exchange server. As I write this it’s a known problem. The workaround is to force evolution to shutdown and then force it to rebuild the local folder cache.

It seems that Evolution getting out of sync with Exchange is an old, old bug. If you run:

evolution –force-shutdown
rm -rf ~/.evolution/exchange//folders.db (this is the cache, I think)

and then start Evolution again, things work again.

Posted in Geek, Tips | Leave a comment

Forcing fsck On Next Reboot

My file server appeared to have some filesystem issues. I wanted to check and repair the filesystem but I couldn’t find my system rescue CD on a USB stick. I considered rebooting the machine 30 times to force a check but that didn’t seem like a fun way to spend my time. The filesystem is the root filesystem and it is xfs which meant that I couldn’t use `tune2fs` to set the property to force a fsck.

Today I learned of a very easy way to force a file system check. That is to create a file /forcefsck. The startup scripts in the initial ramdisk will check the filesystem and remove the file.

Posted in Geek, Tips | Leave a comment

When rpc.statd Hangs

It seems that every time I setup a diskless Linux machine I run into the same problem — nfs mounts hang. I’m not talking about the root filesystem. That mounts fine but other mount points result in mount hanging. Then I track the problem down to rpc.statd and portmap hanging. I also end up coming back to my blog to search for the answer to this problem and get frustrated when I can’t find the answer that to a problem that I’ve solved over and over. So, once and for all, I present the solution to the problem that I know I’ll encounter again.

The problem is that the localhost interface is not defined in /etc/network/interfaces and this causes problems (I do not know why) with the nfs/rpc tools. When I setup diskless machines I use debootstrap to create a root file system. Debootstrap correctly leaves a few things unconfigured. The localhost interface is one of them. And so I say to my future self, “self, just add this to /etc/network/interfaces and all will be well. And calm down this isn’t a big deal!” :

# The loopback interface
auto lo
iface lo inet loopback
Posted in Geek, Tips | Leave a comment

Shuttle SD11G5 Not Fast Enough for 720p

I’ve had an excellent setup using MythTV and a VIA M10000 based system. The M10000 is the frontend which has a 1Ghz VIA chip and onboard hardware support for mpeg2 decoding. When watching TV shows that I recorded using an analog tuner card the system showed about 10% CPU utilization! It was perfect…until digital TV arrived.

Actually the M10000 is fine for digital television if the resolution is in the standard def ranges. 720p content and 1080i content it can not handle in real time. This is because the hardware MPEG decoding is limited to a maximum resolution which the HDTV broadcasts exceed. The onboard CPU isn’t nearly powerful enough to decode the content in real time.

I decided to move my desktop system, a 2Ghz Pentium-M based SD11G5 from Shuttle, downstairs to be my new myth frontend. At the same time I decided to get rid of the Myth frontend software and instead use XBMC. I did some tests and it seemed like it would work perfectly.

Once I got everything setup I found that things did not work perfectly. My testing was with 1080i broadcasts which I assumed would be more taxing on the system than 720p broadcasts. I was wrong. The system can handle 1080i just fine but it can not keep up with 720p. This must be due to the frame rate.

I now have a dual core atom system with an NVIDIA video card. Using XBMC with VDPAU support I should be able to decode anything I throw at the system. I’ve built the system but I haven’t setup XBMC for it yet. I’ll report out when I get that fully functioning.

Posted in Geek, MythTV | Leave a comment

Placing Packages On Hold

Sometimes you need to update packages on a Debian based system but you don’t want to updated all of them. For example there are security updates available right now for a system I manage. One of those updates is the linux kernel. I’m not ready to upgrade the kernel because it is a remote machine that many people depend on. To do a kernel upgrade I need to schedule downtime and prepare for the case when the system doesn’t reboot after the upgrade.

With Debian based systems you can handle this by placing packages on hold. Packages that are on hold are not updated. If you use aptitude this is as easy as:

# aptitude hold

If you use apt-get you can accomplish the same thing with:

# echo hold | dpkg –set-selections

When you are ready to update the package you can take it off of hold with (for aptitude):

# aptitude unhold

And for apt-get/dpkg it is accomplished by:

# echo install | dpkg –set-selections

Continue reading

Posted in Misc | Leave a comment

Tcl-dox 0.8.3 Available

0.8.3 is my final release.

I am no longer maintaining tcl-dox. It started as a fun experiment but I’ve lost interest. Tcl-dox is highly error prone and difficult to maintain because it is based on regular expressions. I may work on
a new version of tcl-dox that uses libtcl and the Tcl_ParseCommand function to do far more robust and reliable translations. …But time is scarce and I can’t promise that I’ll ever get around to that.

If you wish to take over tcl-dox please let me know. I’ll post about it here so any existing tcl-dox users can easily find the new home.

This release fixes a couple of very minor issues. I can’t promise that this release is any better than the others.

Posted in Software | Leave a comment

DOS to UNIX using tr

All too frequently I need to convert text files with DOS line endings to UNIX line endings.  It’s easy to do using tr but I can never remember the syntax.   The following strips the carriage returns (r) and end-of-file characters (^z) from the file:

$ tr -d '1532'  unixfile.txt
Posted in Geek, Tips | Leave a comment