Can I use FUSE to install a block device ("/dev/(r)disk") on macOS?

123 views
Skip to first unread message

Thomas Tempelmann

unread,
Jun 14, 2020, 6:20:59 AM6/14/20
to OSXFUSE
See my related question on StackOverflow.

I have a custom disk image format which I want to be able to mount on macOS. The image contains "regular" file systems, so that's not what I'd need FUSE for.

But since the format is not understood by hdimount, I need to run my own "driver" that delivers the raw sectors as a /dev/disk device.

Can FUSE help with that? Are there any code examples?

Sam Moffatt

unread,
Jun 14, 2020, 11:57:24 PM6/14/20
to osxfus...@googlegroups.com
Hi Thomas,

I don’t think that FUSE is a good fit because it’s designed to expose filesystems. What you’re looking to do is expose a block device to the operating system to work with. With some work you might be able to do that with FUSE but the performance would be horrific to do it this way due to the context switches necessary to go into the FUSE filesystem and back. 

I think you’d be better served looking at IOKit to handle what you need. 

Cheers,

Sam

--
Sam Moffatt

Note: I'm not at my desk, responses may be delayed. Apologies for the typos, smartphones aren't all that smart. 


On Jun 14, 2020, at 3:21 AM, Thomas Tempelmann <tempe...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "OSXFUSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-grou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osxfuse-group/57ca0093-6c7a-4dff-89d4-c8f55009a84ao%40googlegroups.com.

Thomas Tempelmann

unread,
Jun 22, 2020, 7:35:33 AM6/22/20
to OSXFUSE
From looking at some docs about FUSE, I had the impression that there's a loopback device. And I believe that's what's used on Linux to make block drivers that feed from a file (i.e. disk images). I had hoped that MacFUSE would allow this as well. Could that be, or are you sure this isn't going to work?

Thomas Tempelmann

unread,
Jun 22, 2020, 7:37:55 AM6/22/20
to OSXFUSE
Also, performance is not much of an issue in my particular case, as this is for exceptional uses, i.e. not for "normal" operations.

Reply all
Reply to author
Forward
0 new messages