InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   Snow Leopard 10.6 (http://infinitemac.com/forumdisplay.php?f=87)
-   -   Unlock NTFS write support in SL (updated on 04/10/09) (http://infinitemac.com/showthread.php?t=4070)

Snow 09-13-2009 03:29 PM

Unlock NTFS write support in SL (updated on 04/10/09)
 
Update 04/10/09

Slic posted a (hopefully) proper solution for enabling read/write support in SL so I'm pasting his info here

Quote:

How to enable built-in support for writing to NTFS, once and forever.

1. Open terminal and type this command:

Code:

sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig
2. Then open file mount_ntfs with nano editor by typing this command:

Code:

sudo nano /sbin/mount_ntfs
3. Now enter (copy/paste) these 2 lines of text:

Code:

#!/bin/sh
/sbin/mount_ntfs.orig -o rw "$@"

4. Press Control + X then Y and Enter for Exit and Save!

5. Type these 2 commands:

Code:

sudo chown root:wheel /sbin/mount_ntfs
sudo chmod 755 /sbin/mount_ntfs


Credit to Slic!



Update 03/10/09

I've been using a combination of MacFuse & NTFS-3G lately because the below method seems unstable. Besides the disk check at windows boot it seems to work properly.


This info is used from another forum (and edited by me):

- Open Diskutility, right click windows drive you want write support for and select information, then copy the UUID string

http://h.imagehost.org/0167/RW.png

- Open Terminal.app
- Type
Code:

sudo nano /etc/fstab
- Type in
Code:

UUID=paste_the_uuid_here none ntfs rw
- Repeat for other NTFS partitions.
- Save the file (CTRL + O) name it "fstab" confirm with enter, close (CTRL + X) and restart your system (sudo reboot)

After reboot, NTFS partitions should natively have read and write support. This works in both 32 and 64-bit kernels. Support is quite good and fast, it even recognizes file attributes such as hidden files.

SomniusX 09-13-2009 05:13 PM

OMG.. that is one hell of info..

So it's natively supported.. hm.. and they didn't tell us anything.. arg# :D

mormegil 09-13-2009 05:49 PM

I didn't remove fstab.hd. Just saved as a new file called fstab.

SomniusX 09-13-2009 05:52 PM

Yeah that's one thought, it's a sensitive system file, you could always keep a backup! :)

vladrxpx 09-13-2009 06:31 PM

i donno if this is weird or not, but right after my first boot into snow leopard (right after i installed it) i had ntfs read/write support w/o ntfs-3g and macfuse.. i only did the dsdt patch brefore..

SomniusX 09-13-2009 06:35 PM

Maybe there was a script that did that for you, one of those that create a dsdt maybe? :)

rohizzle121 09-13-2009 07:18 PM

Quote:

Originally Posted by Bloodiator (Post 34713)
Maybe there was a script that did that for you, one of those that create a dsdt maybe? :)

+1
this would be a brilliant idea!

i wish i knew how to create a script! :/

Snow 09-13-2009 07:18 PM

Quote:

Originally Posted by mormegil (Post 34707)
I didn't remove fstab.hd. Just saved as a new file called fstab.

k bud, will edit guide

SomniusX 09-13-2009 07:20 PM

Quote:

Originally Posted by rohizzle121 (Post 34719)
+1
this would be a brilliant idea!

i wish i knew how to create a script! :/

It's easy to create scripts

you just open a text file write the commands you want to run in sequence, save it, chmod it so it can be executable and that's it, just call it from terminal or from inside other scripts..

rohizzle121 09-13-2009 08:43 PM

Quote:

Originally Posted by Bloodiator (Post 34722)
It's easy to create scripts

you just open a text file write the commands you want to run in sequence, save it, chmod it so it can be executable and that's it, just call it from terminal or from inside other scripts..

how i would i like for instance get the UUID of the partition in question?

Superhai 09-13-2009 09:15 PM

diskutil info

SomniusX 09-13-2009 09:26 PM

You can copy the # by running the Disk Utility on a pre-installed leo system (snow or leo) but you can also see it by running the installation disk of snow leo and then opening Disk Utility, there are some commands to invoke these infos from Terminal but i'm no so familiar with.. sorriez!

x986123 09-19-2009 05:32 AM

