Home > Chatterlings, Web Developing > Mounting ext3 in Snow Leopard…

Mounting ext3 in Snow Leopard…

September 27th, 2009

Im glad to say that it is actually possible to mount an ext3 formatted linux drive in mac OS X Snow Leopard using a few tools. Let me share with you how I did it.

Download fuse-ext2
Also make sure you have MacFUSE otherwise fuse-ext2 wont work.

Install both of those and run a few commands in terminal:

first, create a mount point such as: $ sudo mkdir /Volumes/HD
next, navigate to the fuse-ext2 folder: $ cd /usr/local/bin/
execute the fuse command: $ sudo ./fuse-ext2 /dev/nameOFdisk /Volumes/HD/ -o force
note:(nameOFdisk can be found by typing disktool -l).

Heres some useful information if you dont understand my syntax:

$ fuse-ext2 <device|image> <mountpoint> [-o option[,...]]
options:
ro : mount read only
force: mount read/write
allow_others: allow other users to access
debug: noisy debug output

Voila! your drive should mount, and you should have read/write access as well! man i love mac.

Chatterlings, Web Developing

  1. October 5th, 2009 at 00:30 | #1

    I get this error:

    fuse-ext2: enter [do_probe (../../fuse-ext2/do_probe.c:30)]
    fuse-ext2: Error while trying to open /dev/disk0s2 (rc=16) [do_probe (../../fuse-ext2/do_probe.c:34)]
    fuse-ext2: Probe failed [main (../../fuse-ext2/fuse-ext2.c:337)]

    Any idea why?
    Thanks!

    (You can delete the previous comment)

  2. admin
    October 5th, 2009 at 01:05 | #2

    I’ve never seen that error. What did you format your drive with? I formatted my drive on an ubuntu machine with ext3 filesystem. Give me some specs on what your using and running. Let’s get this thing figured out!

  3. Phil Spector
    October 5th, 2009 at 12:56 | #3

    disk0s2 would be the second partition on the main hard drive. Are you sure that’s the location of your ext2 file system. When I mount a USB ext2 drive, for example, the device is /dev/disk2s1 or /dev/disk3s1

  4. orange
    October 16th, 2009 at 20:46 | #4

    Hi,
    I have the same message like Gandhi
    I know why: the partition is not an ext3 partition but a Linux_LVM partition.
    I look for a solution but i dont get one.
    Maybe the solution could be to use commands of the lvm like vgdisplay but it doesn’t work :(

    If you have an idea …

    Thanks
    (Sorry for bad english)

  5. admin
    October 17th, 2009 at 13:07 | #5

    like Phil said above, make sure that you are mounting the correct drive and not your system or internal hard drives… If your external HD is Linux_LVM it wont work… in that case you will have to reformat the HD and use ext3 or ext2.

  6. orange
    October 17th, 2009 at 14:50 | #6

    Hi,
    In fact, it is the internal hard drive of my broken computer so I don’t want to reformat…
    I hope i will get a solution with a linux OS.

    Thanks

  7. October 20th, 2009 at 04:03 | #7

    Thanks for the step by step explanation. Maybe you should add that using FUSE it is not necessary to be root (or take advantage of the sudo command) to mount an ext partition.
    Michael

  8. Caity
    November 20th, 2009 at 08:52 | #8

    Eric you are fantastic, this is exactly what I was looking for!

    My only question is… would you know how to get it to mount rw at boot? After installing macfuse and fuse-ext2 i can mount the drive rw using your commands in terminal perfectly, but I’d like to have it rw all the time. Right now when I load os x it shows up automatically as read only.

    I’ve done some googling and I’ve poked around and I just can’t seem to figure out where fuse-ext2 gets called from in the first place to change the options to force. There aren’t many people who worked this out as quickly as you did.

  9. Caity
    November 20th, 2009 at 14:15 | #9

    Never mind! It probably isn’t the most elegant solution but it does what I want.

    I wrote a little shell script and with the help of this article: http://support.apple.com/kb/HT2420?viewlocale=en_US made it work.

    For anybody else who is reading this my shell script looks like this:

    umount /dev/disk0s6
    mkdir /Volumes/Ubuntu
    /usr/local/bin/fuse-ext2 /dev/disk0s6 /Volumes/Ubuntu -o volname=Ubuntu,force

  10. Mark
    December 5th, 2009 at 14:30 | #10

    This post was the most helpful I have found for a long time. Thanks a lot!

    Regards

  11. IetWat
    January 21st, 2010 at 10:07 | #11

    Works like a charm! Thanks mate!

  12. January 27th, 2010 at 18:51 | #12

    Wow, this is great I’ve been looking for a way to mount ext2/ext3 disks on MacOS X. I have backup disks attached to a Linksys NSLU2. I always worry about how I would recover the files if the server went kaput. Now I can just attach the USB drives to my Mac.

    BTW, when I attached the USB drive, the Snow Leopard Finder immediately mounted the disks as read-only. So, I figured out the name of the disk (disk3s1 in this case) without using “disktool -l”. To mount the disk r/w, I ejected the disk using the Finder and mounted as above using “-o force”.

  13. Mark
    January 31st, 2010 at 19:11 | #13

    I have MAC OS X – 10.6.2 (Snow Leopard)
    I installed: MacFUSE first
    Then installed: fuse-ext2

    See first post for details. Then I just plugged in my ext3 USB drive, powered it up and it mounted automatically in /Volumes.

    This was a great surprise – No unix commands into terminal necessary.

  14. Scott
    February 12th, 2010 at 01:48 | #14

    I get:

    sudo fuse-ext2 /dev/disk0s2 /Volumes/MEDIA/ -o force
    fuse-ext2: version:’0.0.7′, fuse_version:’27′ [main (../../fuse-ext2/fuse-ext2.c:324)]
    fuse-ext2: enter [do_probe (../../fuse-ext2/do_probe.c:30)]
    fuse-ext2: leave [do_probe (../../fuse-ext2/do_probe.c:55)]
    fuse-ext2: opts.device: /dev/disk0s2 [main (../../fuse-ext2/fuse-ext2.c:351)]
    fuse-ext2: opts.mnt_point: /Volumes/MEDIA/ [main (../../fuse-ext2/fuse-ext2.c:352)]
    fuse-ext2: opts.volname: MEDIA [main (../../fuse-ext2/fuse-ext2.c:353)]
    fuse-ext2: opts.options: force [main (../../fuse-ext2/fuse-ext2.c:354)]
    fuse-ext2: parsed_options: force,allow_other,local,noappledouble,fsname=/dev/disk0s2,fstypename=ext2,volname=MEDIA [main (../../fuse-ext2/fuse-ext2.c:355)]
    fuse-ext2: mounting read-write [main (../../fuse-ext2/fuse-ext2.c:369)]
    /Library/Filesystems/fusefs.fs/Support/fusefs.kext failed to load – (libkern/kext) link error; check the system/kernel logs for errors or try kextutil(8).
    the MacFUSE file system is not available (71)

    :(

  15. admin
    February 18th, 2010 at 14:30 | #15

    theres something up with your installation of fuse. Are you running Snow Leopard?

  16. Gnorkie
    February 26th, 2010 at 16:33 | #16

    Just installing MacFuse and fuse-ext2 I get the disks for reading only, not for writing. They are ext3, formatted with the Popcorn Hour A-110 network media tank.

    Here is the errore I get when trying to mount
    (before I’ve unmounted the disks with disk manager)

    Mac-Pro:bin Stefano$ sudo ./fuse-ext2 /dev/disk0s3 /Volumes/HD1/ -o force
    fuse-ext2: version:’0.0.7′, fuse_version:’27′ [main (../../fuse-ext2/fuse-ext2.c:324)]
    fuse-ext2: enter [do_probe (../../fuse-ext2/do_probe.c:30)]
    fuse-ext2: leave [do_probe (../../fuse-ext2/do_probe.c:55)]
    fuse-ext2: opts.device: /dev/disk0s3 [main (../../fuse-ext2/fuse-ext2.c:351)]
    fuse-ext2: opts.mnt_point: /Volumes/HD1/ [main (../../fuse-ext2/fuse-ext2.c:352)]
    fuse-ext2: opts.volname: [main (../../fuse-ext2/fuse-ext2.c:353)]
    fuse-ext2: opts.options: force [main (../../fuse-ext2/fuse-ext2.c:354)]
    fuse-ext2: parsed_options: force,allow_other,local,noappledouble,fsname=/dev/disk0s3,fstypename=ext2,volname=disk0s3 [main (../../fuse-ext2/fuse-ext2.c:355)]
    fuse-ext2: mounting read-write [main (../../fuse-ext2/fuse-ext2.c:369)]
    Mac-Pro:bin Stefano$ sudo mkdir /Volumes/HD mount_fusefs: failed to mount /Volumes/HD1@/dev/fuse0: Socket is not connected
    ./fuse-ext2 /dev/disksudo mkdir /Volumes/HDA
    Mac-Pro:bin Stefano$ sudo ./fuse-ext2 /dev/disk0s3 /Volumes/HDA/ -o force
    fuse-ext2: version:’0.0.7′, fuse_version:’27′ [main (../../fuse-ext2/fuse-ext2.c:324)]
    fuse-ext2: enter [do_probe (../../fuse-ext2/do_probe.c:30)]
    fuse-ext2: leave [do_probe (../../fuse-ext2/do_probe.c:55)]
    fuse-ext2: opts.device: /dev/disk0s3 [main (../../fuse-ext2/fuse-ext2.c:351)]
    fuse-ext2: opts.mnt_point: /Volumes/HDA/ [main (../../fuse-ext2/fuse-ext2.c:352)]
    fuse-ext2: opts.volname: [main (../../fuse-ext2/fuse-ext2.c:353)]
    fuse-ext2: opts.options: force [main (../../fuse-ext2/fuse-ext2.c:354)]
    fuse-ext2: parsed_options: force,allow_other,local,noappledouble,fsname=/dev/disk0s3,fstypename=ext2,volname=disk0s3 [main (../../fuse-ext2/fuse-ext2.c:355)]
    fuse-ext2: mounting read-write [main (../../fuse-ext2/fuse-ext2.c:369)]
    Mac-Pro:bin Stefano$ mount_fusefs: failed to mount /Volumes/HDA@/dev/fuse1: Socket is not connected

  17. Andrea
    April 1st, 2010 at 13:35 | #17

    Thaaaanks a lot! You saved my life! =) Happy Easter!

  18. Peter
    April 5th, 2010 at 01:59 | #18

    Thanks to Eric and to Caity for the script idea. However I would point out a slight hazard:
    (from bitter experience) scripting will work fine while you have only one (boot) disk,
    and after you’ve finished messing about adding/subtracting disks from your system.
    Diskarbitration probes asynchronously, resulting in “n” for “disknsm” being somewhat arbitrary.

    Second: I’ve also struck Gnorkie’s problem, and I believe it is caused by a socket timeout.
    The journaling system is different for ext3 and hfs+, thus each time a disk is remounted
    on the “other” OS, the journal is rebuilt. Or maybe something else is happening?
    An awful lot of disk thrashing can be heard for up to two minutes before mount fails.
    Manual mount after that time is almost instant.

    P’raps I should explain, I want a dual boot system, MacOS 10.6.2 + Ubuntu 9.10,
    with a common shared Home on a separate volume, same disk, plus a large disk
    for multimedia editing work. Home at present is a 150G partition on the common
    boot disk, with ~50,000 files. It works, but… Also some people may be annoyed at
    having to run a shell script every time (mount + unmount) for removable media.

  19. David
    May 11th, 2010 at 12:53 | #19

    Thank you very much!!!! It works perfectly with an external ext4 formatted drive.

  20. Greg
    May 13th, 2010 at 07:25 | #20

    Mark :
    I have MAC OS X – 10.6.2 (Snow Leopard)
    I installed: MacFUSE first
    Then installed: fuse-ext2
    See first post for details. Then I just plugged in my ext3 USB drive, powered it up and it mounted automatically in /Volumes.
    This was a great surprise – No unix commands into terminal necessary.

    Same for me just loaded up MacFuse then fuse-ext2 and bingo now my server backup USB just appears on the desktop. Really. Thanks heaps to who ever was involved in creating this.

  21. Gravitas
    June 3rd, 2010 at 11:04 | #21

    admin :
    I’ve never seen that error. What did you format your drive with? I formatted my drive on an ubuntu machine with ext3 filesystem. Give me some specs on what your using and running. Let’s get this thing figured out!

    I get that same exact error, like this:

    fuse-ext2 /dev/disk1 /Volumes/extdrive/ -o force
    fuse-ext2: version:’0.0.7′, fuse_version:’27′ [main (../../fuse-ext2/fuse-ext2.c:324)]
    fuse-ext2: enter [do_probe (../../fuse-ext2/do_probe.c:30)]
    fuse-ext2: Error while trying to open /dev/disk1 (rc=2133571364) [do_probe (../../fuse-ext2/do_probe.c:34)]
    fuse-ext2: Probe failed [main (../../fuse-ext2/fuse-ext2.c:340)]

    The disk is precisely the correct one (/dev/disk1) I can even hear it power on, spin up etc read it. And then the error comes.

    So far I have read through about 20 forums, none of them offer any help help regarding this.

    The disk is an old 40GB Ubuntu ext2 disk from around 2003 or so. From a dead laptop that died and would not power on. Some valuable data still on it, and no PC’s around to read it either..

    Any help would be great – so far this problem seems to beyond the forum’s ability to solve.

  22. tom
    June 11th, 2010 at 05:28 | #22

    very useful worked for me… thankyou

  23. August 9th, 2010 at 04:19 | #23

    Socket is not connected…

    mounting it in read-only mode (-o ro) did it =)

  24. September 13th, 2010 at 01:21 | #24

    This was super helpful and straight-forward. Thanks!

  25. Mark
    October 22nd, 2010 at 13:46 | #25

    Having some problems here.

    Made a dir named NMT in Volumes, visible.
    Searched for the right name and mounted the partition with the command that ends with -o ro for read only. And shabam, mounted. But I can’t write to the disk. So unmounted the disk via Finder.
    Then made the dir again, and finially used the command that ends with -o force. And then nothing. The error I get after a while is:
    mount_fusefs: failed to mount /Volumes/NMT@/dev/fuse0: Socket is not connected.. But when I try the exact command but thant with -o ro there’s not problem…

    Somebody can help? And I’m on Snow Leopard 10.6.4.

  26. bolangi
    November 8th, 2010 at 16:56 | #26

    Running 10.6.2 here. After installing macfuse and fuse-ext2, an external USB drive formatted ext4 by Linux as a single extended partition automounts read-only.

    Unmounting it in the Finder, and then remounting by fuse-ext2 with the -o force option provides write access. Great!

  27. Douglas
    November 14th, 2010 at 13:54 | #27

    @Gnorkie
    Hey, how did you solve that? I have a A-110 and facing the same socket error when mounting in RW mode.

    Thanks

  28. JJ
    November 16th, 2010 at 14:14 | #28

    I have exactly the same problem as Mark. When I plug my hard drive in, the finder recognizes it and mounts it read-only. If I unmount it with the finder, I can use fuse-ext2 command to manually mount it read-only, but if I add the “-o force” or “-o rw+” option, I eventually get the error: “mount_fusefs: failed to mount /Volumes/ext3@/dev/fuse0: Socket is not connected”

    One interesting note, even after the failure is printed, the light on the hard drive continues to blink and a “ps” shows that the fuse-ext2 command is still running for a while.

    I’m running 10.6.5. My disk is a 2TB ext3 formatted on centOS.

    -JJ

  29. Gnorkie
    November 17th, 2010 at 19:35 | #29

    @Douglas. NO, I didn’t solve the problem. And now I badly NEED to transfer all my files to another popcorn hard disk…….

  30. franc
    December 1st, 2010 at 10:30 | #30

    Hello, thank you.

    What am i doing wrong having this error:

    failed to mount /private/tmp/usbhd@/dev/fuse1: Socket is not connected

    before i had:

    MacFUSE already exists and does not belong to a registered port. Unable to activate port macfuse. Use ‘port -f activate macfuse’ to force the activation.

    i did it and then i installed with port install ext2fuse

    But trying to mount an ext3 hd i get this error.

  31. eisen
    March 16th, 2011 at 09:47 | #31

    Dear all.

    I try to install fuse-ext2 on a MacOSX 10.6.6.

    when I try to

    $ make

    the bundle I get the following error.

    $ error: There is no SDK with the name or path ‘macosx10.4′

    I guess I have a newer version of SDK somewhere, but I am not sure. For sure I have Xcode.

    Any idea what to change, that the installer also checks for other versions of SDK?

    Thanks in advance for any help or suggestions.

    Best regards

    eisen

  32. Dagony
    April 29th, 2011 at 03:05 | #32

    @eisen
    You can download a binary (as a dmg) from http://alperakcan.org/?open=projects&project=fuse-ext2

  33. David
    May 4th, 2011 at 07:29 | #33

    Very nice tip. And it works. But, writing to ext3 is painfully slow. It took me 10 minutes to copy about 40 MB.

  34. phil
    July 27th, 2011 at 02:11 | #34

    When I tried to mount an ext3 disk on a Mac OS X 10.5 after I have installed macfuse and fuse-ext2, I got :

    $ mkdir /Volumes/temp
    $ fuse-ext2 /dev/disk1 /Volumes/temp/
    fuse-ext2: version:’0.0.7′, fuse_version:’27′ [main (../../fuse-ext2/fuse-ext2.c:324)]
    fuse-ext2: enter [do_probe (../../fuse-ext2/do_probe.c:30)]
    fuse-ext2: Error while trying to open /dev/disk1 (rc=16) [do_probe (../../fuse-ext2/do_probe.c:34)]
    fuse-ext2: Probe failed [main (../../fuse-ext2/fuse-ext2.c:340)]

    The error message is exactly the same if I used one of the partition /dev/disk1s1

    Any idea?

    Thanks,
    Phil

  35. Denis
    August 15th, 2011 at 10:12 | #35

    Thanks for writing this, it was very helpful.

    While I got my ext3 drive to mount under Snow Leopard, and I can access all the files, I do not have write access, even though I used the “-o force” option:

    $ sudo ./fuse-ext2 /dev/disk1 /Volumes/Archive0 -o force
    Password:
    fuse-ext2: version:’0.0.7′, fuse_version:’27′ [main (../../fuse-ext2/
    fuse-ext2.c:324)]
    fuse-ext2: enter [do_probe (../../fuse-ext2/do_probe.c:30)]
    fuse-ext2: leave [do_probe (../../fuse-ext2/do_probe.c:55)]
    fuse-ext2: opts.device: /dev/disk1 [main (../../fuse-ext2/fuse-ext2.c:
    351)]
    fuse-ext2: opts.mnt_point: /Volumes/Archive0 [main (../../fuse-ext2/
    fuse-ext2.c:352)]
    fuse-ext2: opts.volname: Archive0 [main (../../fuse-ext2/fuse-ext2.c:
    353)]
    fuse-ext2: opts.options: force [main (../../fuse-ext2/fuse-ext2.c:
    354)]
    fuse-ext2: parsed_options:
    force,allow_other,local,noappledouble,fsname=/dev/
    disk1,fstypename=ext2,volname=Archive0 [main (../../fuse-ext2/fuse-
    ext2.c:355)]
    fuse-ext2: mounting read-write [main (../../fuse-ext2/fuse-ext2.c:
    369)]

    But when I try to write:

    $ touch /Volumes/Archive0/x
    touch: /Volumes/Archive0/x: Read-only file system

    How can I solve this?

  36. August 31st, 2011 at 13:46 | #36

    @Gravitas

    If you can’t mount a usb external disk on mac os because the disk has an alien partition type use this procedure to mount it in mac:

    1- mount the disk in linux
    2- change its partition type to HPSF/NTFS with fdisk:

    sudo fdisk /dev/sdb1

    type ‘t’ followed by ‘enter’

    if fdisk ask about which partition to change choose partition number ‘1′ always.

    then type ‘7′ followed by ‘enter’ then type ‘w’ followed by ‘enter.

    3- check the success of changing partition type with:
    fdisk -l /dev/sdb1
    The output should list the partitions as well as their types.

    4- unmount the disk in linux.

    5- Attache the disk to mac os and note the device id with diskutils

    6- Ensure that the disk is unmount and ejected

    7- Create mounting directory:

    mkdir /Volumes/usb

    8- Mount the disk with:

    sudo mount -ar -t ntfs /dev/disk2s1 /Volumes/usb

    The ‘r’ parameter means ‘read only’

    If you get no error after this command, then your fine and check your disk in finder.

  37. Ritts
    September 9th, 2011 at 16:59 | #37

    To everyone experiencing the “probe failed” problem Gandhi posted, or a similar probem: The solution is easy. 10:1 you tried installing the old ext2fsx program on your Mac, and it failed. Even though the installer failed, it still made changes to your system. Run the uninstall script that comes with ext2fsx and the problem will go away. More info here:
    http://superuser.com/questions/86360/how-to-read-an-external-hard-drive-format-for-linux-on-mac

  38. john
    November 25th, 2011 at 17:52 | #38

    @

    David
    I’ve copied 40MB in 40 seconds… am trying to copy 5GB from my phone right now and it gives me an estimated time of 2 hrs. I should really have got out my old laptop which runs red hat 9 or something, but it might take 2 hrs to move all the stuff :|

  1. November 11th, 2010 at 01:38 | #1