What’s the difference between “Initialize” and “Erase”

disk-formatdisk-utility

I was recently handed an old backup hard drive that my co-workers couldn't read because it used one of the EXT file systems. They didn't tell me what they wanted at first, so I assumed I should try to get the data off of it.

I plugged it in, and my a dialog asked me to initialize, eject, or ignore.
enter image description here

I ignored it, because I knew I would need to install osxfuse and ext4fuse, which I did, and I was able to read the disk just fine. Only after that, my coworker told me that he wanted the disk erased and formatted with a filesystem that he could use on his PC. But even though I had the disk mounted and readable, my attempts to format it failed. I tried:

  • Disk Utility > Erase > ExFAT, which gave a simple "operation failed" error,
  • diskutil eraseVolume ExFAT NewName disk2, which gave a "cannot unmount disk" error,
  • umount, which gave a "disk isn't mounted" error, and
  • all of the above after unplugging the drive various ways.

Finally, I rebooted, and when I plugged in the drive again, I was asked to initialize, eject, or ignore. I choose to initialize this time, and suddenly I could erase to various formats with no issues.

This behavior surprised me because I assumed "initialize*, erase, and format were all synonyms. I guess they're not. So what's the difference? How can one force the initialize dialog to appear?

Best Answer

Looking up the definitions, we find:

Initialize: On Apple Macintosh computers, initializing a disk means formatting it.

As erase is more a more generic term; from Merriam-Webster we get:

Erase: to remove (recorded matter) from a magnetic medium; also : to remove recorded matter from erase a videotape; to delete from a computer storage device erase a file

When you initialize a device, you make it usable by the operating system. When you erase a device/file, you remove the contents. Initializing a device previously used with an incompatible format will inherently, erase the device.

To put it another way, you can erase without initializing, but you cannot initialize without erasing.

diskutil's eraseDisk command requires you to specify the format so in effect you are always initializing the disk.

However, there is also the reformat command that, that allows you to erase an existing volume with same name and type.