[Mac] 使用 disktype 辨別外接硬碟的檔案系統

[Mac] 使用 disktype 辨別外接硬碟的檔案系統

最近公司 Linux 機器的硬碟壞了,把它接到 Mac 上想把資料救出來,

結果出現 The disk you inserted was not readable 磁碟無法讀取的訊息:

Screen Shot 2016-07-18 at 10.37.19 AM

 

這錯誤訊息代表 Mac 看不懂這 Linux 硬碟上的檔案系統 (file system)…

上網查了一下,有人說可以用 Disk Utility 來看~

開啟 Disk Utility,點下外接硬碟 (本例中的 WDC WD50),

這邊沒看到什麼資訊,不過是在設備 /disk2 (/dev/disk2),可以先記一下:

Screen Shot 2016-07-18 at 10.38.57 AM

 

按下 Info 按鈕來查看 File system… 但很不幸的它並沒能成功辨認出來:

Screen Shot 2016-07-18 at 10.38.49 AM  

 

有點傷腦筋… 雖然我知道這個 Linux 硬碟是 Ubuntu 做出來的,

但我沒辦法肯定它是 EXT3 或 EXT4 或 XFS,這樣就沒辦法找對應的工具來讀資料了…

找了一下,發現 disktype 這個工具正適合拿來辨認分割區的檔案系統~

 

1. 安裝 disktype

用 Homebrew 就可以直接安裝:

brew install disktype

 

2. 執行 disktype

在 Terminal 裡面執行 sudo disktype <硬碟設備名稱>,

像我們剛剛看到 disk2,那設備名稱就是 /dev/disk2: 

testuser@localhost ~ $ sudo disktype /dev/disk2
--- /dev/disk2
Block device, size 465.8 GiB (500107862016 bytes)
DOS/MBR partition map
Partition 1: 433.9 GiB (465865539584 bytes, 909893632 sectors from 2048, bootable)
Type 0x83 (Linux)
Ext3 file system
UUID 850EA140-7405-425F-A971-3D93E42BA409 (DCE, v4)
Last mounted at "/"
Volume size 433.9 GiB (465865539584 bytes, 113736704 blocks of 4 KiB)
Partition 2: 31.89 GiB (34239153152 bytes, 66873346 sectors from 909897726)
Type 0x05 (Extended)
Partition 5: 31.89 GiB (34239152128 bytes, 66873344 sectors from 909897726+2)
Type 0x82 (Linux swap / Solaris)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 31.89 GiB (34239143936 bytes, 8359166 pages of 4 KiB)

 

執行之後可以看到有兩個分割區 (Partition),第一個分割區是 Ext3,第二個是 Linux swap,

相當輕鬆就解決問題囉~

 

參考資料:How do I identify the file system of a drive in Mac OS?

 

(本頁面已被瀏覽過 459 次)

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料