Mounting ext2/ext3 volumes on OS X?


Recommended Posts

I have a 60GB portable HDD that I use to carry files around between various systems. Laptop drive, USB2 bus-powered. I had the drive partitioned into a 45GB FAT32 volume and a 15GB NTFS volume (for >4GB files).

I discovered the wonders of ext2fsd on Windows and decided I'd reformat the drive's NTFS partition to ext3 so I could read and write to it on Win32, Linux, and (or so I thought) OS X. However, ext2fsx has proven problematic compared to ext2fsd and refuses to mount the ext3 partition.

I've tried reformatting from ext3 down to ext2, but to no avail.

The error I get is something to the effect of "The mount operation failed. The partition may need to be repaired - use disk utility to check it." The error code is 0x00000001.

Has anyone else run into this or any other problem mounting ext2/ext3 volumes on OS X? If so, how did you resolve it?

I'm not particularly set on using ext3 - I'll use ext2 if it's what it takes. I just don't want to use NTFS anymore if I can avoid it.

Link to comment
https://www.neowin.net/forum/topic/620047-mounting-ext2ext3-volumes-on-os-x/
Share on other sites

That's okay. It takes the edge off to know that I'm not the only one who's fighting with this.

I've never submitted a bug report to a software project before as I usually am of the mentality that I'm doing something wrong, but to the best of my ability to tell I'm not. I formatted the volume as ext2, gparted showed that the format was successful, I plugged it into the G5, opened Ext2FSManager, clicked Mount, and...boom. Error.

At the least I might E-mail the developer and get his perspective on it.

I wanted to give an update on the situation I'm in with these volumes.

I read on the SF.net project forum that a particular version, I think it was 1.41d or something close to that, was capable of mounting the volumes correctly via the CLI. I downloaded and installed that version, and it was able to mount an ext2 volume and read it properly. Two problems, however:

-I couldn't figure out how to get the volume mounted with write permissions.

-My G5 kernel-panicked over the weekend while I was away. When I got back and rebooted, the error report listed ext2fsx as the cause of the crash.

Also, no word yet on how it works with ext3 volumes, though I imagine it will probably be somewhat similar.

Dang. Sounds close. Might do for quick short-term access to files, then disconnect.

As far as write permissions, what command did you use to mount it? Are there options to support write mode? Does the driver support write mode with the version you have?

That's actually a very good question. The discussion on the SF.net forum implied that it did, but I'm not sure. Linux-related discussions tend to be less than all-inclusive and clear. And it seems that (yourself excepted, you damn wonderful rarity) posting threads on Linux forums that ask multiple questions and request clear, detailed explanations either:

-Get ignored

-Get one of the questions answered, vaguely

-Get a response of "Google it up." Gee, thanks a frelling ton, since GOOGLE LED ME TO YOUR FORUM TO BEGIN WITH.

Like I said, Neowin and you seem to be exceptions, but with Neowin being more Microsoft-centric (albeit not as much as MSFN, the other tech forum I managed to secure work access to) there isn't the wide support base for Linux questions as there is on, say linuxquestions.org, ubuntuforums.org, or some other *nix forums.

As for mounting, I believe I used:

sudo mkdir /Volumes/Test
sudo mount -o -rw /dev/disk4s2 /Volumes/Test

Upon trying to cp or mv a file to /Volume/Test, though, it kept saying "Read-only filesystem."

The other problem is that I don't know exactly what caused the kernel panic. I'm worried it's some kind of an "unclean" unmount or memory leak or something like that. Maybe a link or symbolic link that was established but not destroyed when the drive was removed, or...something like that. Unfortunately my knowledge of *nix drive-mounting isn't yet what I'd call ironclad so there are a few hypotheses I have that are likely untrue or irrelevant. It's great to be able to mount the thing, but I don't want to mount it, move files around, unmount it, and then suddenly get a kernel panic the next day when I'm trying to write a term paper or render video or something.

Yeah, that's a bit of mystery to me, too. I set it up once, and haven't had to use it ever again. :ermm:

After you mount (and the -o rw seems to be correct), does it show rw attributes when you do an ls -l in your /Volumes/ directory? If you cd to a directory inside there, does it still show rw?

Then, as a check for your permissions, try a

sudo touch /Volumes/Test/touch_me_baby

and see if it creates that file when you sudo to root permissions.

(and, yes, you can change the filename if you really, really want to) :p

Oh, waaaaaaaaaaitaminnit. The option is "-o rw" with a dash before the "o" and one single space, no other characters, before the "rw"? That might have been my problem.

Someone posted something about using "mount -rw" and another post elsewhere (as well as the manpage) detailed "o" as the option parameter and "rw" as one that could follow it. I must have conflated the two and come up with "-o -rw" as in Dash-oh space dash-arr-doubleyou.

I'll try that and then the touch test and see what happens. Thanks!

Update before I crash for the night:

I reinstalled 1.4d4 and rebooted as recommended. Upon logging back in, the ext2 volume mounted on the desktop like any other HDD, but was read-only.

I tried your suggestion, and these are my findings:

Gal-Da-Val:~ cwhisper$ sudo mount -o rw /dev/disk2s2 /Volumes/Test
/dev/disk2s2 on /Volumes/Test: Incorrect super block.
Gal-Da-Val:~ cwhisper$

So...apparently there's a problem with the superblock on my ext2 partition? I had heard of this problem occurring on ReiserFS volumes but never on ext2. Any ideas as to what might be up?

And another mini-update. I just searched the LinuxQuestions.org forums (one more of the few sites to which I have work access) and remembered another potential missing piece of the puzzle. Someone posted a terminal session that looked like:

  Quote
/sbin/mke2fs -m0 -s0 -F ./ramdisk.img

# Fix broken (according to Slackware mkinitrd) ext2fs defaults:

/sbin/tune2fs -c 0 -i 0 -m 0 ./ramdisk.img

mount -t ext2 (hi I'm in red look at me CelticWhisper you moron who can't get his commands straight) -o loop ./ramdisk.img ./temp

cd ramdisk

#cp -dR * ../temp/ && sync

cp -a * ../temp/ && sync

umount ../temp

cd ..

gzip -9 ramdisk.img

mv ramdisk.img.gz ramdisk.gz

I'm thinking I'll need to use the command:

sudo mount -t ext2 -o rw /dev/disk2s2 /Volumes/Test

in order to make it work.

Does that sound about right?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.