Thanks! This works very well!

vladrxpx 10-01-2009 02:07 AM

...
i've managed to boot into 64bit SL, before, i've runned only at 32bit..made a mistake..

sometimes SL would crash, and if i would boot into win, sometimes folders would be broken and locked (even though i can use the files from within)
and in SL, those folders would be just plain empty in finder, and still i could use those files..

this time i booted in win, it did this thing to my whole NTFS partition...

jesus christ, ever since i made this change to fstab SL just crashes more often, and sometimes i get hanged at restart/shutdown....


edit:
right, well.. every time SL crashed or hanged at restart/shutdown(blue screen and loopy icon) I got a disk check at win boot
so, this time i've waited for win to do the disk check for this NTFS partition I had problem with. it went ok, and fixed the problem, but still i have this crashes..

monsieur.d 10-01-2009 09:17 AM

In my experience, NTFS write support in SL is not reliable. I've used it, but I will keep it disabled by default as I don't often need to write to NTFS.

In Leopard, MacFuse + NTFS-3G was very reliable.

SomniusX 10-01-2009 09:42 AM

Any news about SL version of MacFuse & Ntfs-3G ?

hg2009 10-01-2009 11:46 AM

If you use this method make sure you remove the drive/drives in question from the spotlight indexing, I've had some nasty freezing because of that.

Other than that works great.

vladrxpx 10-01-2009 12:16 PM

I've installed paragons NTFS on mac osx, and.. even though it's said it has snow leopard support, it doesn't work at all.

without any app for NTFS support, i can only read NTFS partitions.

thorazine74 10-02-2009 11:47 AM

Quote:

Originally Posted by vladrxpx (Post 36459)
I've installed paragons NTFS on mac osx, and.. even though it's said it has snow leopard support, it doesn't work at all.

without any app for NTFS support, i can only read NTFS partitions.

Did you try this version?
http://www.paragon-software.com/home...-download.html
They say its compatible with SL.

I hope it works because I dont really trust Apple's NTFS, if its disabled by default there must be some reason. I also see some messages in the log complaining about one of my partitions mft having error that otherwise seems to be perfectly fine, not sure if its an error or they are being overly cautious.
Besides the current solution its not really good enough, you have edit fstab manually for each volume, to be really useful we would have to find a way to change the automount options for all ntfs to be read/write.

SomniusX 10-02-2009 01:26 PM

The "http://ntfsmounter.com/" doesn't help?

vladrxpx 10-02-2009 04:19 PM

paragon beta version that is said to work can't even find ntfs drives
edit: http://www.paragon-software.com/home...uirements.html here it says you need SL in 32bit mode. so i guess they dont have support for 64bit..

thank you bloodiator for the link, ntfsmounter works great but at 'get info' it shows that i have custom access? 20 seconds later, i was typing in safari, and firs safari crashed, i've had this loopy icon as a cursor.. then finder crashed on me too.. at that point, I had no choice but to restart. this also happened when i was using the fstab edit...

at this point, i think SL has no stable support for NTFS write whatsoever.. really bummed :C

x986123 10-02-2009 11:13 PM

Mine started crashing after a while to. I reinstalled and everything fine =D

slic 10-03-2009 11:11 AM

Hi, there is way

How to enable built-in support for writing to NTFS, once and forever.

1. Open terminal and type this command
sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig

2. Then open file mount_ntfs with nano editor by typing this command
sudo nano /sbin/mount_ntfs

3. Now enter these 2 lines of text
#!/bin/sh
/sbin/mount_ntfs.orig -o rw "$@"


4. Press Control + X then Y and Enter for Exit and Save!

5. Type these 2 commands
sudo chown root:wheel /sbin/mount_ntfs
sudo chmod 755 /sbin/mount_ntfs


Congratz! Now, any NTFS disk connected to your Mac is writable.

...
...
...

vladrxpx 10-03-2009 05:44 PM

slic, your hacking skills seem to amaze me every time i see your post on any issue. :)

thnx for solving this!

I'll report if there is any problem on this matter.

this edit seems to work well right now.
i just hope it wont crash again..since im using 64bit SL.

xxhellfirexx 10-04-2009 05:17 AM

This NTFS built in read and write capability is impressive. However, I want to modify this fstab command some more so I can force my HFS+ journaled USB to be read only, but I can't seem to get it to work. Here is what I did in terminal.

