torarnv / sparsebundlefs

FUSE filesystem for reading macOS sparse-bundle disk images
BSD 2-Clause "Simplified" License
330 stars 38 forks source link

Support for sparseimages (not just sparsebundles) #7

Closed aurajamming closed 3 years ago

aurajamming commented 11 years ago

When I attempt to load my sparseimage backup of my old macbook, sparsebundlefs doesn't seem to recognize it as containing anything:

root@cola-debian:/home/jim/software/sparsebundlefs# ./sparsebundlefs /media/mediadrive/public/MBP\ image.sparseimage /mnt -s -f -D
sparsebundlefs: initialized /media/mediadrive/public/MBP\ image.sparseimage, band size 0, total size 0

The sparseimage file is 157 GB - not empty :) It mounts fine in OS X 10.7.

What can I do to determine the error?

laduke commented 11 years ago

I'm having the same problem. I tried it on a sparebundle and it works fine. But it won't mount my sparseimage, which it probably isn't designed to do. I can't find anything else though :(

torarnv commented 11 years ago

Hmm, @jmeier, can you post the content of the plist file inside the sparsebundle?

torarnv commented 11 years ago

@laduke Does it report band size 0 for you as well?

aurajamming commented 11 years ago

I no longer have a working mac to access the image, so this information is from opening it in TransMac. Transmac shows that it contains an HFS+ volume, and in that volume's root directory I don't see an obvious plist file.

Note again that this is a sparseimage file, not a sparsebundle, which @laduke points out sparsebundlefs isn't likely to be built for at all. Are they likely to be similar enough to add the functionality?

Also, do you have any documentation on the formats? Apple doesn't seem to have documented them anywhere.

torarnv commented 11 years ago

Ah, I see. Sparseimages are not supported. Not sure how easy it would be support them, but I will have a look when I have some free cycles.

The sparsebundle format was reverse-engineered, so the code is probably as close to a documentation as you'll get.

norpol commented 7 years ago

Since this is still open, and people might still have trouble accessing their data, I'm dropping this workaround here.

I ended up using OSX-KVM. Best performance I could get was by:

Speed Method
30 MB/s HTTP attach + smb server running on osx + piping on linux from smb to > /dev/null
15 MB/s HTTP attach + rsync to nfs share (probably disk io/network penalty)
02 MB/s sshfs attach + rsync to sshfs

smb-way doesn't keep the permissions, but the modification dates should be preserved.

You can mount the OSX SMB share on Linux via. (requires cifs-utils package on Debian). Especially useful if you only need to access certain files quickly. sudo mount.cifs //osx-kvm/share /mnt/share -o user=admin,pass=

If you are completely lost, try pinging me.

torarnv commented 7 years ago

Thanks for the workaround @norpol!

torarnv commented 3 years ago

Added logic in 5df6fce to error out early if we detect that a sparseimage is opened. Sparse images are an entirely different format, so handling them in this project is unfortunately out of scope. Sorry 😢