GearHack

: :

Add Comment | Related Links | TrackBack
Related Content

Read/Write EXT2/EXT3 Volumes on Mac OS X

Wanting to share data on an EXT2 SD Card between Mac OS X and Linux computers, I started looking for way for Mac OS X to recognize EXT2/EXT3 volumes. The most promising solution I found is the fuse-ext2 Open Source software on SourceForge. After installing this software, I tried running it and received the following error message:

dyld: Library not loaded: /usr/local/lib/libfuse.2.dylib
Referenced from: /usr/local/bin/fuse-ext2
Reason: image not found
Trace/BPT trap

fuse-ext2 requires MacFuse. I did not install MacFuse, because I had installed MacFusion, which installs MacFuse already. But strangely, fuse-ext2 couldn't take advantage of that. After installing MacFuse that I downloaded from Google Code Base, fuse-ext2 ran without any problems. And inserting my EXT2 SD Card causes it to mount automatically--in read-only mode.

Read-only mode is worthless to me. I need read/write mode. But so far, I have been unsuccessfully to auto-mount read/write mode. I tried changing /etc/fstab using vifs, but that either didn't change the read-only behavior or the card doesn't even mount. Does anyone have an idea how to get fuse-ext2 to automatically mount in read/write mode?

One possible solution . . . Somehow, after installing fuse-ext2, the system auto-mounter would call "/System/Library/Filesystems/fuse-ext2.fs/fuse-ext2.util" for EXT2 and EXT3 volumes. But I could not find where that script is being called to change behavior. If anyone knows where that is being called, please respond.

Chieh Cheng
Fri, 26 Mar 2010 20:51:21 +0000

"/System/Library/Filesystems/fuse-ext2.fs/fuse-ext2.util" is a self-contained shell script. When you read it you will see that it does a lot of checking of System and disk characteristics, then mounts the volume without any options, ie. read-only.

"/System/Library/Filesystems/fuse-ext2.fs/mount_fuse-ext2" calls fuse-ext2.util with parameters "-m" and "$@". use-ext2.util allegedly uses "-m" to mount, and "M" to force-mount, or "fuse-ext2 -o rw+". There are lines in fuse-ext2.util that say

;;
-m|-M)
shift
Mount "$@"
;;

but simply editing mount_fuse-ext2 to call "-M" causes mount to fail totally, and silently. There are a lot of details logged
"/var/log/fuse-ext2_util.log", but not this failure. Also the script fuse-ext2.util contains hints that there are unactivated possibilities to present a dialog box to the user for verifying, selecting, mount[points] or entering password for root|sudo actions.

It is easy (for moderate values of easy) to unmount your read-only volume,
create a mountpoint at "/Volumes/myvolume"
verify your volume id from "diskutil list" as eg. disk A slice B
mount it with "fuse-ext2 -o rw+ /dev/diskAsB /Volumes/myvolume"
This obviously does not fit any definition of automount.

Then comes the fun of mismatched user ID between OSes preventing you from writing some files...

Peter Kerr
Sat, 03 Apr 2010 21:50:08 +0000

Thanks for the tip, Peter. I will follow your bread-crumb trail and see if I can find a way. Most likely after I do my taxes, though. ;-)

Chieh Cheng
Sun, 04 Apr 2010 17:25:38 +0000

Need to add option "rw+" to string
OPTIONS="auto_xattr,defer_permissions"
in /System/Library/Filesystems/fuse-ext2.fs/fuse-ext2.util in start of function Mount ()
There would be
OPTIONS="auto_xattr,defer_permissions,rw+"
I tried this and everything is ok.

fsqcds
Thu, 08 Apr 2010 19:13:19 +0000

I tried your tip, fsqcds, and it's working beautifully!!! Now it auto-mounts as read/write. Thanks.

Chieh Cheng
Thu, 08 Apr 2010 19:39:01 +0000

