Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

vitalz

macrumors newbie
Original poster
Aug 14, 2020
20
5
Myensk, Belarus
Hi there all,

I try to clone my old disk with Terminal 'dd' command into an internal physical [soldered] disk of a MacBook Pro 2019.
My old 2TB disk has macOS Catalina and Windows 8 Bootcamp, so I wish to have its exact clone on the newest MacBook's 2TB soldered disk.

A Terminal command looks like:
Bash:
sudo dd if=/dev/rdisk4 of=/dev/rdisk0 bs=1m
Yet as a matter of fact when 'dd' commands completes ("successfully") an internal disk doesn't look to contain desired content (even structure of partitions doesn't match to an old disk). [I've tried: Target mode for the newest MacBook, booted from Internet Recovery mode, booted from a USB flash with Catalina installed]

Is there a way to clone an old disk on a soldered internal disk?
 

Bigwaff

Contributor
Sep 20, 2013
2,778
1,851
First, you are using the correct block size for target disk? Second, does the source Mac have FileVault encryption enabled?
 

vitalz

macrumors newbie
Original poster
Aug 14, 2020
20
5
Myensk, Belarus
you might have the wrong value…
My long experience is that a bs=1m param for a 'dd' command works fine for SSD disks. I cloned quite a lot of SSD disks for MacBooks, but disks were removable in those MacBooks (2009 - 2015 make years). A soldered drive as a target disk seems to be a different story...
 
  • Like
Reactions: _Mitchan1999

vitalz

macrumors newbie
Original poster
Aug 14, 2020
20
5
Myensk, Belarus
The problem, rather than dd, may be that the T2 chip
I either wonder whether T2 chip causes any issue. But I expect it should not when encryption is turned off.

In my case, No security boot and Allow booting from external media options are applied. Yet I observe behavior that no security mode does not allow to dd on an internal physical disk. Why?! I just upgrade my hardware and want an upgraded machine to be still working.
 

chrfr

macrumors G5
Jul 11, 2009
13,734
7,310
I either wonder whether T2 chip causes any issue. But I expect it should not when encryption is turned off.

In my case, No security boot and Allow booting from external media options are applied. Yet I observe behavior that no security mode does not allow to dd on an internal physical disk. Why?! I just upgrade my hardware and want an upgraded machine to be still working.
You probably just need to install an OS directly and then use a tool like Winclone to migrate the Bootcamp install.
 

Bigwaff

Contributor
Sep 20, 2013
2,778
1,851
My long experience is that a bs=1m param for a 'dd' command works fine for SSD disks. I cloned quite a lot of SSD disks for MacBooks, but disks were removable in those MacBooks (2009 - 2015 make years). A soldered drive as a target disk seems to be a different story...
From my 2019 16" MBP w/ 1TB SSD ... note the "Device Block Size" entry
Bash:
❯ diskutil info disk0
   Device Identifier:         disk0
   Device Node:               /dev/disk0
   Whole:                     Yes
   Part of Whole:             disk0
   Device / Media Name:       APPLE SSD AP1024N

   Volume Name:               Not applicable (no file system)
   Mounted:                   Not applicable (no file system)
   File System:               None

   Content (IOContent):       GUID_partition_scheme
   OS Can Be Installed:       No
   Media Type:                Generic
   Protocol:                  PCI-Express
   SMART Status:              Verified

   Disk Size:                 1.0 TB (1000555581440 Bytes) (exactly 1954210120 512-Byte-Units)
   Device Block Size:         4096 Bytes

   Media OS Use Only:         No
   Media Read-Only:           No
   Volume Read-Only:          Not applicable (no file system)

   Device Location:           Internal
   Removable Media:           Fixed

   Solid State:               Yes
   Virtual:                   No
   Hardware AES Support:      Yes
 

Bigwaff

Contributor
Sep 20, 2013
2,778
1,851
bs=1m in the dd command is used to make it copy faster. It does not need to match the block size of the disk
Thank you for info. Though it take much longer, I was under impression the block size had to match so boot manager understanding of partition table was aligned. What happen if source disk have block level errors? If copy with bigger block size than source, won’t copy create bigger block that have error, losing more data? I guess if source disk good, all is good regardless of dd command block size specified.
 

vitalz

macrumors newbie
Original poster
Aug 14, 2020
20
5
Myensk, Belarus
What happen if source disk have block level errors?
A good point.

Yet I expect my source SSD doesn't have errors. And I cloned SSDs for macs in past, I believe their block sizes always were less then bs=1m passed as a param (as far as I remember).
 

Grumpus

macrumors 6502
Jan 17, 2021
387
222
On an unrecoverable i/o error, dd will quit unless you've used conv=noerror on the command line.

My understanding is that internal drives on T2-equipped machines are encrypted even when filevault is not in use, and that could be the problem here. Or at least 'a' problem.

If this scheme has any hope of working at all, you should be able to boot the 'new' machine from the external drive. Have you tried that?
 

joevt

macrumors 604
Jun 21, 2012
6,979
4,267
What happen if source disk have block level errors?
In that case, you should use ddrescue which you can install with homebrew. ddrescue should probably be used for copying disks anyway. But it's not going to help with the T2 Mac issue.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.