macOS의 명령줄에서 원시 APFS 파일 시스템을 어떻게 마운트합니까?

macOS의 명령줄에서 원시 APFS 파일 시스템을 어떻게 마운트합니까?

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는 특정 조건에서만 마운트되는 것 중 하나입니까? 그렇다면 어떤 조건인가요? 아니면 이미 가지고 있는 이미지를 마운트하기 위해 이 문제를 해결하는 방법이 있습니까?

관련 정보