How to create image of Macintosh HD

I would like to create an exact image of my computer drive, both "Macintosh HD" and "Data".


This image should contain the empty sectors of the hard drive as well as all the deleted files. I would like the image to be an exact clone.


Can Disk Utility be used to create this type of image?


Why is Disk Utility > Image > New Image > Image from "Data" grayed out? I have tried running it from both my booted mac and from recovery mode.


I am running macOS 11.3 on Macbook Air (M1, 2020).


MacBook Air

Posted on Jul 4, 2022 9:42 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 10, 2022 4:37 PM

See my earlier post to the reference to GNU ddrescue which is a free open source command line utility created for data recovery purposes. You do need to be extremely careful though since it is very easy to make a catastrophic mistake when using the command line even if you are an expert with the command line.


Standard macOS will not perform a bit for bit copy/clone.


I'm not aware of any native macOS download for GNU ddrescue as I had to compile it myself from the source code even years ago. I discovered that macOS is not a good OS for data recovery, so I just ended up using a Linux system to run GNU ddrescue since Linux does not get in the way of the process. If you want to use macOS and GNU ddrescue, then you will most likely need to install Homebrew which can allow you to easily install GNU ddrescue.


Homebrew installation:

https://brew.sh/


Forumula to install GNU ddrescue with Homebrew:

https://formulae.brew.sh/formula/ddrescue


GNU ddrescue information & documentation:

https://www.gnu.org/software/ddrescue/


Even with a bit for bit clone, you will most likely need to use a file system repair utility if the file system is corrupted or possibly even a data recovery app such as Data Rescue. Making a bit for bit copy is good when doing data recovery so that you can work from the clone while leaving the source drive untouched. Ideally you never touch the source drive again after the initial clone. I will either make a second clone of the clone, or copy the raw image file so I have two copies. That way if a mistake is made I can start over by making a clone of the clone (or another copy of the raw image file).


If the SD card is producing errors when attempting to access the data, then you should seriously consider contacting a professional data recovery service instead. If the failure gets worse during your attempts, then even a professional data recovery service may not be able to recover the data. Sometimes you may only get one chance at recovering the data from a failing device, so make sure to choose wisely.


Similar questions

12 replies
Question marked as Top-ranking reply

Jul 10, 2022 4:37 PM in response to myfirstapple1

See my earlier post to the reference to GNU ddrescue which is a free open source command line utility created for data recovery purposes. You do need to be extremely careful though since it is very easy to make a catastrophic mistake when using the command line even if you are an expert with the command line.


Standard macOS will not perform a bit for bit copy/clone.


I'm not aware of any native macOS download for GNU ddrescue as I had to compile it myself from the source code even years ago. I discovered that macOS is not a good OS for data recovery, so I just ended up using a Linux system to run GNU ddrescue since Linux does not get in the way of the process. If you want to use macOS and GNU ddrescue, then you will most likely need to install Homebrew which can allow you to easily install GNU ddrescue.


Homebrew installation:

https://brew.sh/


Forumula to install GNU ddrescue with Homebrew:

https://formulae.brew.sh/formula/ddrescue


GNU ddrescue information & documentation:

https://www.gnu.org/software/ddrescue/


Even with a bit for bit clone, you will most likely need to use a file system repair utility if the file system is corrupted or possibly even a data recovery app such as Data Rescue. Making a bit for bit copy is good when doing data recovery so that you can work from the clone while leaving the source drive untouched. Ideally you never touch the source drive again after the initial clone. I will either make a second clone of the clone, or copy the raw image file so I have two copies. That way if a mistake is made I can start over by making a clone of the clone (or another copy of the raw image file).


If the SD card is producing errors when attempting to access the data, then you should seriously consider contacting a professional data recovery service instead. If the failure gets worse during your attempts, then even a professional data recovery service may not be able to recover the data. Sometimes you may only get one chance at recovering the data from a failing device, so make sure to choose wisely.


Jul 4, 2022 5:31 PM in response to myfirstapple1

Disk Utility has never been a good app to clone a macOS boot drive even years ago before the new security restrictions built into macOS 11.x+. In theory it is possible, but when I've tried it in the past it would not always work. In fact sometimes I find Disk Utility even has problems making an image of a large folder.


As @P. Phillips mentioned the two macOS apps which have been around for years which have been great for making a clone of a macOS boot drive including the two APFS volumes (system & data) plus the hidden recovery partition/volume as well (at least with CCC).


