MAC上安裝Fuse for macOS以支持讀取NTFS格式的移動硬盤

問題描述:

Mac電腦出廠設置爲只能讀取可是不能寫入NTFS格式的移動硬盤。使得在平常使用中存在很大的不便。html

研究過程:

  1. 因爲Mac不能寫入NTFS格式的移動硬盤,爲解決這個問題,在網上找了一些資料。有人說Mac自己能夠支持寫入,不過由於相關的版權問題。Mac在出廠時被設置爲不能寫入NTFS格式的硬盤。也有說後續版本可能直接設置爲不支持寫入NTFS格式了。
  2. 有些資料給出了指導方法,是經過終端使用命令行進行一些設置。不過看着方案中給出的步驟較爲多,並且感受裏邊的命令好像有點危險。因此沒太敢照着作。
  3. 後來發現了有人推薦了收費軟件好比 NTFS for MacTuxera NTFS for MacParagon NTFS for Mac等。有段時間也考慮過花點錢買個軟件省的操心了。後來在網上也看了一些人講這幾個軟件好像也有點問題。而後又考慮到平時實際上使用移動硬盤的概率也不過高。買軟件也不太便宜。因此最後沒有買。

解決方案:

後來在網上搜索解決方案,發現了一個看起來比較靠譜的。照着這個進行了操做,最終取得了成功。git

  1. 新買的移動硬盤該格式化爲 NTFS 仍是 exFAT? - Natumsol的回答 - 知乎github

  2. 點擊第一步回答中給出的網址連接 Fuse for macOS(開源免費的) api

  • 點擊 Downloads 跳轉到 Fuse for macOS的下載連接,如圖所示,選擇 dmg 安裝包,下載後安裝到Mac電腦上。
  1. 從第一步回答中給出的網址連接 Fuse for macOS(開源免費的)點擊 Wiki 跳轉到使用說明。
如下是教程的內容
0x01:安裝FUSE FOR MAC 3.5.8
我在附件中提供了連接.你們下載後打開安裝.有一點注意事項以下
在選擇安裝項目的時候.要勾選全部項目.而後一路安裝便可.

0x02:安裝homebrew包管理器
介紹與安裝官方講解得很棒我就很少說了.
按照提示正常安裝便可.
https://m.baidu.com/from=1019023i/bd_page_type=1/ssid=0/uid=0/pu=usm%401%2Csz%401320_2001%2Cta%40iphone_1_10.2_3_601/baiduid=3695F2983A495494A6C55AAFCA34B674/w=0_10_/t=iphone/l=1/tc?ref=www_iphone&lid=12250308442610989631&order=1&fm=alop&waplogo=1&tj=www_normal_1_0_10_title&vit=osres&waput=3&cltj=normal_title&asres=1&title=HomebrewmacOS%E7%BC%BA%E5%A4%B1%E7%9A%84%E8%BD%AF%E4%BB%B6%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8&dict=-1&w_qd=IlPT2AEptyoA_yixI5qcGT1xq_&sec=21181&di=a77f28080c702c7b&bdenc=1&tch=124.0.42.192.0.0&nsrc=IlPT2AEptyoA_yixCFOxCGZb8c3JV3T5ABSDMDcKAT0rzyeuhPTaC_d5WnrwLjWOF5j-&eqid=aa01d69fa6cbf8001000000059219b15&wd=

0x03:使用homebrew安裝ntfs-3g
安裝完homebrew以後.
執行以下命令:
brew install ntfs-3g
稍等片刻便可安裝完畢

0x04:將ntfs-3g驅動程序做爲macOS的默認掛載驅動.
執行如下兩條命令:
sudo mv "/Volumes/xxx/sbin/mount_ntfs" "/Volumes/xxx/sbin/mount_ntfs.orig"
sudo ln -s /usr/local/sbin/mount_ntfs "/Volumes/xxx/sbin/mount_ntfs"
注意此處的xxx應該改成你係統安裝磁盤的名稱.