cd /etc
sudo nano /etc/fstab
UUID=2FD74A3F-090E-33B5-825A-4B1E9B96A24D none hfs ro,auto 0 0
ctrl+O
ctrl+X
reboot machine.

Did anyone try this? If you did and were successful, please tell me what you put for your fstab file.

Thanks.

MonkeyDLuffy 10-04-2009 05:29 AM

How come that you have UUID for your NTFS partitions/drives in Disk Utility? Mine doesn't have that information. I only get UUID from my Mac OS partition. I currently have Macfuse and NTFS-3G installed which is so damned slow! I'm willing to try the helpful post but I can't even start without a UUID.

Name : Windows 7
Type : Volume

Disk Identifier : disk1s1
Mount Point : /Volumes/Windows 7
File System : Windows NT Filesystem (NTFS-3G)
Connection Bus : SATA
Device Tree : IODeviceTree:/PCI0@0/IDE1@1F,2/SECD@1
Writable : Yes
Capacity : 214.96 GB (214,958,080,000 Bytes)
Free Space : 185.22 GB (185,219,973,120 Bytes)
Used : 29.74 GB (29,738,102,784 Bytes)
Number of Files : 108,884
Number of Folders : 0
Owners Enabled : No
Can Turn Owners Off : No
Can Be Formatted : Yes
Bootable : No
Supports Journaling : No
Journaled : No
Disk Number : 1
Partition Number : 1

EDIT: NEVERMIND, I just needed to uninstall Macfuse + NTFS-3G to make the UUID to show up.

@SLIC: Pretty neat trick. It is working right now. I'm on SL 64-bit. I hope it is stable. Look stable thought.

Snow 10-04-2009 07:36 AM

Thx Slic! added your info to the guide!

myska 10-04-2009 09:10 AM

@slic
Many thanks for this tip. Works great with SL x64! (Y)

vladrxpx 10-04-2009 01:08 PM

ok, so i had some time to test this out.

turns out i have this delayed restart and sometimes shutdown crashes, where i get the blue screen and the black loopy icon (maybe whenever im saving files to NTFS part.). at this point, i can only force restart or shutdown by pressing the button.

at windows boot, i get the disk check, again :/

maybe this fix works only for real macintosh. i have no freaking idea why it wont work fully on 64bit SL...

eMatoS 10-04-2009 03:42 PM

I've tried that workaround but had some problems too, slow shutdown (sometimes it wouldn't shutdown at all) copied a small file and then couldn't open it. So I'm back to paragon, it seems a bit slow but it works just fine.

vladrxpx 10-04-2009 03:59 PM

did you get paragon to work in 64bit? or are you using 32bit?
ntfs3g works in 32bit mode too, in fact, ntfs r&w support works well in 32bit mode without an added app.

we are most concerned about the 64bit

eMatoS 10-04-2009 06:53 PM

I'm on AMD so no 64bits for me, at least for now.

imacken 10-04-2009 08:30 PM

This topic has been a major boon! Thanks a lot. Now I don't have to keep copying files from my NTFS drives!
Well done.

vladrxpx 10-05-2009 06:01 PM

its official now, this new edit does no fixing whatsoever. SL still crashes on me..

i went and deleted the edit inside of sbin/mount_ntfs and repaired permissions, now i dont have read support..

does somebody know how to restore to original settings?

eMatoS 10-05-2009 07:24 PM

You can restore your original mount_ntfs (A) or you can delete that "w" inside the new file (B).

A-
sudo rm /sbin/mount_ntfs
sudo mv /sbin/mount_ntfs.orig /sbin/mount_ntfs

B- sudo nano /sbin/mount_ntfs

Replace this line:
/sbin/mount_ntfs.orig -o rw "$@"
With this one:
/sbin/mount_ntfs.orig -o r "$@"

Then exit nano, save,
repair permissions and reboot.

Just a guess, I don't know if it's gonna work.

dimach 10-06-2009 07:44 PM

Thanks for this guide! Works perfectly for me! After MacFuse failed to work that are really good news ;)

mormegil 10-06-2009 09:35 PM

So what's the difference between the original method and slic's?

thorazine74 10-07-2009 08:19 AM

