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 at the future working environment: what and how it works, what was removed, what they added, what they moved. This is practically what we are about to be about! I decided to test how things are with reading / writing NTFS in Lion. Reading, of course, and so it works, as they say "out of the box," and I decided to pop-glance with the inclusion of a record on NTFS partitions with improvised means of the operating system "Leo". I decided to do it myself, and this gave a positive result.

By the method of scientific tyke (folk methods do not sign in details), it was 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 thing was in the driver (itself) ntfs.kext , which is located in / System / Library / Extensions / . A little bit of the NTFS drivers from Mac OS X 10.6.8 and Mac OS X 10.7 GM found that the drivers differ minimally, we can say only the assembly, but Lion'ovskuyu scrawled built-in support for writing to NTFS partitions. I tried to slip the binarik of the cktst ntfs.kext from Snow Leopard into Lion, healed the rights, rebooted ... And it all worked! In short, the instruction:

Download This archive , In which there is a binarik from ntfs.kext from Mac OS X 10.6.8 Snow Leopard and a script. Unpack this archive on the Desktop. You should have an NTFS_Enabler folder in which there are two files: mount_ntfs and ntfs . We start the Terminal ( Terminal.app ) and execute:

1) To avoid writing superfluous sudo -s we immediately say that we will work on behalf of the administrator (root): sudo -s and press Enter. When prompted for the password, enter the superuser password and press Enter again.

2) We create a backup copy of the binarik from ntfs.kext : 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 binaric driver ntfs.kext , extended from Mac OS X 10.6.8 Snow Leopard, to the original binaries: 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) 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 copy of the original mount_ntfs daemon: mv /sbin/mount_ntfs /sbin/mount_ntfs_orig

6) Now, in place of the original mount_ntfs daemon, place the script-wrapper, which will "intercept" system commands and activate ntfs.kext for reading and writing: cp ~/Desktop/NTFS_Enabler/mount_ntfs /sbin/mount_ntfs

7) We 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 If kextload /System/Library/Extensions/ntfs.kext , there should be no errors.

9) Run Disk Utility and remount the disks with the NTFS file system. You do not need to reboot.

In the archive, there is also a text document with commands line by line, since the blog engine could poklbasit some of them. After doing the above 9 steps, disks and partitions with the NTFS file system will be mounted on reading and writing right away, without any "spelling" in fstab and reboots! You can disable NTFS write and return everything back using two console commands (you need an administrator password):
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 "Мниусы":

Pros:

  • High write speed, about 30 MB / s.
  • When deleting files, they are placed in the trash, rather than permanently deleted.

Minuses:

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

Therefore, readers such recommendation: for a default use native driver according to this method. But Keep NTFS-3G installed, but disabled (the Disable / Enable button in System Preferences) in case you need to mount the problem partition or partition the disk. I also remind you that everything has been tested and works since 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 running on Windows. Do not rely on third-party solutions, such as Tuxera NTFS, Paragon NTFS or NTFS-3G. Use the write function on NTFS only to exchange files, the loss of which is not critical, or if there is a backup.

Attention! Because of the numerous inconsistencies, I created a small package called NTFS Tools , which will do all the above described automatically.