This page has been robot translated, sorry for typos if any. Original content here.

How to enable NTFS recording support in Mac OS X 10.7 Lion using standard tools

On this topic:


Как включить поддержку записи NTFS в Mac OS X 10.7 Lion стандартными средствами


After installing Mac OS X 10.7, Lion Golden Master began to look closely at the future working environment: what and how it works, what was removed, what was added, what was moved. This is practically what awaits us just about! I decided to try out how things are going with reading / writing NTFS in Lion. Reading, of course, and so it works, as they say out of the box, and I decided to poshamanit with the inclusion of recording on NTFS partitions with available tools of the operating system Lev. I decided to do this thing myself, and it gave a positive result.

The method of scientific tyke (folk methods do not sign in trifles) determined that with the mount_ntfs binarik in the / sbin folder, everything is fine, the script that we create also works as it should. It turned out that the whole matter was covered in the ntfs.kext driver itself (the kext), which is located in / System / Library / Extensions / . After a bit of tapping into the NTFS drivers from Mac OS X 10.6.8 and from Mac OS X 10.7, GM found that the drivers differ minimally, we can only say the build, but Lion'ovskuyu made it impossible for the native support for writing to NTFS partitions. I tried to slip the ntfs.kext binket from the Snow Leopard into the Lion binarik, treated the rights, rebooted ... And it all worked! In short, the instruction:

Downloading this archive containing the binarik from ntfs.kext from Mac OS X 10.6.8 Snow Leopard and the script. Unpack this archive on the desktop. You should have an NTFS_Enabler folder with two files: mount_ntfs and ntfs . We start the Terminal ( Terminal.app ) and execute:

1) So as not to write unnecessary sudo immediately say that we will work on behalf of the administrator (root): sudo -s and click Enter. At the password request, enter the superuser password and press Enter again.

2) Create a backup copy of the ntfs.kext binarics : mv /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs \
/System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs_orig
mv /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs \
/System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs_orig

3) Copy the ntfs.kext driver binaries pulled from Mac OS X 10.6.8 Snow Leopard to the original binar file: cp ~/Desktop/NTFS_Enabler/ntfs \
/System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs
cp ~/Desktop/NTFS_Enabler/ntfs \
/System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs

4) We assign him the right permissions and attributes: chown root:wheel /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs;\
chmod 644 /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs
chown root:wheel /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs;\
chmod 644 /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs

5) Create a backup of the original mount_ntfs daemon: mv /sbin/mount_ntfs /sbin/mount_ntfs_orig

6) Now we replace the original mount_ntfs daemon with a script wrapper that will “intercept” the system commands and activate ntfs.kext for reading and writing: cp ~/Desktop/NTFS_Enabler/mount_ntfs /sbin/mount_ntfs

7) Assign the correct rights and attributes to the copied script: chown root:wheel /sbin/mount_ntfs; chmod 755 /sbin/mount_ntfs chown root:wheel /sbin/mount_ntfs; chmod 755 /sbin/mount_ntfs

8) Run the driver: kextload /System/Library/Extensions/ntfs.kext With a successful launch, there should be no errors.

9) Run the Disk Utility and remount the disks with the NTFS file system. Reboot is not necessary.

The archive also contains a text document with the commands line by line, as the blog engine could crash some of them. After performing the above 9 steps, the disks and partitions with the NTFS file system will be mounted for reading and writing immediately, without any “registrations” in fstab and reboots! You can disable recording on NTFS and return everything back with the help of two console commands (an administrator password is required):
sudo mv /sbin/mount_ntfs_orig /sbin/mount_ntfs then sudo mv /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs_orig \
/System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs
sudo mv /System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs_orig \
/System/Library/Extensions/ntfs.kext/Contents/MacOS/ntfs

"Pros" and "Mnius":

Pros:

  • High write speed, about 30 MB / s.
  • When deleting files puts them in the trash, rather than permanently deletes.

Minuses:

  • If the volume is “incorrectly” unmounted from Windows, then it swears into the log and mounts read-only.
  • Disk Utility cannot create an NTFS type partition.
  • Well, it's still a hack ;-)

Therefore, readers are advised: by default, use the native driver according to this method. But Keep NTFS-3G installed but turned off (the Disable / Enable button in System Preferences) in case you need to mount a problem partition or partition the disk. I also remind you that everything was tested and works starting with Mac OS X Lion 10.7 Golden Master , up to Mac OS X Lion 10.7.2 inclusive.

Do not use NTFS to store important files when running on Mac OS X; and vice versa, do not use HFS + to store important files when working in Windows. Do not rely on third-party solutions such as Tuxera NTFS, Paragon NTFS or NTFS-3G. Use the NTFS recording function only for sharing files that are not critical for loss, or if there is a backup.

Attention! Due to numerous inconsistencies, I created a small package called NTFS Tools , which will do everything described above automatically.