Original method makes you configure each volume's mount point manually in fstab while the new hack will replace mount.ntfs command so all NTFS volumes you plug will be mounted r/w.
I've been researching a bit and it seems the automounting in OS X is being handled by diskarbitrationd, which is the daemon that actually launches the mount.ntfs, mount.hfs whatever commands, however I could not find any info on changing its default mount configuration. Its config file its in /System/Library/LaunchDaemons but its empty in SL and nothing useful in Leopard, I didnt find any documentation to change its options.
Also I found an autofs.conf file in /private/etc/ that seems to control automountd options, there you can see some mount options defaults with some explanation, but they seem to apply to network mount options and not local volumes, besides Apple's docs say volume mount is done in OS X by DiskArbitrationD, not automountd, so I'm not sure if its useful to change anything there.
Just some info in case someone wants to keep on hacking on a even better NTFS mounting solution...

mormegil 10-07-2009 10:10 AM

K.. so they're functionally the same then.

I'll stick to the manual method. Not a good idea to mess with Windows system volume.

vladrxpx 10-07-2009 05:46 PM

I would recommend NOT TO DO THIS FSTAB or MOUNT_NTFS EDIT !!!

save yourself some trouble and dont mess your NTFS partitions.. constantly.

now, my system has become incredibly unstable. it crashes whenever it wants..

i hope someone will post how to return the default mount_ntfs.. :(

SomniusX 10-07-2009 06:10 PM

Look guys..

just make it only read the ntfs disks, what do you need more.. dont make it write on'em.. so you don't have problems..! :D

easy! :P

edit : when the proper software comes out (ntfs-3g/macfuse/etc.) then, we use them to "write" on ntfs.. and that's it!

thorazine74 10-08-2009 08:26 AM

Well it depends how careful you are and how unstable your computer is, if you have crashes and have to hard to reset the computer often you will end up with troubles sooner or later. If you are careful enough, like not force mount any dirty ntfs volume, chkdsk the ntfs volumes in windows after any crash or hard reset or every so often and unmount ntfs external volumes before turning off you should be ok, assuming Apple's implementation is completely buggy, at least it was ok to me with both NTFS-3G and Paragon before, I havent tried Apple's method but you can assume the same caution has to be exercised when writing to an NTFS partition with a third party unsupported method.

SomniusX 10-08-2009 10:30 AM

Nicely said!

vladrxpx 10-08-2009 11:36 AM

ok, I've managed to bring the old setting back..
Its in this macrumors forum thread :
Code:

http://forums.macrumors.com/showthread.php?t=785376&page=2
Quote:

Enjoy R/W access to NTFS volumes...

In case you don't like it

sudo mv /sbin/mount_ntfs.orig /sbin/mount_ntfs

and everything is back to R/O.

SomniusX 10-08-2009 11:38 AM

Yeap.. a reversal of the procedure! :D but you could have kept the read only ntfs support..

vladrxpx 10-08-2009 11:48 AM

weeell.. being a noob makes me feel more suspicious when it comes to custom editing the system files. i would rather put everything back as it was, not that I'm saying the alternative couldn't work :)

oh well.. waiting for ntfs3g to fix this 64bit issue :C

SomniusX 10-08-2009 11:50 AM

No worries man, you'll get the hand of everything mac soon! And the best thing to do is wait for'em, like all other 64bit d00d3z! :D

I'm waiting like crazy for vmware fusion 3.. arg# end of October.. sh1t :P

MonkeyDLuffy 10-31-2009 05:38 AM

Ahh .. really sad. I'm exactly having the same problems as vladrxpx. It's 100% identical. Random Crashes and disk checks when booting to windows. The thing is, I'm on Quad boot so I have to do disk check on XP and 7 (I don't know why they don't do it all at once).

I can't live without NTFS write support :(

Hoping for a stable solution for 64-bit SL.

joransrb 11-10-2009 02:32 AM

http://macntfs-3g.blogspot.com/

anyone tried the tuxera version...?

vladrxpx 11-11-2009 02:46 PM

^System requirements: A Mac (Intel or PowerPC) running Mac OS X 10.4 - 10.6 (32-bit kernel).


there is a read/write support BUT ONLY FOR 32BIT KERNEL!!!

the problem exists only on 64bit KERNEL !!!