However, with recent updates to macOS 12.x Monterey, Apple has been making new changes which have affected the ability of these apps to clone a macOS boot volume. Basically being able to clone a macOS boot volume is dead with macOS 12.4 (definitely for later versions of macOS). The developer of CCC has stated that the best that can happen now with the signed & sealed system volume is to clone your data volume and restore it after you perform a clean install of the macOS system volume. When using CCC to clone a macOS 11.x+ boot drive you will need to right-click or Control-click on the destination item in CCC and select "Legacy" to make the clone bootable, otherwise only the data is transferred (I'm not sure this still works with macOS 12.4).


These macOS cloning apps do not clone the empty sectors as these apps are basically gloried file copy apps with special abilities, although when using these apps to clone a macOS 11.x+ system these days, these apps must utilize the macOS ASR utility which is basically transferring an APFS snapshot which may be actually be doing more of an actual clone of the file system.

https://bombich.com/kb/ccc6/cloning-macos-system-volumes-apple-software-restore


If you wanted to clone the entire physical layout of a drive sector by sector, then you would need to use a special utility to do so, but this won't work correctly with later versions of macOS nor does this option work when transferring to a different size drive (impossible to go smaller, but going to a larger drive leaves wasted space that can be difficult to merge). While macOS has a built-in command line utility "dd" which does this low level sector by sector clone, it is both dangerous/risky to use plus it does not show the progress or allow for resuming an interrupted clone. The best free open source command line utility which takes "dd" and makes it better is GNU ddrescue which is used by many data recovery specialists since it adds these features and also has the ability to ignore bad sectors on a drive. Both of these utilities are dangerous/risky to use because it is very easy to select the incorrect destination which can overwrite important data. "dd" has been know as "disk detroyer" and "data destroyer".


You should definitely read some of the CCC developer's articles regarding cloning macOS boot volumes with Monterey and future releases of macOS:

https://bombich.com/kb/ccc6/macos-monterey-known-issues


https://bombich.com/kb/ccc6/frequently-asked-questions-about-ccc-and-macos-11



Jul 4, 2022 2:01 PM in response to myfirstapple1

Do not believe this can be done using any Built-in Apple Utility.


This is in part because Big Sur and again in Monterey the Operating System is housed in a Sealed and Read Only Volume.


It can not be opened by the User nor can any Third Party Software.


It can only be opened and or modified by Apple and usually only when a update or UpGraded occurs.


There is Third Party Software to make Clone copies to an external drive


In no preferred order


SuperDuper


Carbon Copy Cloner

Jul 5, 2022 6:17 AM in response to HWTech

If not already read from CCC


Do I have to erase the destination to make a bootable copy of the system?


If your Mac is running Big Sur or later, yes. As of macOS Big Sur, we're required to use Apple's APFS replicator (edited by me ASR ) to establish a bootable copy of an APFS volume group. We're unable to leverage the SafetyNet feature, and it's no longer appropriate to store other data on the destination volume. You must dedicate a volume to your bootable copy of the system.

Jul 5, 2022 2:52 AM in response to myfirstapple1

To add a few points to the already excellent posting by @HWTech above ;


1 - The Apple APFS process called ASR is really the Root Issue in attempting to make any type of Clone of the Operating System. As mentioned, Apple has basically made the " Walled Garden of Eden " aka the Apple Eco-System even higher making such cloning even more difficult if not almost impossible.


2 - Very Important for the well being and Security of this computer " I am running macOS 11.3 on Macbook Air (M1, 2020)..


This computer needs attention. The Current version of Big Sur as of May 2022 is Version 11.6.7


A Time Machine Backup  is very useful and should be performed Before doing any and all updates to Big Sur.

Jul 5, 2022 4:38 AM in response to HWTech

> CCC and select "Legacy" to make the clone bootable, otherwise only the data is transferred (I'm not sure this still works with macOS 12.4)


CCC can still make bootable "legacy" macOS 12.4 clone but it needs to erase the target in the process. I use it and then continue with "normal" data-only clones. Some macOS update occasionally might make the clone unbootable (CCC developer believes that some info from the out-of-sync data volume might cause this) but that can be prevented by either a) updating also the clone before doing a data-only clone to it or (you never know when you need to do that, but many recent macOS updates have been OK in this respect) or b) apply full macOS installer to it to make it bootable again (the data-volume is left intact).

Jul 5, 2022 6:10 AM in response to Matti Haveri

Matti Haveri wrote:

CCC can still make bootable "legacy" macOS 12.4 clone but it needs to erase the target in the process.

Thanks for confirming this. That is what I normally do, but haven't had to work with Monterey much yet, although I have seen others posting about CCC not working probably because they are not erasing the destination first.

Jul 10, 2022 7:45 AM in response to myfirstapple1

Yes.


Sector by sector images are not usually the best option as they have limited use for most people and macOS may not always be able to access the raw image if stored in a raw image file. The only time I've ever used a raw sector by sector image/clone is for data recovery or creating a bootable Linux USB installer. Otherwise, the file cloning method is usually best.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to create image of Macintosh HD

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.