The recent update to HAL available for Ubuntu Dapper seems to break USB mass storage device automounting. The broken version is
0.5.7-1ubuntu18.2. (Oops – no it doesn’t… see below).
I haven’t figured out why yet (I will post when/if I do) (ahem), but here’s how to downgrade if you’re affected by this and don’t want to wait on a fix. (But this bit might still be useful if you ever need to downgrade apt packages and fix them to a specific version while waiting for a fix that you really need.)
Run the following command as root:
apt-get install hal=0.5.7-1ubuntu18 \ libhal1=0.5.7-1ubuntu18 \ libhal-storage1=0.5.7-1ubuntu18
You’ll need to reboot. You can use an entry in
/etc/apt/preferences to keep these packages to this version until new packages that don’t break HAL are available. Create that file if it doesn’t exist and add the following lines:
Package: hal Pin: version 0.5.7-1ubuntu18 Pin-Priority: 1000 Package: libhal1 Pin: version 0.5.7-1ubuntu18 Pin-Priority: 1000 Package: libhal-storage1 Pin: version 0.5.7-1ubuntu18 Pin-Priority: 1000
You should really read
man 5 apt_preferences, and you should monitor what updates to these packages become available. I can’t guarantee that keeping these packages at this version won’t break anything else.
I have to say that this has soured me a little on Ubuntu. One of the reasons I chose this distro was because I don’t have anything like as much time to myself as I once did and I don’t want to spend what time I do have troubleshooting minor conifg issues like this on my machine, and Ubuntu has a reputation as a very stable, well maintained distro. USB drive automounting might not sound like a very important feature, but it’s this kind of thing that will put off non-technical users, or even technical ones with small kids and short tempers. Still, I’ll try and look into this problem and maybe file a bug report if no one else has already.
Update 11th December 2006
I now regret writing that last paragraph. To be honest I had misgivings almost immediately after posting it as I thought it a bit harsh but I decided to leave it. Anyway, I have now found that the upgrade did not break USB automounting at all – it was the device I was using to test it. My fault. PEBKAC. The device in question is my Sony Ericsson mobile phone, a K750i. Quite a nice phone, but it is a little temperamental at times – prone to occasional crashes and lockups. Normally this gets mounted as a mass storage device when I plug it in as it contains a 128MB Memory Stick Duo, but every so often it fails for reasons unknown (syslog just says
Device offlined - not ready after error recovery). Having done some reading up on the way that HAL, D-BUS, udev and gnome-volume-manager work I upgraded HAL again ready to start troubleshooting only to find that everything was working fine, then I encountered the error with my phone and all became clear. My CF card reader and Seagate external hard disk both work exactly as they should. The phone mounts most times, but occasionally fails. I think I’ll have less luck toubleshooting that than I would HAL et al. My apologies to Ubuntu for my unwarranted harsh words above.