Index.前言‎ > ‎My MacOS X‎ > ‎Homebrew‎ > ‎

NTFS


步驟


第一步 安裝 HomeBrew

  1. /usr/bin/ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)

參考鏈接: https://github.com/mxcl/homebrew/wiki/installation

第二步 安裝 ntfs-3g

  1. brew install ntfs-3g
  2. sudo /bin/cp -rfX $(brew --prefix fuse4x-kext)/Library/Extensions/fuse4x.kext /System/Library/Extensions
  3. sudo chmod +s /System/Library/Extensions/fuse4x.kext/Support/load_fuse4x

參考鏈接: http://fuse4x.org/


http://www.geeknchic.com/category/quick-tips/osx/


The previos command should install ntfs-3g and all of its dependencies which include fuse4x-kext (the kernel extension; requires reboot after install), and fuse4x. Note in the brew command output for fuse4x-kext it tells you a few commands to install the kernel extension which should be something like the following (note the version numbers may be different):

sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions
sudo chmod +s /Library/Extensions/fuse4x.kext/Support/load_fuse4x

Finally, if you want to replace the default Mac OS X auto mounter with the one that ntfs-3g uses issue the following commands which will back up the current mount command and then link to the ntfs-3g mount command. Doing this will make it so whenever you plug an NTFS formatted USB drive into your Mac it should mount it using ntfs-3g and therefore be writable. Here are those commands (note again that version numbers in directory paths may be different than yours so you may need to cd to the /usr/local/Cellar/ntfs-3g directory to get the proper version number directory for the last command):

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

sudo ln -s /usr/local/Cellar/ntfs-3g/2012.1.15/sbin/mount_ntfs /sbin/mount_ntfs
# 留意版本路徑會變動, 勿照抄.


  1. sudo chmod 0755 /sbin/mount_ntfs
  2. sudo chown 0:0 /sbin/mount_ntfs

搞定

附加步驟: 萬一你想復原

  1. sudo mv /sbin/mount_ntfs{.orig,}
  2. # 運行上面這段代碼即可

常見問題

如果你升級了 Fuse4x, 需要先卸載舊的內核擴展再進行上面的第二步. 首先確認一下那些基於 FUSE 的文件系統有沒有跑著:

mount -t fuse4x

接著卸載那些 FUSE 文件系統和內核擴展:

sudo kextunload -b org.fuse4x.kext.fuse4x

參考資料: NTFS WRITE SUPPORT ON OSX LION WITH NTFS-3G



Comments