PDA

View Full Version : Writable NTFS for MacOS X (yes! this is NOT a question!)


AHunter3
03-03-2007, 06:04 PM
I just successfully drag-copied a file into the window of an NTFS volume that's hooked as an external firewire disk to my PowerBook G4. In case that last particle of information didn't make it obvious, no, I'm not running Windows :)

Yes, it's not merely mounted, it's mounted and editable.

Here's the Apple Nova thread (http://forums.applenova.com/showthread.php?p=432791). It's many pages deep and the downloadables and the instructions have changed as improvements were made, so don't follow the instrux on the early pages.

Here (http://code.google.com/p/macfuse/) is the page with the downloadable .dmg for MacFuse Core 0.2.2, of which the NTFS 3G driver is a module;

Here (http://forums.applenova.com/showpost.php?p=446745&postcount=262) is the Apple Nova post with links to the downloadables for NTFS-3G 1.0 and MacFUSE Tools 0.2.2.

Borrowing from several additional posts on this Apple Nova thread (discarding the instructions that were supplanted with later updates, adding additional bits and pieces that were posted later), once you've done the install, this is how you deploy it:


1) Open Disk Utility.
2) Select your NTFS partition. In the toolbar, or in the File menu, select Unmount. It should become greyed out in the list, and disappear in the Finder.
3) Still in Disk Utility, Get Info on the partition. You should see a line like:
Code:
Disk Identifier : disk0s3
This identifier is important, you'll need it in a minute.
4) You need to manually create a mountpoint now (this is one fiddly thing left to fix, but a minor one):

sudo mkdir /Volumes/"Windows"

(Replace "Windows" accordingly. Make sure that, if your NTFS partition has spaces in its name, those too are wrapped in double quotes, like this:

sudo mkdir /Volumes/"Windows Partition"

)
4) Finally, mount it:

ntfs-3g /dev/disk0s3 /Volumes/"Windows" -o ping_diskarb,volname="Windows"

The "disk0s3" above needs to be replaced with whatever your disk identifier actually is.

It should appear in Finder now. If it doesn't, these two commands might help:

disktool -r

and:

killall Finder

The first refreshes disk arbitration (keeps mounted partitions in sync between Unix-y stuff and Mac OS-y stuff), and the second relaunches Finder.


I will add at this point that on my machine it did this in Terminal:


localhost:~ ahunter$ sudo ntfs-3g /dev/disk2s1 /Volumes/"HELLO NTFS" -o ping_diskarb,volname="HELLO NTFS"
Password:
mount_fusefs: fusefs@0 on /Volumes/HELLO NTFS: Operation not permitted


However, when I hit it a second time, it was more compliant:

localhost:~ ahunter$ sudo ntfs-3g /dev/disk2s1 /Volumes/"HELLO NTFS" -o ping_diskarb,volname="HELLO NTFS"
localhost:~ ahunter$


So if you get that far and get the "operation not permitted" thing, try running the same command a second time.


Now, to unmount the disk later on, if you're so inclined (you don't normally have to do this):
Code:
sudo umount /dev/disk0s4@0

This will also, however, remove the mountpoint. This means that, for now, every time you want to mount your partition as read-write, you have to follow the above steps of unmounting the read-only version, creating a mount point, and mounting a read/write version.

tlarkin
03-03-2007, 09:57 PM
I was under the impression you could always mount NTFS volumes locally on *nix machines with the mount the command. The problem was that NTFS did not play nicely with other file systems and it does some funky stuff, so you would potentially corrupt your volume.

I have mounted NTFS volumes in Linux (ext3 file system - which is very similar to HFS+) and it does work it just doesn't work well.

On my macbook pro the OS automatically mounted my NTFS partition I made when I installed windows on the desktop. I quickly made a entry in the /etc/fstab to make it not auto mount and made the whole volume read only so nothing funny would happen.

AHunter3
03-04-2007, 01:23 AM
MacOS X has been capable of mounting NTFS volumes for some time now, but it has always been read-only.

This is about mounting NTFS volumes in editable mode. If it was possible previously I was not aware of it.

lahnd
03-04-2007, 02:28 AM
I just inherited a MacBook with an existing "untitled" NTFS partition with Windows XP loaded on it. My problem is that it is a Korean version of XP (menus and all). I would like to erase that partition or at least replace Windows with an English version. Will Macfuse, etc. enable me to do that???

I am not a real techie so as much help as possible would be greatly appreciated.

