Anandtech published a guide a few days ago on installing and using MythTV, a Tivo-like program that you can install for free on a PC to record TV programs.
‘Course they should probably have used KnoppMyth instead and saved themselves some hassle!
Category Archives: Linux
Grip – ripping CDs
When using Grip to rip your CDs make sure to click the “Config->Misc->Do not lowercase filenames” box. Otherwise you get lame filenames.
Linux I/O Redirection
Silly me! I *always* forget that “2>&1” is how you redirect the error channel to standard output! I don’t use it very often so here it is when i want to use it again in a few months time!
Moving to Fedora Core 2
I arrived into work on Friday morning to find my machine hung and in need of a reboot. With some regret at the lost uptime of my desktop machine I flipped the switch on the case and watched the bootup. Disaster! The 2 drives on the first IDE channel failed to show! After much cursing and general worry I tried again and this time the BIOS booted fine! Woohoo!
This morning, almost the same thing happened. I checked my mail, loaded up the dozen tabs I needed for a fix of information in the morning and suddenly my browser died. Then went Thunderbird. At the same time my machine got a lot quieter and I guessed I had disk problems again!
I brought it back to life again and managed to get everything off it and used the opportunity to install Fedora Core 2.
I installed apt from freshrpms.net but fedora.us looks like a better apt-ge trepository, if for no other reason than it has “Window Maker” rpms! Gnome and Nautilaus were way too slow on my humble machine!
If you’re upgrading from an earlier RedHat release, make sure you update the fonts your apps use. I copied over my Mozilla and Thunderbird directories and they still used “serif” and “sans serif”. Once I updated them to the “Bitstream Vera” versions, as well as the monospace font too, everything looked much better! Now to download the xmms mp3 and mplayer rpms!
Later … Freshrpms has xmms-mp3 and mplayer. Fingers crossed that both repositories can co-exist!
Later Still … It seems to be fine. Don’t forget to install the Freshrpms GPG key too!
Hmm.. Why wasn’t my sound card detected?
Linux Demos!
Linux behind the magic of Shrek 2!
Well, well. Looks like Linux helped in the making of Shrek 2! I can’t help but wonder how much more bang-per-buck they would have got if they had used a new distribution with the 2.6 kernel, although the computers they used were rather beefy anyway!
Easy Automated Snapshot-Style Backups with Rsync
Have rsync, have RAID volume, have ssh connection to server. What’s the best way to back it up? Here’s one way. Use hard links to make “duplicate” archives of remote content with the minimum of wasted space.
I’ve adapted the idea with the following:
for t in `ls remote/`
do
for i in `ls remote/$t/`
do
export older=7
rm -fr remote/$t/$i/7
for n in `seq 6 1`
do
if [ ! -d remote/$t/$i/$n ]; then
mkdir -vp remote/$t/$i/$n
fi
mv remote/$t/$i/$n remote/$t/$i/$older
export older=$n
done
cp -al remote/$t/$i/0/. remote/$t/$i/1
done
donersync -v -v --progress -az --delete --exclude-from=exclude.txt -e 'ssh' www.example.com:/home/ remote/www/home/0/
rsync -v -v --progress -az --delete --exclude '*logs/*' -e 'ssh' www.example.com:/usr/local/apache/ remote/www/apache/0/
rsync -v -v --progress -az --delete --exclude-from=exclude.txt -e 'ssh' mail.example.com:/home/ remote/mail/home/0/
Using this script you can have multiple hosts (here we have www.example.com and mail.example.com) and multiple directories(/home and /usr/local/apache) on each host backed up.
This script and post will be updated as I refine the backup procedure.
Later… After reading through the linked article above, I see that the author uses a slightly different way of rotating the archive snapshots. Instead of re-using the oldest one, he creates a hard link copy of the latest snapshot, “0”, in the “1” snapshot. When rsync downloads changed files it “deletes before copying” so that the old file is preserved in “1”, but the new file is now in “0”. Read the “hard links” section of the above for more on how that works!
Here’s a diff of what I changed:
7,12c7,8
< if [ ! -d remote/$t/$i/7 ]; then
< mkdir -vp remote/$t/$i/7
< fi
<
< mv remote/$t/$i/7 remote/$t/$i/7.tmp
< for n in `seq 6 0`
---
> rm -fr remote/$t/$i/7
> for n in `seq 6 1`
20,21c16
< mv remote/$t/$i/7.tmp remote/$t/$i/0
< cp -al remote/$t/$i/1/. remote/$t/$i/0
---
> cp -al remote/$t/$i/0/. remote/$t/$i/1
Later Still… I found and installed Backuppc via delicious this morning and I’ve got it working. It uses the same idea of space saving hard links but also provides a web based interface to the backup and restore procedures. I think it can be automated and there are loads of other features I couldn’t possibly hope or wish to duplicate in a timely manner!
Installation is relatively well explained, even down to installing the required Perl modules from CPAN, but configuration is slightly harder. Just make sure to override the defaults in config.pl with config.pl in the $backupdir/pc/$host/config.pl file. That took som figuring out where that file was.
It’s already backed up two Windows machines and it’s working on a Linux box. Backup contents can be examined over the web and because it uses a “pool” mechanism, it can find duplicate files, even among different backups! That should save a lot of disk space and network bandwidth as time goes by!
First Post From Fedora Core 2
No, I don’t know yet if I’ve been hit by the WinXP/Kernel 2.6 bug but I do have the recovery commands written out in good old dead tree format just in case things go sideways when I reboot later.
First impressions? It’s buggy, a little. Nautilaus just crashed there and it’s not responding correctly yet (I’ll probably need to restart X), I had to enter the Oceanfree dns settings in /etc/resolv.conf as kppp didn’t pick them up from pppd for some reason (they appeared in /var/log/messages however), and when I first went online Mozilla and Moz FF both crashed when they received keyboard input. That seems to be solved now by restarting X (obviously, if you’re reading this!)
Later… Booting into XP seems to be OK!
Apart from that, it looks nice, the usual arial-type fonts are installed although they look bigger than FC1 but maybe that’s down to some tweaking I did previously in FC1.
The first thing to do of course is install apt, do an “update”, and install “xmms-mp3” as well as a few updates that are available.
Open Office works as well as can be expected, Gnucash is slightly updated but nothing new. I briefly played with the new spatial features of Nautilaus but it’s crashed now so that experimentation was short lived!
Is it worth upgrading from FC1? Probably not, especially if you have a Kernel 2.6 update for FC1 then you get all the speed improvements without the bugs. 🙂
Later Still… I’ve burned CDs, copied photos from my camera (it’s handy that a “camera” icon appears automagically now), and Nautilus seems to have settled down somewhat. It generates thumbnails of image folders really quickly, almost as quickly as WinXP, and certainly much faster than Gthumb (and Gthumb can use the same thumbnails AFAICS).
This is a handy tip for using the Gnome 2.6 GUI. Not obvious and terrible usability wise however:
You can type a file name into the new file selector.
Ctrl + L will open the filename box, with autocomplete and all.
Fedora Core 2 and WinXP Problems?
Looks like a fairly major bug in Fedora Core 2 from RedHat. If you have WinXP installed before you install FC2 grub, or something, will destroy your partition table and possibly other data. There are a few solutions mentioned on the page above and there’s more on slashdot and the Fedora Test mailing list. I think I’ll hold off a few days before trying this release.
Fedora Core 2 – May 18th Release?
Today is the day when Fedora Core 2 is released. The Irish mirrors I’ve tried have the “2” directory but they’re off-limits right now. Thankfully the official
Bittorrent for Fedora is alive and I’m getting reasonable download speeds!
Anyone got reviews of the release?
Later… Yay! mirrors are up and running!