Windows Vista Recovery

Like many geeks, I’m the family tech support. Somehow my nephew’s Windows Vista laptop had stopped booting. You’d get the blue screen of death (BSoD) on boot. Using F8 on boot also resulted in a BSoD. I even tried using a Vista recovery disk and it too crashed and burned in the same way.

My first thought was to check that the hardware was ok. Running some diagnostics from an Ubuntu live CD indicated that side of things looked fine.

So I tracked down the Vista Install disks, maybe I’d need to do a full re-install or at least it’d give me a way to move forward. What? Another BSoD?! This time instead of ignoring the data on the BSoD I wrote some of it down, it the main error code was: 0x0000C1F5. Searching for this turns up the specific problem, there is even a Microsoft knowledge base article. Of course the fix that is supplied by Microsoft won’t help you until you can actually boot Vista again.

I though I could solve the issue using Linux as was described in one of the forums. While I could easily boot Linux and poke around, there was no sign of a $TxfLog log file. I suspect in this particular case there was some other file that was corrupted, but which one? A bit more digging around and I found another Microsoft knowledge base article.

This ended up being the solution: Windows 7 knows how to recover from this type of filesystem corruption. The knowledge base article suggests that you use a Windows 7 Beta installation disk – I wasn’t able to find one of these. What I did find was some Windows 7 recovery images, these will work for what we need to do.

Burn the image to a CD or DVD. Boot the Windows 7 Recovery disk to the point where it’s going to try to recover, now shut down and cancel the recovery. The Windows 7 Recovery disk should have repaired the Vista filesystem so we can now boot from the hard drive into recovery mode and the system will perform it’s “self repair” fixing things up.

So while the BSoD screen can be intimidating, taking a bit of time to read the screen and take note of some of the magic numbers can help guide you to the right solution. Or just call up the geek in your family and get them to fix it.

A mini-roundup of webmail software

Pretty much since having high speed internet at home I’ve had a machine externally accessible, initially through dynamic DNS and later via a static IP. Even prior to running a full mail server, I had a mail server setup to pull email using fetchmail from the couple of email sources I was using. Being able to access my email over the web was pretty handy, and I trusted SquirrelMail to provide this function.

Setting up SquirrelMail under Ubuntu is fairly straight forward, the packages are in the repositories and setup is a snap following the instructions. The version I have installed is a little dated but it handles email when I’m not home just fine, I particularly like the ability to setup alternate identities making sending email from an alias easy (actually easier than messing with aliases in Evolution).

The version of SquirrelMail I have isn’t really that slick on a small (mobile) screen. I looked at just installing the right theme/skin to SquirrelMail to support mobile browsers and there doesn’t seem to be any (free) solutions. This got me looking around.

First stop was NaSMail, a fork of SquirrelMail but apparently better for mobile. Long story short – NaSMail looks a lot like SquirrelMail, even on a mobile device. There is a mobile browser plugin – but it didn’t change very much of the look and feel. The install process was easy and things went smoothly.

Since NaSMail didn’t address what I was looking for it was back to searching around. RoundCube seems to have a strong following and there is a version in the Ubuntu repositories. Sadly the repository version is quite old and didn’t appear to be compatible with the theme I was trying to use.

Installing RoundCube from “source” was also quite easy, there was a howtoforge article which was useful. I got a bit hung up with something that turned out to be my error in the end – I had mixed up ‘username_domain‘ and ‘mail_domain‘ in the configuration file causing my IMAP logins to fail. Turning on some additional dovecot debug helped.

If you find yourself debugging IMAP login issues, the Ubuntu guide for postfix is a good resource. Basically you want to edit the /etc/dovecot/dovecot.conf file and add:

auth_debug=yes
auth_debug_passwords=yes

Then restart dovecot:

$ sudo /etc/init.d/dovecot restart

Then monitor the /var/log/mail.log output to see what’s going on.

So RoundCube is very pretty, but it completely fails on a mobile device as the UI expects double-click actions. You can manage to navigate if you are persistent but it’s a bigger barrier than my existing SquirrelMail setup. There are commercial mobile browser skins, but the only free one I found (MobileCube) was mostly a cosmetic change of the default. I will mention that the commercial skin cost is only $32 – probably less costly than the time I sunk into poking around. The double-click UI for RoundCube turned me off, I much prefer a web like single-click UI even when using a full browser.