thomas shirley
03-04-2007, 07:13 AM
I just inherited a MacBook with an existing "untitled" NTFS partition with Windows XP loaded on it. My problem is that it is a Korean version of XP (menus and all). I would like to erase that partition or at least replace Windows with an English version. Will Macfuse, etc. enable me to do that???

I am not a real techie so as much help as possible would be greatly appreciated.

If it is a bootcamp partition, you should be able to do this with bootcamp.

DeltaMac
03-04-2007, 07:25 AM
If you have a partition created by Boot Camp, you should be able to find Boot Camp in your Applications/Utilties folder. When you now open that Boot Camp, it should give you the choice to remove that partition completely, if you want to.

AHunter3
03-04-2007, 11:57 AM
I'm pretty sure you can REFORMAT an NTFS partition regardless of the presence or absence of BootCamp or Windows (or MacFUSE). If you want it to continue to be an NTFS volume when you're done, you need to do it under Windows in one fashion or another.

AHunter3
03-04-2007, 08:50 PM
Interesting. I rehooked the NTFS drive this evening, expecting to have to unmount it in Disk Utility and then remount it using the command line in order to have read-write access to it again. Instead it mounted and I was immediately able to make edits to the drive contents.

Now I'm wondering how it will behave if I hook a totally different NTFS volume to this machine. Have I somehow made NTFS drives always-editable, or just this one, or what?

lahnd
03-06-2007, 12:46 AM
If it is a bootcamp partition, you should be able to do this with bootcamp.

tyvm... worked like a charm. thx agn

lahnd
03-06-2007, 12:48 AM
If you have a partition created by Boot Camp, you should be able to find Boot Camp in your Applications/Utilties folder. When you now open that Boot Camp, it should give you the choice to remove that partition completely, if you want to.

tyvm... worked like a charm. thx agn

endif
03-27-2007, 02:14 PM
Those that have tried this..

- the reason this was an issue in the first place was because of the potential for corrupting the NTFS filesystem

- have you experienced any problems? if not, how much have you used it? corruption would be cumulative, I believe.

AHunter3
03-27-2007, 03:55 PM
I'm the OP but I have no info to give you. I installed it kind of as a lark, and kind of as insurance against my girlfriend having problems with her PC that could perhaps be fixed with editable access to the NTFS drive. Verified that it works, said "lookit me, I can edit NTFS drives on my Mac!", then reformatted the drive in question to HSF+ so I can actually use it as a bootable Mac backup.

I have no idea if it makes mold grow on NTFS if you use it often or in perpetuity.

Zeitkind
03-27-2007, 07:34 PM
If it was possible previously I was not aware of it.

Well.. it was. For quite a long time, but hidden in the man pages and limited.
By default, OS X mount NTFS ro, because the driver is not really the best one and never hit final stage I guess - its origin is FreeBSD. Also, M$ is well known to produce complicated stuff with traps all over their code.
It's not a real good idea to try this on important data, but if you like..

From the man page:
"WRITING
There is limited writing ability. Limitations: file must be nonresident
and must not contain any sparces (uninitialized areas); compressed files
are also not supported."

AHunter3
03-27-2007, 09:59 PM
"WRITING
There is limited writing ability. Limitations: file must be nonresident
and must not contain any sparces (uninitialized areas); compressed files
are also not supported."

Yeah, I know all about that (http://forums.macosxhints.com/showthread.php?t=34863).

I read the man pages and I mounted NTFS volumes from the command line trying to enable that "limited writing abiliity", but it was rather exotically limited to the imagination of the blurb writer as far as I could tell. Certainly the standard finder-mount was read-only as well. I posted a thread about it back when... let's see... ::adds link to old thread::

trevor
03-27-2007, 10:12 PM
...and what exactly ARE sparces anyway? Googling for the 'word' sparces only gets links to that man page and completely unrelated items.

Trevor

ThreeDee
03-27-2007, 11:20 PM
This may be unrelated, but I do recall .sparseimage disk images, where the image would grow with the contents of whatever was in it up to a specific size.

Zeitkind
03-28-2007, 04:34 AM
Well.. think someone from Apple should finally clear that. My guess: Apple needed code to mount NTFS, but had no fun writing it, so they took the very old code from FreeBSD to at least get reading access.
I never tried to actually write a file to NTFS, so I took a short look at the code. It's quite complex and not really understandable for me, esp. the .kext. But in ntfs_util.c I found an interesting notice:

/*¥ if (! writable) // Force NTFS to mount read-only in Darwin */
mountargs[1] = READONLY_OPT;

That might clear, why writing never worked. Apple really should have changed the man page also, if they alter code that way..