Latest Mac OSX Blunder

In the things-which-demonstrate-mac-is-not-strictly-better-than-windows category, I have had the latest of such issues. In this case, I found on two occasions recently that the keyboard and mouse built into my macbook pro suddenly stopped working.

It appeared that the laptop was frozen, though it wasn’t. The power button brought up the shutdown dialog (which of course I couldn’t do anything with since the keyboard and mouse weren’t working). I did find that if I attached a USB keyboard/mouse, they would work. But in this case, even the “Windows” fix didn’t correct the problem. That is, even after rebooting, the keyboard and mouse continued to not work. After an hour or so of looking around for the solution, I discovered I had to reset the PRAM, which is part of the power functionality. Apparently, the laptop was in a quasi-confused state where it was powering most of the laptop, but ignoring the keyboard and mouse.

So I figured that would be it, and I wouldn’t see this again. But within 24 hours, the laptop did the same thing. Thankfully, this time I recognized it quicker, and it only took me 45 minutes to re-find a webpage where I could re-learn how to reset the PRAM. Granted, those 45 minutes were supposed to be minutes I was sleeping, but we won’t split hairs. Thankfully, the 36 hours since it hasn’t happened, but I’m just waiting for it to happen again. Unfortunately, when it does happen, the fix involves rebooting the laptop, thus losing any sessions you are building up.

For reference, to reset the PRAM (at least on the model MBP that I have), do the following: reboot the laptop. While it reboots, hold down the command key, option key, the ‘p’ key, and the ‘r’ key. Continue holding them down until you hear the second booting chime. Release the keys, and at this point the laptop will boot normally.

Sadly, this is only a corrective action, not a preventative one. Who knows how often I will have to do this. Hopefully, it won’t happen to you.

Cabling our house…

So this week I’ve been working on re-cabling our phone jacks to be Ethernet jacks. Since we get our internet through the cable company, use an VoIP phone, and wireless handsets throughout the house, we had no particular use for the phone jacks in the house.

At the same time, I do run many computers throughout the house, and while wireless was an OK option, it really wasn’t reliable enough for running the server from, meaning we had to put the server with the wireless router. This was a bit of a problem, as I’d like the wireless router in the higher floors of the house, and the server in the basement, where it’s noise and heat won’t be an issue. Similarly, I’d like to stream video and audio throughout the house, and wireless really isn’t the best option for this.

Continue reading “Cabling our house…”

Mutt error message: "Message XXX UID YYY less than ZZZ"

If you are constantly getting this error message in Mutt (seemingly every time Mutt checks for new messages, or you change folders), then I may have a solution for you. You see, when I tried to lookup this message, I found two things:

  • Pages saying the message was harmless and to be ignored
  • Pages giving a technical explanation of the error message (which also tend to fall in the first category too)

Two pages in particular are this one from the Pine users group, and this one from the IMAP FAQs which give technical explanations. Basically, the UID’s must be increasing in a mailbox, and someone detected a dis-order. Typically, clients take the opportunity to re-order the UIDs to correct the problem.

But in my Mutt instance, this persisted restarting the client, moving messages, and more. I could not get the message to go away. After understanding the technical side, I went to find the problem. But I couldn’t find it. It did not occur in the mailboxes themselves.

Finally, I realized it had to do with the header cache. I deleted the header cache, and now I don’t have the error message anymore.

Good Luck!

Migrating to a new hard drive

My laptop hard drive started showing symptoms of potential failure, so I made the decision to migrate to a new hard drive. However, since much of the windows software comes pre-installed and without a good installation disk, I needed to do so without having to re-install software.

Additionally, my laptop does not have an internal CD/DVD drive, and won’t boot off an external one unless you get the (extra-priced) one blessed by the manufacturer. Furthermore, it’s a laptop, and does not have extra IDE slots to simply plug in the new drive to do a drive copy. And finally, I did not initially have a cable to enable me to plug in a drive as an external USB device. The second time I did this I used that cable, and it did simplify things a bit.

Next I’ll describe a few pre-requisites and assumptions, then give a summary of the solution. Afterwards I’ll go into details on a few of the steps.

Continue reading “Migrating to a new hard drive”

Restoring email from cache

As some of you know, about a month and a half ago my server hard-drive crashed, and I lost all my data on the drive, most of which was un-backed-up.
One of the more important things I lost was my email archive. This included all email in the last two years, since I stopped using gmail. (I was using imap to keep the email synchronized across all my mail clients on different computers). The silver lining of this was that I was able to recover some fraction of my email (mainly from my inbox) by using the cache my email client maintains to make re-reading emails more efficient.

This post should serve as a simple how-to. It’s actually quite simple if you had my setup. So — using Mutt as my mail client, I have a great deal of control over the way its configured. One of the configuration items was to use a message cache:

set message_cachedir = "~/.mutt/imapcache"

This meant that as I read emails, they were downloaded to the computer I was reading them from, and saved in a file under my home directory, in the .mutt/imapcache directory. It was using a separate folder to store email from each remote mail folder. So, to restore them, all I needed to do once I had my new mail server up-and-running was:

  1. concatenate all the emails into a single file (cat * > ~/tempfolder)
  2. open the new “folder” from within mutt (<change-folder> ~/tempfolder)
  3. tag all the messages and save them to the appropriate folder on the remove server

The real trick is that each message is being stored in a standard format. Then, concatenating them together creates a mailbox format called mbox, making it easy to access them all at once. Then the mutt mail client can use imap to store them back on the remote server.

In my case, I was able to repeat this from each computer I use to read mail — there were about 3 of them. I was able to recover about half of my inbox, and a few other assorted messages which had been read recently. Not as good as having backups, but better than nothing!