My 2015 MacBook Pro has become unbootable after software update for 10.14.5 failed to install. Because I do not have a recent backup, I would like to create a disk image of the entire boot disk. However when booting an external device, mounting the MBP in target disk mode, and selecting New Image
from the file menu of Disk Utility.app
, the option is grayed out. As seen in the screenshot shown below. Can anyone suggest why it is unavailable?
-
If I select my main disk, I am getting the same disabled entry. So it might be an APFS thing, because it's encrypted or just because of the way it's mounted.– Eric DarchisCommented May 31, 2019 at 9:51
3 Answers
You can not create a disk image of a APFS volume. Your closest two alternatives are as follows.
The first alternative would be to image the APFS container of the APFS volume. All volumes in the container must be unmounted in order to image.
In the image shown below,
Macintosh HD
is a APFS volume. With theMacintosh HD
volume highlighted as shown below, click on theUnmount
button.The image below shows the
Macintosh HD
volume as unmounted.The next step is to image the volume's AFPS container. The container will not be shown by default in the UI; the
Show All Devices
option in theView
menu must first be selected, as shown below.After highlighting this volumes's APFS container, this container was selected to image from the menu bar, as shown below.
In the popup shown below, the file name for the image was changed to
Macintosh HD
. (The actual file name will beMacintosh HD.dmg
.) The location for the image file was changed to theDocuments
folder. Also, the format was changed tocompressed
.Click on the
Save
button to create the image.Note: The commands given below could have been used in place of the Disk Utility application.
diskutil unmountdisk disk2 hdiutil create -srcdevice /dev/disk2 ~/Documents/Macintosh\ HD
The second alternative would be to image the root folder of the APFS volume. The volume must be mounted in order to image.
Select to
Image from Folder...
from the menu bar, as shown below.In the popup, highlight the
Macintosh HD
volume, as shown below. Next, click on theChoose
button.In the popup shown below, the location for the image file was changed to the
Documents
folder. The format should becompressed
.Click on the
Save
button to create the image. In this case, you may be prompted for your password.Note: The command given below could have been used in place of the Disk Utility application.
hdiutil create -srcfolder /Volumes/Macintosh\ HD ~/Documents/Macintosh\ HD
-
4For several minutes I was very confused by your advice, because my
Disk Utility
is showing only the un-image-able volumes, not the devices or containers. But apparently there's an option in underView
in theDisk Utility
toolbar which allows you to view everything, which I guess must be set to volumes by default. Upon changing, I get a list like yours and can image the disk. So basically that's solved. Thanks! (But in case others may end up in my shoes, maybe your answer could also mention this) Commented May 31, 2019 at 14:10 -
-
1Good advice about all volumes needing to be unmounted. It's not obvious within the app, as the option to create the image is still there even when it is still mounted. However, after the operation begins I get an "Operation failed: Resource busy" error. Commented May 9, 2020 at 5:52
Thanks for the solve David! For anyone else, I was able to make an image of the container disk (in the example "disk2") but only from the command line. The Disk Utility GUI still showed as greyed out. I believe I ran both unmount and unmountDisk but it worked. Hopefully that helps someone else.
Sorry but the answer provided by @David Anderson, "You can not create a disk image of a APFS volume. " is incorrect...
Admittedly, Apple has either intentionally blocked this or has simply not gotten around to making a solution easily possible. BUT there IS a simple 3-step solution 9though FINDING the solution was NOT simple NOR straight-forward.
The ONLY solution to making a disk image of an APFS formatted drive that contains the operating system (macOS) can be found here:
How can you create a valid/reliable disk image of APFS drives?
-
@NikhilWagh Are you saying the OP's or mine at the link I supply? I do not have Catalina. Commented Jan 17, 2021 at 9:46