![如何在 macOS 上從命令列掛載原始 APFS 檔案系統?](https://rvso.com/image/1555388/%E5%A6%82%E4%BD%95%E5%9C%A8%20macOS%20%E4%B8%8A%E5%BE%9E%E5%91%BD%E4%BB%A4%E5%88%97%E6%8E%9B%E8%BC%89%E5%8E%9F%E5%A7%8B%20APFS%20%E6%AA%94%E6%A1%88%E7%B3%BB%E7%B5%B1%EF%BC%9F.png)
建立包含 APFS 檔案系統的原始映像非常簡單:
$ hdiutil create -megabytes 1 -layout NONE -fs apfs -volname unicode unicode.dmg
created: /Users/daniel/test/apfs/unicode.dmg
現在我想將文件放入其中以進行我嘗試執行的特定測試,但我似乎無法附加它:
$ hdiutil attach unicode.dmg
hdiutil: attach failed - no mountable file systems
診斷:
$ hdiutil imageinfo unicode.dmg
nx_kernel_mount:1366: checkpoint search: largest xid 2, best xid 2 @ 3
nx_kernel_mount:1366: checkpoint search: largest xid 2, best xid 2 @ 3
nx_kernel_mount:1366: checkpoint search: largest xid 2, best xid 2 @ 3
nx_kernel_mount:1366: checkpoint search: largest xid 2, best xid 2 @ 3
nx_kernel_mount:1366: checkpoint search: largest xid 2, best xid 2 @ 3
nx_kernel_mount:1366: checkpoint search: largest xid 2, best xid 2 @ 3
Backing Store Information:
URL: file:///Users/tester/test/apfs/unicode.dmg
Name: unicode.dmg
Class Name: CBSDBackingStore
Class Name: CRawDiskImage
Checksum Type: none
Size Information:
Total Bytes: 1048576
Compressed Ratio: 1
Sector Count: 2048
Total Non-Empty Bytes: 1048576
Compressed Bytes: 1048576
Total Empty Bytes: 0
Format: UDRW
Format Description: raw read/write
Checksum Value:
Properties:
Encrypted: false
Kernel Compatible: true
Checksummed: false
Software License Agreement: false
Partitioned: false
Compressed: no
Segments:
0: /Users/tester/test/apfs/unicode.dmg
partitions:
partition-scheme: none
block-size: 512
appendable: false
partitions:
0:
partition-name: whole disk
partition-start: 0
partition-synthesized: true
partition-length: 2048
partition-hint: unknown partition
partition-filesystems:
APFS: Untitled
burnable: false
Resize limits (per hdiutil resize -limits):
min cur max
2048 2048 2048
這裡的輸出看起來很不穩定,因為區塊大小和磁碟區標籤是錯誤的。所以我不確定發生了什麼事。 APFS 是只在某些特定條件下安裝的東西之一嗎?如果可以的話,什麼條件?或者有沒有辦法解決它來安裝我已經擁有的這個映像?