zzamboni.org
Ideally Blue

zzamboni.org
Ideally Blue

These are the things I have written about

macosx

See all posts on posterous with this tag ยป
Jan 25 / 9:54am

Changing "message:" protocol handler from Sparrow back to Mail.app

After using Sparrow for a while, I have decided to switch back to Mail.app. However, even after setting my default email client to Mail.app, all my message: links (for example, from messages dragged from Mail.app into Things) were opening in Sparrow.

After some experimentation, I figured out what happened: I switched the default email client from Sparrow to Mail using Mail's preference panel:

Pastedgraphic-1

Apparently this switches the application for the mailto: protocol, but not for message:, nor for .eml files. The solution was to use Sparrow's preference panel to set it again as the default email client, and then disable it. Then Sparrow correctly sets all the protocol handlers back to their default values.

Pastedgraphic-2
Filed under  //  macosx   mail   sparrow   tips  
Dec 15 / 12:07am

Fix journal in an HFS+ file system

Yesterday my external Western Digital disk (which I use for Time Machine, among other things) stopped mounting automatically when I plug it in. This may *cough*definitely*cough*have something to do with me unmounting it forcefully while it was doing a backup, since I was in a hurry.

Disk Utility reported everything was OK with the disk, but it still failed to mount. Upon poking a bit deeper, I found these messages in the logs:

12/14/11 11:49:00.000 PM kernel: jnl: disk2s2: open: journal magic is bad (0x0 != 0x4a4e4c78)
12/14/11 11:49:00.000 PM kernel: hfs: late jnl init: failed to open/create the journal (retval 0).
12/14/11 11:49:00.000 PM kernel: hfs_mounthfsplus: hfs_late_journal_init returned (0)
12/14/11 11:49:00.000 PM kernel: hfs_mounthfsplus: encountered errorr (22)
12/14/11 11:49:00.000 PM kernel: hfs_mountfs: encountered failure 22 
12/14/11 11:49:00.000 PM kernel: hfs_mount: hfs_mountfs returned 22

Aha! Journal error. A bit of Google searching led me to this page, where one comment gave me the key:

root# mkdir /tmp/disk && mount_hfs -j /dev/disk2s2 /tmp/disk
root# diskutil disableJournal /tmp/disk
An error occurred journaling the file system: The underlying task reported failure on exit (-69860)
root# diskutil enableJournal /tmp/disk
Journaling was already enabled for volume Casa on disk2s2
root# diskutil unmount /tmp/disk
Volume Casa on disk2s2 unmounted

Despite the error in the "disableJournal" command, after this sequence the Finder was able to mount the disk, and things seem to be working fine. The trick in the first command is the -j option, since it allows the disk to be mounted (without journaling), so that the disableJournal/enableJournal commands can be issued.
Filed under  //  diskutil   hfs   macosx   tips