It looks like Tropical Storm Ernesto is going to hit us tomorrow afternoon or evening. Everyone has been getting ready for it, securing their homes, stocking up on groceries, and buying gas. There are already long lines at gas stations and they’ve raised gas prices about 15 cents since a few days ago.
Linux
Server is working
My server is back up, running Ubuntu 6.0.6.
Server Trouble
When the power went out yesterday I was in the middle of upgrading my Linux box from Debian Sarge to Ubuntu 6.06. Unfortunately it was left in an inconsistent state, only able to boot to the console with no network access.
I’ve spent most of the morning backing up /home, /etc, and /usr/local to an external USB drive so I can do a clean install of Ubuntu. The Ubuntu install CD won’t recognize a reiserfs partition or software RAID devices, so it was unable to access my hard drive. I was able to gain access to the drive to back it up by booting from a Knoppix live CD. The backup is now about 75% finished.
Changing my religion
Text editors are like religions, inspiring bitter rivalries. The most intense rivalry is between vi & emacs. Although vi was the first Unix text editor I used, I soon discovered emacs and became an emacs fan. I feel at home in emacs and I instinctively use emacs keystrokes everywhere, which most Mac applications support.
However, I found that Linux-based devices like the LinkStation or the GP2X usually have vi but not emacs, which is understandable since emacs is huge and needs lots of elisp support files. Since I started hacking my LinkStation I’m now trying to break the emacs habit. I find that vi, in particular VIM, doesn’t suck too badly so I’m now using vi instead of emacs and I’m slowly getting used to it.
Say Bonjour to the LinkStation
The one thing missing from my LinkStation was the ability to access it by name, so I needed to add Bonjour support. I couldn’t find anything already available, so I built Howl, an open source implementation of mDNSResponder.
For anyone interested, I uploaded the MIPS version here. Since I have a MIPS-based LinkStation, that’s the only one I built. Of course you need to install OpenLink firmware before you can use it.
Improved Backup for the LinkStation
My LinkStation is running beautifully with the new firmware and NFS is especially nice, since it’s a lot faster than SMB, doesn’t have the long filename problems of AFP, and will remount after my powerbook wakes up from sleep.
The one problem I had with it is their built-in backup is very slow and unreliable. I also find that it often fails and leaves the disk write protected. Since my external USB backup drive is smaller than the 250G internal drive, at some point I’ll run out of space for backing up. I find that backing up to a gzipped tar archive solves both problems. It’s fairly easy to do by editing the crontab and replacing the do-backup.pl item with a tar command. I added the following commands using ‘crontab -e’:
15 2 * * Sat tar czf /mnt/usbdisk1/Backups/bkup-`date -I`.tgz /mnt/hda/share
25 3 1,15 * * find /mnt/usbdisk1/Backups/ -ctime 15 -exec rm -f {} \;
This creates a dated backup every Friday night/Saturday morning at 2:15 AM. The second command runs twice a month and deletes any backups more than two weeks old, to prevent it from filling up the drive.
Improving the LinkStation
While looking for the documentation for MT-DAAPD, which I just installed on my Linux server for iTunes sharing, I discovered that it can also be installed on a LinkStation from this LinkStation Wiki and I also discovered that alternate firmware is available for the Linkstation.
I didn’t install MT-DAAPD on my LinkStation, but I did install the OpenLink firmware, which among other things adds telnet & ssh access and allows additional software to be installed. With the new software I added SMART disk monitoring and an NFS server.
The NFS server works beautifully and is a big improvement over SMB & AFP.
New gp2x firmware & website
GP2X Firmware 1.4.0 is available and gp2x.com finally has a nice new English web site (actually it’s still more or less “engrish”). I installed the firmware update with no ill effects. The update only took a few seconds and I didn’t brick my GP2X.
The new firmware is a very big improvement. E-book reader has lots of improvements and Explorer is now useful – you can now move, rename, or delete files. The battery light works and it increases the battery life dramatically.
Fun with the GP2X
The GP2X has a pretty extensive set of Unix utilities, including find and even vi. Using STerm I was even able to create & edit a shell script in vi. If the shell script doesn’t end with cd /usr/gp2x; exec /usr/gp2x/gp2xmenu, the GP2X will simply hang with a black screen, as I discovered the hard way.