Thanks fsqcds, a simple fix. Now I no longer get socket time-outs with 2 x 300G disks.
But I have another question: what is causing the disk thrashing before
the ext3 disk actually mounts? top shows me one instance each of
fuse-ext2.util and mount_fuse-ext2 for each physical disk, each
instance using about 0.4% cpu. It takes 68 seconds from login
before all my volumes are mounted. Not a show stopper,
but the disk thrashing is a bug IMO

Peter Kerr
Sat, 10 Apr 2010 01:30:06 +0000

This is excellent..... been suffering and cursing the mac/os x developers for the limited options they give the users of the damn os..... I had all the freedom and all the options when I was still on linux until I switched only to discover the limitation that exist on this side and very little support for the obvious things that everyone is asking daily. This helped me now I can still use my external hard drive without having to format it to something else!

Patrick
Sun, 06 Jun 2010 17:12:42 +0000

What do I use to edit the "fuse-ext2.util" file? I tried TextEdit, but it won't save it as the original file type(Unix executable?) only a text file. Thanks!

apw100
Sat, 12 Jun 2010 22:36:55 +0000

The file belongs to root. You have to use the "sudo" command to edit it. For example: "sudo vi fuse-ext2.util"

Chieh Cheng
Mon, 14 Jun 2010 17:53:58 +0000

I'm completely lost, I thought it could be changed with a text editor. Completely new to OSX. Any way you can send me the edited file or point me to where I can learn to do it?

apw100
Tue, 15 Jun 2010 03:40:37 +0000

Yes, you can edit it with a text editor. The "vi" in the command I shown you is a text editor. The problem is that the files belongs to the user "root" (the most privileged user in the system). You can't edit it without being "root". One of the way to be "root" is to use the "sudo" command.

Due to the reason above, there is no point in sending your the edited file, because you won't be able to over-write it, as you are not "root". I suggest you learn about "Terminal", "sudo", "root", and the "vi" text editor, so that you can perform these tasks in the future.

Chieh Cheng
Tue, 15 Jun 2010 14:09:09 +0000

re editing the "fuse-ext2.util"

drag to desktop
edit
drag back

worked for me

yeahright
Fri, 23 Jul 2010 11:37:37 +0000

Thanks for this trick, works like a charm.

Felipe
Sat, 27 Nov 2010 18:13:21 +0000

Here's a tip Try sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts and use Textedit in Root mode to change the "fuse-ext2.util" OPTION.

kyoto23
Tue, 21 Dec 2010 21:43:47 +0000

How do you make it so it won't mount your /boot partition? :) Nice page... btw much needed...

rezwits
Fri, 14 Jan 2011 08:53:46 +0000

I tried "fsqcds" tip but no luck. Here is what i see in the log file

Output from mount operation: Did not receive a signal within 5.000000 seconds. Exiting...
mount_fusefs: failed to mount /Volumes/seagate15@/dev/fuse0: Socket is not connected
2011-04-01 17:22:35: [Mount] Executing "/usr/local/bin/fuse-ext2.daemon"
2011-04-01 17:22:35: [Mount] Exiting function mount...

Has anybody got this error?

Ramesh
Sat, 02 Apr 2011 00:58:27 +0000

the problem I have fixed,

please download
http://www.tuxera.com/mac/macfuse-core-10.5-2.1.9.dmg
install it.

worked for me.

robbin
Sun, 02 Oct 2011 00:49:47 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

TrackBack

Send Ping | TrackBack URL | Spam Control

Title: Where is fstab on Mac OS X?
Weblog: GearHack
Excerpt: I've been looking for /etc/fstab on Mac OS X for the past ten minutes. It's no where to be found. There is a /etc/fstab.hd file, but it contains the following message: IGNORE THIS FILE This file does nothing, contains no useful data, and might go away in future releases. Do not depend on . . .
Tracked: Tue, 06 Apr 2010 21:22:19 +0000

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 4 - 9?
Click button only once, please!

Messages, files, and images copyright by respective owners.


Articles | Wiki
Forums | Latest | RSS
Library | Links | News
Search | Store | Help

32 Users Online


Hacking Digital Cameras
Fun for Photographers

Amazon Associate


Copyright © 2004 - 2017. All Rights Reserved.