How do I copy the whole partition map for a drive 'cloned' with DD? Same size hard drive for input and output of DD. Device block size was 4096 Bytes on input disk, 512 Bytes on output disk. Filevault 2 partitions on source.
Copy complete partition mapping
data-recoveryfilevaulthard drive
Related Question
- MacOS – EFI automounts on startup
- How to make sector level copy of external hard drive with FileVault 2 enabled
- Resize APFS partition in Mojave
- Is it any different to clone each partition separately VS cloning the entire disk, when clone is meant for data recovery
- How to rebuild Mac partition showing unexpected GPT table size
Best Answer
You mustn't clone the partition map of a 4096 Byte disk to a 512 Byte disk (and vice versa) directly. 4096 Byte/512 Bytes are the device block sizes here.
The major differences are the 1st block (block=0) and the GPT header (block=1):
While the MBR (PMBR) on a 512 disk only occupies 512 bytes (Block(512)=0), the MBR on a 4096-disk occupies the whole first block and the GUID starts at block(4096)=1 (which would translate to block(512)=8).
The first GPT header on a 512 disk occupies the second block (Block(512)=1), the first GPT header on a 4096-disk occupies the whole second block and the GUID partition table starts at block(4096)=2 (which would translate to block(512)=16).
Examples:
Device block size: 512
Device block size: 4096 (in parenthesis the "respective" 512 start block/block size)
As a consequence don't clone the partition table but create it yourself:
Then add the EFI, the main partition and the Recovery HD. Just start at block 40(512) on your disk(512) while multiplying the sizes of the disk(4096) partitions by 8:
Your source EFI partition probably has either 51200 blocks(4096) or 76800 blocks(4096).