2009-12-12

renamed network interface eth0 to eth1

Miraculously, after my old server motherboard died, Ubuntu booted right up on the new board. The only problem I've run into so far is that since the new board's network interface had a different MAC address from my old eth0, udev decided to call it eth1.
Dec 11 00:54:16 hierax kernel: [   15.251176] udev: renamed network interface eth0 to eth1
I first noticed this when the system didn't get the static ip I had configured in /etc/network/interfaces.

2009-11-20

MythTV: Transcode to XviD and Add to Library

Before starting with MythTV, I already had a library of several TV series that I've been serving to an Xbox running XBMC over Samba, so I wanted the ability to configure certain shows to automatically be transcoded to XviD and moved into my library directory structure (below) and named with season number, episode number, and episode name. MythTV doesn't get the season and episode number from TV listings (at least not through Schedules Direct), so I found a Perl module to query The TVDB and cache results for me. I have some ideas on ways to improve it, but for now it works well enough.

2009-10-19

Getting Crayon off an LCD TV

My son has, on three separate occasions, found it necessary to write in crayon on my LCD TV. To be specific, this is a Samsung 46" LN-T4665F TFT LCD, and I've used this procedure three times since 2008-05 with no ill effects whatsoever. This isn't going to be quick, so set aside a fair amount of time.
Supplies:
  • Peanut Oil - I bought mine at the grocery store near the other cooking oils.
  • Window cleaner - I just use generic Target window cleaner.
  • Paper towels - If you're worried about scratching (I've never noticed any), use a few soft towels or cloths.

2009-10-15

Using Gmail with Postfix on Ubuntu

Postfix is a dependency of mdadm, but it took me a couple of separate attempts to get it configured to use Gmail as its SMTP relay. There are a lot of good Postfix tutorials out there, but this post will detail the steps I took for my particular situation. I'm currently running Ubuntu 11.10 Server 64-bit, so I needed mdadm to be able to send me notification emails, and I already had CA and server certs for Apache and ProFTP, so I'll skip those steps here.

2009-10-09

OpenGrok on Ubuntu w/ Tomcat6

A friend of mine turned me onto OpenGrok a couple of years ago, so when we migrated from CVS to SVN at work I set it up on one of our dev webapp servers to give my team a way to search the repository. The thing I like the most about it is that it does syntax highlighting of your source so you can easily browse without checking a project out into an IDE. There are a lot more advanced features, but that's the one I appreciate the most since I do a lot of browsing of legacy code.

2009-10-02

Activate the T-Mobile G1 without a data plan

I can't afford the data plan for my T-Mobile G1, and in fact I use prepay, but it's possible to use nearly all of its features with just wifi. When I first got the phone prior to the Cupcake firmware update, I had to borrow a friend's SIM that had been provisioned for data to accomplish this, but it seems Cupcake has made that unnecessary. Since my SIM never has been used for a data plan, I don't have to worry about using my prepaid minutes for data transfer, but your results may vary. Here's how to activate the G1, and likely the MyTouch 3G as well, without a data plan:

2009-09-25

Tomcat6 fails to deploy a war file

Tomcat can get confused. Today I dealt with an issue where Tomcat just wouldn't deploy a war file on one of our webapp servers, so the app was unavailable. The first symptom of the problem was a Tomcat 404 page.
type Status report
message /mywar/default
description The requested resource (/mywar/default) is not available.

2009-09-24

RAID1 on Ubuntu: Array fails to assemble on boot

A few days after getting my RAID1 devices running smoothly, I rebooted to apply some package updates, and the boot process stopped due to an e2fsck problem. Again.
e2fsck 1.41.4 (27-Jan-2009)
e2fsck: Invalid argument while trying to open /dev/md0

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

RAID1 problems: access beyond end of device

After getting my RAID1 arrays running on my Ubuntu server, I moved the case back into the crawlspace under the stairs and powered it on. Later I started up an SSH but the connection was denied. Great; I had to lug the thing back into the office to connect a monitor and keyboard. The boot process stopped due to a failed fsck with output similar to the following:
e2fsck 1.41.4 (27-Jan-2009)
The filesystem size (according to the superblock) is 244190000 blocks
The physical size of the device is 244189984 blocks
Either the superblock or the partition table is likely to be corrupt!

2009-09-23

Setting up RAID1 in Ubuntu

My Ubuntu server has been running for a few years with half a terabyte of photos, TV episodes, and MP3s served up by Samba and ProFTPD. When Glenn, a friend at work, let me know that Newegg had a coupon code bringing the low-power WD Green HDs of the 1TB variety under $80, I decided to buy a couple to upgrade storage and insure against disk failure for my precious audiobooks.
I love Newegg, but somehow neither drive would be recognized by hierax's BIOS nor my desktop's, so back they went. It cost me another $10 to send them back, but when I finally got a couple of good replacement drives, I setup the RAID1 array. It was a lot easier than I expected thanks to mdadm.