How-to: Read and Write NTFS Windows Partition on Mac OS X

 

Updated: from MacFuse 0.1.0 Beta 6 to 0.3.0

Users running Mac OS X with Bootcamp Windows may struggle to modify or update your documents and files in the Windows partition - usually it is in NTFS File System format which you can read the drive natively in Mac OS X but not write onto it.

Recently Amit Singh, a Google employee, releases a implementation called MacFUSE which makes it possible to use any FUSE (File-system in USErspace) file systems in Mac. And the most useful FUSE is the NTFS-3G Read/Write Driver, which ables system to load NTFS with read and write capability. This is truly the greatest news for dual booting Mac OS X and Windows XP or Vista.

Without going into great deal of technical details and compilation of the source code, I found out users around Internet already came up with binary version (in DMG) of MacFUSE and ntfs-3g, ready to install (credit to ShadowOfGed at AppleNova). Here are the instructions on how to use MacFUSE and NTFS-3G. It does require a little of administration skills as it involves running commands in the Terminal.

MacFUSE/NTFS-3G works for me, but as this is an experimental software, so back up your data, and try it at your own risk.



Update: 藉由加上locale參數,目前可以讀寫中文檔名沒問題。

—-
最近Mac圈最大的新聞大概就是 Google 工程師 Amit Singh 最近利用傳說中的20%」時間把FUSE這個user-space file system的東西移植到了Mac上。
為什麼這個東西這麼重要,因為在Linux上有很多有趣的檔案系統實現是透過FUSE這層API來寫。使用這層API,你不需要知道Kernel的處理過 程,只需要專注在檔案系統的部份而且又穩定。所以很多檔案系統的專案就慢慢移植到了FUSE上,如 ntfs-3g (NTFS Read/Write Driver), sshfs (透過ssh去mount別台主機的檔案), GmailFS (用Gmail存資料) ……等等。

因此開發出了MacFUSE後,只需要把那些filesystem driver重新compile,就可以搬到Mac上了。而Mac圈使用者最需要的大概就是讀寫 NTFS 了!

使用方法如下: (您需要事先安裝 XCode, 在您的OSX光碟中可以找到。)

1. 下載MacFUSE 並且使用以下指令安裝:
# sudo tar -C / -jxvpf fuse-binaries-0.1.0b006.tar.bz2
2. 下載 ntfs-3g 的原始碼,並且解開壓縮檔(雙點檔案就可以)
3. 打開目錄,使用編輯器修改 configure 這個檔案,先找到 "case 「$target_os」 in",然後把下面的 linux*) 改成 linux*|darwin*);也就是利用 linux下的設定接受Darwin的環境。不修改的話,他會跟你說ntfs-3g只能在 linux下使用
4. 接著使用 終端機 切到剛才的目錄,輸入:
# ./configure –prefix=/usr/local CFLAGS= "-D_FILE_OFFSET_BITS=64 -D__FreeBSD__=10"
來產生Makefile
5. 輸入 make 開始編譯
6. 輸入 sudo make install 以及您的密碼並進行安裝,命令執行完成就安裝好了,接下來要開始 mount NTFS partition進來。
7. 打開磁碟工具程式,選擇您的NTFS磁碟,選擇資訊磁碟機識別符 : disk1s1,您會看到類似這樣的資訊,請記錄下來。
8. 回到終端機,我們要先建立 mount point。
# sudo mkdir /Volumes/[你希望mount進來的名字]
9. 進行磁碟機掛載程序:
# mount ntfs-3g /dev/[磁碟識別符] /Volumes/[你希望mount進來的名字] -o ping_diskarb,volname=[你希望mount進來的名字]」,locale=zh_TW.UTF-8
(若[你希望mount進來的名字]中間有空格,請也在Volumes後面在名字前後加上引號,成為 「[你希望mount進來的名字]」)
(若您不是正體中文使用者,請修改zh_TW.UTF-8為您地區的locale string)
10. Done! 您可以在 Finder 中看到了。

要提醒您的是,目前MacFUSE + ntfs-3g的組合可以正確的處理中文檔名。試玩前請先備份好所有資料!

相關連結:




arrow
arrow
    全站熱搜

    Bluelove1968 發表在 痞客邦 留言(1) 人氣()