My last stop on the webmail search is HastyMail. There is no Ubuntu support of this one, but installing from source is fairly straight forward and well documented. I will note that there is a site_key in the configuration file you’ll want to change for security purposes, I generated a new key using a web based password generator and would recommend you do something similar. The config file is human readable and is processed into a machine readable format, I found the command line version more convenient than the web – but both work fine.

HastyMail looks prettier than my existing SquirrelMail, appears to format nicer on mobile browsers (but not perfectly). The image at the top of this post is from my Android phone in landscape mode, I’ve blurred some details but there should be enough to get a sense for how it appears. It also has a ‘simple mode’ which is great for low bandwidth or low capability screens, this is captured in the second picture on the right. I wish there was a theme somewhere in between the default and simple modes, maybe I’ll poke at that sometime.

There are many other webmail options out there: AtMail, Xuheki, Horde, … For the most part they seems to target niches. Most people are migrating to hosted webmail (Gmail, Yahoo, MSN) or simply using the mail client on their mobile device.

8GB Memory Upgrade / PAE Mode

I’ve been doing more video processing lately, some of it HDTV quality, this was really demonstrating that 2GB was not nearly enough RAM for my system. Memory prices have dropped a lot since I did my frugal upgrade, at the time (early 2010) I spent $54 on a single 2GB stick. The other day I picked up 2x4GB for a mere $35 from CanadaComputers. Sure we’re now 2 years later, but to get four times the RAM for less?

In general I’ve had good luck with Patriot products, and looking at their warranty it looks like the have the standard limited lifetime warranty you’d expect.

My motherboard has 4 slots for RAM, so I could have left the 2GB stick in and added the two additional – but I decided against mixing things up. I figured 8GB was plenty for now, I can easily change my mind later. Installation was a snap, literally under 10mins including juggling all those cables.

Amazingly I got it right the first time, the BIOS showed me 8GB. Now as I’m running a 32bit version of Linux, I wasn’t surprised that the operating system couldn’t see all of my new RAM.

$ cat /proc/meminfo
MemTotal: 3482728 kB

So Linux can only see 3.3GB, I suspect why the value isn’t 4GB is due to the onboard video stealing some away from the OS.

The obvious upgrade path is to install the 64bit version of Ubuntu. It seems the smart path forward is to wipe and start again, however given that I’ve got a 1TB drive and it’s 60% full that’s going to be a long copy / install process. I mentioned this to a friend at work and he suggested that instead I use the PAE kernel, I’m glad he suggested it.

Physical Address Extension (PAE) is very easy to add to an existing 32bit Ubuntu installation. Assuming you’ve got a CPU that supports the feature (and with any current hardware you will), it’s a simple one line install.

$ sudo aptitude install linux-generic-pae linux-headers-generic-pae

After the install, a quick reboot and we’re running the new kernel. If you’re doing a clean install, recent versions of Ubuntu automatically add the PAE kernel if you’ve got enough RAM.

Now we can see all of the RAM

$ cat /proc/meminfo
MemTotal: 8072420 kB

This works out to 7.7GB, again some I believe is donated to the onboard video.

Why might you want to use PAE instead of running a 64bit version? If you elect to use 64bit mode, then all of your memory pointers need to be 64bits wide (aka double the 32bit size). This can cause some serious memory bloat depending on the type of application.

It should be no great surprise, but there is some work involved in getting applications to work in 64bit environments. For some applications, recompiling is all that is needed – however many have hidden dependencies on certain data structures being 32bit in size. It is for this reason that lots of software is still stuck back in 32bit – the mitigation is to run 32bit compatibility libraries.

With PAE, while the kernel can see all of the memory (up to 64GB) – each process is still limited to 32bit addressing (4GB max). You also miss out on some of the 64bit extensions to the instruction set, so you are leaving a little bit of performance on the table.

When I get around to doing a full wipe and re-install, I’ll likely move to a 64bit version of Ubuntu as it seems to be the recommended approach. I’m certainly glad I can put that off for a while longer and use PAE to get access to the increased memory with almost no effort.