Ok suppose I am reinstalling macOS in recovery mode using a bootable usb stick so in recovery mode when I format macintoshHD should I format the volume partition I mean when you click on the downward arrow beside macintoshHD(The Disk) a second disk/volume partition appears below the name, should I erase that one or the disk itself what is the difference?
Disk Utility – Difference Between Formatting a Volume Partition and a Disk
disk-utilityhard drivemacmacospartition
Related Solutions
Which partition to delete?
- Restart your computer and hold down the alt/option key.
- Select the recovery partition you wish to keep. For example, with El Captain OS X 10.11 installed, the recovery partition should be labeled "Recovery-10.11".
- Once booted to this partition, select the Terminal application for the menu bar.
- In the opened Terminal application window, enter the
mount
command. The partition you selected will show up in the list. The other recovery partition will be absent.
The absent partition is the one to delete.
How to delete it in a (preferably safe) way that would make my hard disk "clean" of everything but my main Macintosh HD partition?
By "clean", I assume you mean you want to remove the extra Recovery HD partition.
If you want to remove disk0s3
then you should first copy the contents of disk0s4
to disk0s3
. This can be down using the command given below.
sudo dd if=/dev/disk0s4 of=/dev/disk0s3 bs=16384
You will need to remove the 4th partition. Follow the steps below.
Start your computer from Internet Recovery. Press and hold the Command-Option+R keys immediately after you turn on your Mac and hear the startup sound. Your model is capable of using Internet Recovery, but your firmware may need to be updated. See Computers that can be upgraded to use OS X Internet Recovery.
Note: An alternative would be to startup using the Snow Leopard (OS X 10.6) or earlier DVD.
From the menu bar, open the Terminal application.
Enter the following commands in the Terminal application window.
diskutil unmountDisk /dev/disk0 gpt remove -i 4 /dev/disk0
Since I was the author of the answer linked, I'll have a go at explaining what's going on....
First off, it's important to note that the study FAST referenced from the SE Information Security community, Reliably Erasing Data From Flash-Based Solid State Drives is from 2011 and now 6 years old1.
The conference where this paper was presented was in Feb of 2011. Keep in mind that the SATA 3.1 spec which addressed the TRIM issues wasn't released until July of 2011
Within the TRIM specification, included in SATA 3.1,
A drawback of the original ATA TRIM command is that it was defined as a non-queueable command and therefore could not easily be mixed with a normal workload of queued read and write operations. SATA 3.1 introduced a queued TRIM command to remedy this.[62]
There are different types of TRIM defined by SATA Words 69 and 169 returned from an ATA IDENTIFY DEVICE command:
- Non-deterministic TRIM: Each read command to the Logical block address (LBA) after a TRIM may return different data.
- Deterministic TRIM (DRAT): All read commands to the LBA after a TRIM shall return the same data, or become determinate.
- Deterministic Read Zero after TRIM (RZAT): All read commands to the LBA after a TRIM shall return zero.
What all of this comes down to is which type of TRIM command your hardware is capable of executing. From the research I have done thus far, modern SSD's use either DRAT or RZAT depending on the "quality" of the drive (higher quality generally meaning RZAT is implemented).
In drives that implement DRAT, the deleted space is marked "unused" the data "can" be recovered, to a point. With drives that use RZAT, once the TRIM command is executed, the drive will return "zeros" regardless of whatever data is in that space.2
The 2016 MBP uses the SanDisk SDRQKBDC4 064G 64 GB3 NAND which is OEM'd specifically for Apple. Unfortunately, I haven't found detailed specs on concerning TRIM support for these particular drives (the White Paper they reference is 404). While I can't get my hands on any detailed tech specs of this drive, I would wager that it uses the RZAT TRIM command and not DRAT.
Long story short, if the SSD has only DRAT capability, there is the possibility of recovering data, but it's usually in a situation where you were able to stop the deletion process and immediately start data recovery. If it implement RZAT, you can be pretty sure the recovery will only get zeros back unless they take it (along with a court order) back to the manufacturer to get a low level recovery. 2
TL;DR
With new and modern Macs and macOS, if you wipe your drive and reinstall macOS on top of it it is highly unlikely that someone will be able to recover your files.
If you are concerned that the user will take the drive to a forensics lab to recover data, (that's a whole different issue), you should replace the drive. Anything less than that and you will be fine.
1 USENIX Conference on File and Storage Technologies, 2011.
2 Recovering Evidence from SSD Drives in 2014: Understanding TRIM, Garbage Collection and Exclusions. Sept. 23, 2014
3 MacBook Pro 13" Touch Bar Teardown Ifixit.com, ~December 2016.
Related Question
- Disk Utility – Fix Partition Map Problems After Clean Install
- MacOS – Differences between Clean Install from Bootable USB and Recovery Disk
- What’s the difference between “Initialize” and “Erase”
- Disk Utility – Why Recovery Volume’s Disk Utility is More Powerful Than Main Volume’s
- Disk Utility – Fix Lost Space After Merging Disk Partition in macOS Mojave
- MacintoshHD – How to Merge ‘Container disk1’ Back into MacintoshHD
Best Answer
The question answers itself - one is formatting (erasing) the whole disk and the other is formatting just the partition. If you have more than one partition, the first will wipe them all, the second will only wipe the one you selected.