I started doing something last weekend I always swore I’d never do — upgrade MythTV on my Mini ITX.
Normally, the process wouldn’t be hard, except that I’ve built a custom image that is running on a solid-state flash disk that is only 256 mb in size. And yes, it’s Gentoo. It doesn’t have a full blown Gentoo install, of course, but it’s certainly a very stripped down version of one. I’ve had the image on there for probably a year and a half or more, and have been extremely content to just leave it alone as it works just fine.
As time goes on, though, I’ve been hacking on MythVideo a bit here and there, adding a few tweaks to suit my needs. This weekend I finally got another navigation one hammered out that took me a few hours to figure out due to my lack of C++/Qt programming skills. It was worth it though — it was one annoying UI decision I didn’t like (I won’t go in details, but it’s how the menu position is selected when navigating back and forth through the video gallery).
The problem is that making any kind of changes to the Mini’s image is always a pain for a couple of reasons. For one, if I screw something up badly, it’s a bit difficult to get into the box. I don’t have a USB bootable stick laying around, and in fact I’ve never had much luck getting one to work .. and I don’t think this box will boot off of one anyway. Not sure. That means if something really goes haywire then I have to boot over the network, which is a bit of a pain to setup sometimes. Fortunately, it didn’t come to that this time.
Another issue is that because space is so limited, part of the filesystem is loaded from a read-only squashfs image. That means a bit of tedious testing when it comes to unpacking the image, removing the old files, adding the new ones in place, repacking it, remounting it, and restarting the application each time just to test anything. That adds a lot of time to the process.
This time around, I did something pretty smart, in my opinion. I don’t know why I didn’t think of this before. The squashfs image is loading /usr/lib. This time, I installed Myth to /usr/local so that I could leave the libraries alone and replace MythTV easily. Just create a new image for that one, and drop it in anytime.
Anyway, tonight I just barely got it working with the new install. I went from a very old 0.20 install to the latest 0.21 in portage (0.21_p19961). In fact, one of the reasons I had to upgrade is because I can’t even get 0.20 to compile anymore. Normally I wouldn’t care, but I figure I may want to write more patches, and it’s getting to be painful trying to maintain an older version that I can’t even duplicate in case of a problem.
One other nice thing that’s changed since I last built this is I have my still-somewhat-newish ThinkPad to build it on. So I just build the binaries on my x86 laptop, strip out all the crap I don’t need or want, create a new squash image, and drop it right in. Relatively speaking, it has all gone rather smoothly. I think I’ve probably spent about 20 hours on it since Sunday. I vaguely recall it taking at least two weeks the first time I put it together. And of course, it took me something like three months to even get X, Qt, LIRC and all the other stuff on such a small bootable image. That was a really bumpy ride, but I wouldn’t trade the knowledge to do it for anything.
That’s the other thing — I could *easily* spend less than $20 and get double the harddrive space (512MB) and be able to forego half the problems. Or, I could even spend another $20 and get a 1 or 2 GB drive and have a *lot* of room to play around in. Oddly enough, I’m really going against my normal approach and instead of throwing money at the problem, I’m taking it as a matter of pride that I can endure so much pain and still get it on such a small drive. And really, I don’t need the extra space anyway. Once it’s done, it’s done and done. It’ll be just like before, where I’ll leave it alone for 18 months or more, and I’ll be completely happy with it the whole time.
Just for the record, here’s the harddrive current status. I managed to clean up a lot of cruft this time around and freed up a lot of space:
Filesystem Size Used Avail Use% Mounted on /dev/hda1 238M 184M 42M 82% / udev 10M 60K 10M 1% /dev /usr/usr.lib.img 36M 36M 0 100% /usr/lib /usr/usr.local.img 18M 18M 0 100% /usr/local shm 474M 0 474M 0% /dev/shm svcdir 2.0M 116K 1.9M 6% /var/lib/init.d //willy/media 1.4T 624G 726G 47% /var/media
And finally, here’s what the menu currently looks like … still unpatched, and with the default theme. That’s for another day. I’ll cover what the patch changes, too. Someone may find it useful. In the meantime, I think it’s time to try and catch up on sleep. I’m really tired.
Oh, and those icons are from the gartoon theme set.