ubuntu thunderbird on external drive

Ubuntu circle of friends

This ALSO falls into the "anything else that strikes me as interesting to write about" category. I've no intention of this becoming a Linux-oriented blog, but this problem kept me off-line, except for my smart-phone, for over a week. Again, I want people Googling for this problem to find this!

It's about installing an external hard drive for data on a Ubuntu system. I have spent a week thinking mounting was a problem, and/or Thunderbird had a problem, and it was neither, but a problem with the drive itself, which needed a good fscking.

On my old XP netbook that was dying, all my data was on an external drive, including Firefox and Thunderbird profiles. I am talking over 100,000 files, most of it text - ALL my files including stuff I wrote 2 decades ago! This is a precious hard drive!

So when I had Ubuntu installed and working and my netbook was flakier than ever, sometimes not booting at all, I moved the drive over. Having done that, I ran the profile manager in both Firefox and Thunderbird and pointed to my profiles, and for a few minutes, it looked great.

I began having problems right away, so installed Chrome to replace Firefox (Chrome is what I'd been using for some time anyways before deciding to move boxes and OSes).

But not having email work was not acceptable! I nag people to email me instead of calling cause of disability, it's hard to me to get to the phone. So... the Lowe's delivery coming up, my milkman, the agency that provides home health aids, my prescriptions, my doctors - all are banished to email. And I can't get to my email!

Thunderbird worked for a variable amount of time every time I freshly booted, then broke. Here's what the symptoms were:

  • Thunderbird would download a bunch of messages and then some time later, tell me it couldn't download messages due to either no disk space or a virus.
  • Thunderbird would sometimes keep downloading just fine, but give me errors on running my filters, telling me I didn't have write permission to my trash.
  • Thunderbird would sometimes suddenly not let me delete messages, even when I'd done so before.
  • If Thunderbird was acting up and I shut it down, I couldn't reopen it until it I rebooted. The lock file was stuck in my profile, I couldn't delete it from either the terminal or Nautilus even running as root. I got an error message telling me it was a read-only disk.

Googling about Thunderbird problems, I found the standard advice to compact your files (which I have set to happen automatically anyways) and to delete all the *.msf files and let Thunderbird rebuild them. I could not delete these files, again a permissions problem!

The drive I am trying to access is a FAT32 drive, so there's no way to set file permissions except upon mounting. So I spent much time learning various ways to mount, via Nautilus, automatically (it's a USB drive, thus can be mounted like a USB stick) and on boot via the /etc/fstab file. I now know much more than I ever wanted to know about any of these.

The big frustration is that even in Nautilus or Terminal, I'd get these error messages telling me the drive was read-only even though I could run the mount command and it clearly said it was mounted read-write. What the fsck? (That's a BIG hint!)

After learning much more about mounting than I ever wanted to (which sounds vaguely dirty), I ran across this interesting piece of information... if Linux has a problem reading a drive, it will REMOUNT it as read-only, but this doesn't show when you run the mount command, which shows you what is in your fstab. So it kept SAYING it was mounted read-write, but it wasn't telling me that the OS had remounted it as read-only!

This makes PERFECT sense, in that if a drive is corrupted, you'd want it read-only so you could save your files. Also, apparently Linux is pickier about data integrity than Windows, so my drive worked fine attached to my XP netbook, but puked all over Thunderbird on the Ubuntu laptop.

So step one was to leave it read-only and backup every file off that sucker. As it happened, I had done a backup a week or so ago prior to deciding to move the new box, given that the netbook was being so flaky. So there wasn't a whole lot to backup, but I decided to be nervous and backed it ALL up again as I don't know enough to get fancy just yet.

And step two was, as hubby messaged me when I told him what the problem was, "You're fsck'ed." Heh! Why DOES everything Linux-y sound vaguely dirty anyways?

So I ran fsck on the external drive overnight last night and today I have email that works! No more mounting and rebooting!

If the problems reoccur, I'll move all those files onto the laptop hard drive and lose the external. This has a decent harddrive, unlike the netbook, so no biggie.

The BIG problem was that when mounting, remoutning and rebooting constantly, I had no computer for a week. My phone was the most reliable computer, but without real software, keyboard and mouse, it was pretty limited.

FSCK YOU Ubuntu! ;)

P.S. I wrote this post in gedit and posted via Blogger on Chrome - all on Ubuntu. I'm getting there!

References I found useful for my problem: