Panicking about not being about to find or mount your Samba share you’ve been blissfully backing up to over your network? Trying to restore to a new hard drive using the Leopard boot DVD?

I recently had the pleasure of a hard disk crash on my MacBook, and only a month earlier had started backing up to a Samba-share via Time Machine. I had the “how to restore” question nagging in the back of my head when I set it all up but I figured someone had it figured out, otherwise why would somanyarticles exist to show you how to set it up?

I’ve been trying to find out how people using the TMShowUnsupportedNetworkVolumes hack to use Time Machine on smbfs shares have been restoring and it would seem that the answer is “they aren’t”. That, or they’re simply using it as an “oops” fixer, restoring a file here and there.

When booting from the Leopard DVD, firing up the terminal and attempting to mount the share, the following delightful message shows up:

Searching for that was even more disappointing. Other people running into the issue, no solutions. It seems smb support is just not available on the boot DVD.

I ran into a possible solution, copy the Time Machine sparse bundle onto a removable hard disk, and hook it up to the laptop. Unfortunately all my external storage is formatted ReisferFS or ext3, neither are supported filesystems, and I didn’t feel like changing one just to fix this.

So in comes the hack. Luckily the Samba share is on an Ubuntu 9.04 (Jaunty) server, so adding support for something Apple does support on the boot DVD is tragically easy. This is a fairly specific solution, but variations on it will work for many different servers.

Enter AFP

Looking through the other available mount applications, we also have mount_afp available. This mounts Apple Filing Protocol-based shares, and it works too, bonus!

So it boils down to enabling AFP on the server and sharing the same volume via AFP. AFP on Linux (BSD, etc) is supplied by netatalk, and here’s a step-by-step of how I wrapped it all up.

Update

Just recently came back to this for a Snow Leopard restore, the directions are unchanged. The nice bonus is there have apparently been some optimizations during the restore, and an initial space calculation was practically instant. Nice.