0x05:重啓&ENJOY!

(注:這裏個人是把上邊的 xxx 替換成了 Macintosh HD )安全

  1. 因爲前面官方Wiki是英文的,且文章較多。因此參考了第三步中評論中給出的第三方教程。在官方Wiki中我重點關注了裏邊涉及到 NTFS-3G 的部分。
  • 下面對這部分中涉及到的相關命令進行簡單介紹:app

  • Installation:打開終端,使用命令行經過 Homebrew 安裝 NTFS-3G (Homebrew 是Mac上經常使用的包管理工具,在此再也不贅述。)執行如下命令: brew install ntfs-3giphone

  • 安裝 NTFS-3G 以後。執行如下命令:ide

sudo mkdir /Volumes/NTFS
sudo /usr/local/bin/ntfs-3g /dev/disk1s1 /Volumes/NTFS -olocal -oallow_other
  • 在執行這步時可能會提示權限不夠,執行時可能須要把其中的 /usr/local/bin/ntfs-3g 替換成 /usr/local/sbin/mount_ntfs 此處存疑。工具

  • Auto-mount NTFS volumes in read-write mode

Even though you have installed NTFS-3G, newly connected NTFS volumes will still be auto-mounted in read-only mode.
To change this you need to replace Apple's NTFS mount tool /sbin/mount_ntfs with the one provided by NTFS-3G.
  • 這裏引用Wiki原文,新安裝 NTFS-3g 以後,NTFS格式的磁盤仍是會按只讀模式掛載,須要把蘋果原來的NTFS掛載工具替換爲 NTFS-3g 提供的。ui

  • Note:

On OS X El Capitan files in the /sbin directory are protected from being tampered with by a new security feature called
System Integrity Protection (SIP). SIP does not protect you against the security threat outlined above.

To replace /sbin/mount_ntfs with the version provided by NTFS-3G you will need to reboot your Mac in recovery mode before proceeding. 
See https://support.apple.com/en-us/HT201314 for details on how to start the recovery system.

Once in recovery mode open a new Terminal window from the Utilities menu.
  • 以上引用Wiki原文,Mac的 /sbin 目錄被 System Integrity Protection (SIP) 安全特性保護了。修改其中的內容時會提示權限不夠。須要參照後邊的教程來臨時關閉這個安全特性。

  • If volume is APFS, then it will need to be unlocked to install mount_ntfs. Let's assume that Macintosh HD is identified as disk1s1.

diskutil list
diskutil apfs unlockVolume disk1s1
  • To replace Apple's NTFS mount tool with the one provided by NTFS-3G execute the following commands in Terminal. This will back up the original mount tool to /Volumes/Macintosh HD/sbin/mount_ntfs.orig.
sudo mv "/Volumes/Macintosh HD/sbin/mount_ntfs" "/Volumes/Macintosh HD/sbin/mount_ntfs.orig"
sudo ln -s /usr/local/sbin/mount_ntfs "/Volumes/Macintosh HD/sbin/mount_ntfs"
  • 執行這個命令來備份原來的ntfs 掛載工具到 /Volumes/Macintosh HD/sbin/mount_ntfs.orig 並把新安裝的 NTFS-3g 帶來的掛載工具當作默認的ntfs 掛載工具。 這個命令會改變Mac的 /sbin 目錄。須要參照下邊的教程來臨時關閉SIP保護特性。

  • 臨時關閉SIP特性須要重啓時按住 Command (⌘)-R 進入 recovery 模式。並打開終端,我在實際操做時有幾回沒找到打開終端的地方,後來又找到了。進入 recovery 模式後的圖片以下所示,打開終端是在最頂上的狀態欄裏,而不是從下圖中這四個之中進入。具體可開關這個特性可參照下邊的教程。另外注意及時再把這個保護特性給打開。

  • 蘋果電腦Mac系統如何關閉SIP系統完整性保護

相關文章
相關標籤/搜索