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

romanof

macrumors 6502
Original poster
Jun 13, 2020
371
390
Texas
I can't decide if MacOS is being dumbed down or moving up into rarified heights of intellectualism.

The issue. I was given two large Seagate disk drives - apparently almost new since they are 6 and 8 TB respectively. Under no circumstances am I going to plug in a pair of unknown devices to my desktop, so the plan was to use my old deprecated Intel mini for the task of blanking them out. It has been a long time since I did such low level disk stuff on a Mac, but things have apparently changed. On the larger, diskutil shows three partitions - 5tb, 2tb and 1tb. An APFS, an ordinary Mac partition, and something unknown. Whatever. I will erase them all.

However... While the unknown partiton could be erased, neither of the others could. The '-' button is blanked out on both. A search for the answer gained me the helpful info from Apple that "if the '-' is blanked out, you cannot erase the partition." WTF??

So, going into terminal mode, I brought up the old reliable diskutil and started eraseDisk. Up comes "Unable to begin erase operation: This operation is restricted by Sandbox; check your settings in System Preferences." Following the suggested path, I found no reference to the issue, but did find a blurb that said in effect, "Sandbox cannot be used to repartition unidentified disks..." Again, WTF? Who is in charge of "identifying disks?" Is Apple is saying that if you need to repartition from the initial setup, sorry - go buy a new drive?"

The fix, of course, is to attach it to my Linux tower and clear it from there. Unfortunately, it is in a state of unworking until my sticks of memory are returned from OWC on a warranty issue.

Is my assumption correct that Apple has ruined an old Unix utility (that couldn't possibly be misused by a casual user - they would have no idea that it exists) or am I missing something?

Probably the latter, since I have always done low level work on a Linux machine.

Edit. Sorry. Main desktop Studio Max, with Ventura and all patches. Box being used (unsuccessfully) is Intel Mini 6 core, also Ventura and up to date.
 
Last edited:
In Disk Utility.app, does the window show all devices, or only volumes? It sounds like it's showing only volumes.


Here are the instructions to erase a complete disk (storage device):

Erasing the entire disk offers choices for partition scheme and number of partitions.


Found with search terms: disk utility user guide erase disk
 
Ah, but I had an immediate epiphany just about the time I clicked save on the above post. I dusted off my old trusty MacBook Air, 2017, but this Mac has Mojave. I plugged in the drives, then with Mojave DiskUtil, clicked erase, and the Air effectively replied, "Aye, Aye," replacing the multiple partitions with an 8 TB one (and 6, on the other), then mounting perfectly usable and blanked drives. So Apple IS jacking with standard Unix utilities.
 
Last edited:
In Disk Utility.app, does the window show all devices, or only volumes? It sounds like it's showing only volumes.


Here are the instructions to erase a complete disk (storage device):

Erasing the entire disk offers choices for partition scheme and number of partitions.


Found with search terms: disk utility user guide erase disk
I tried deleting all partitions, then all volumes, then the entire disk. Then erased each partition one by one, and tried again. Inside of the DiskUtil gui, I could never get the '-' button to unblank. In terminal, I always got the "Sandbox will not allow that" message. Didn't try booting in recovery or playing with permissions in terminal. Probably would have if I hadn't thought of using the Air.
 
My method to reliably get rid of all partitions of a disk is to overwrite the first 16MB with zeroes. That usually does the trick. You can also use a Linux PC, the dd command is the same. But please TRIPLE CHECK that the device you use instead of diskX is in fact the drive you want to wipe, and not anything else!
Code:
dd if=/dev/zero of=/dev/diskX bs=1M count=16
 
With my Linux system back in operation, I experimented with a loose USB drive. Blanking it totally with dd on Debian, I formatted it several times with Ventura. The older disk formats of Apple are no problem - make them, erase them.

But if APFS is involved, the situation gets strange. Besides partitions, containers and snapshots are made, none of which I understand the reason for and have never bothered to learn about. But, the grayed out '-' for deleting a partition always appears, and in terminal any unix command to repartition is halted by the sandbox message.

Don't get it - the reason, not the underlying tech. To protect the system drive I can understand. There should be lots of hoops you have to jump through for that, but an ordinary drive you just bought and formatted, then changed your mind on the scheme of setup? I am all for security and lots of it, but a system has to be usable.

Obviously there has to be a way to blank a drive on new MacOS'es. I just don't want to waste the time researching for it. Then have to do it all over again when Apple changes to "SuperAFPS."
 
Please post a screenshot of the Disk Utility window, with View All Devices showing, and the disk formatted for APFS. Please select the target disk's device, not any partitions, volumes, etc. on it, so we can see the device's overall info, and what tools in the toolbar are available for it.

You should also be able to use 'dd' on macOS. You may need 'sudo', but I'm pretty sure 'dd' is still present in latest OS releases by default. Use 'which dd' in a Terminal window to confirm. You'll probably also need to enable full disk access for Terminal.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.