Corrupted partition table

Hi all, I had issues after removing an old Bootcamp partition, now most of the drive can not be erased, even in Diskutil in Terminal.


I can erase parts of the disk, but even then they won't mount, and certainly can not just erase the whole thing back to a single drive, which is what I am trying to do.


Thank you for any suggestions.



Mac Pro, macOS 10.12

Posted on May 19, 2020 6:03 PM

Reply
Question marked as Top-ranking reply

Posted on May 19, 2020 7:20 PM

The DriveDX report does have a warning about the "SATA Downshift Error Count" (attribute# 183). At the very least you have some sort of hardware issue going on which is causing the SATA link speed to drop from 6Gb/s to 3Gb/s. I've never seen this attribute listed with a warning on any of the hard drives I've checked. It is possible the hard drive itself is the cause of the problem. I would try using the drive in another bay to see what happens to see if you can determine if the drive bay or the drive itself has the problem. You can check the "RAW Value" for attribute# 183 to see if the value continues to increase as well as checking to see if the drive is connected at 6Gb/s or 3Gb/s. You could also try erasing the drive when it is connected externally, although that may not be as good of a test.

15 replies
Question marked as Top-ranking reply

May 19, 2020 7:20 PM in response to Lucin99

The DriveDX report does have a warning about the "SATA Downshift Error Count" (attribute# 183). At the very least you have some sort of hardware issue going on which is causing the SATA link speed to drop from 6Gb/s to 3Gb/s. I've never seen this attribute listed with a warning on any of the hard drives I've checked. It is possible the hard drive itself is the cause of the problem. I would try using the drive in another bay to see what happens to see if you can determine if the drive bay or the drive itself has the problem. You can check the "RAW Value" for attribute# 183 to see if the value continues to increase as well as checking to see if the drive is connected at 6Gb/s or 3Gb/s. You could also try erasing the drive when it is connected externally, although that may not be as good of a test.

May 20, 2020 4:01 PM in response to MrHoffman

MrHoffman wrote:

HWTech: GPT-formatted disks have a partition tables at the low address range and a backup at the high address range. You’ll want to dd both ranges to clear, or expect the occasion surprise when things get repaired.

It doesn't seem to matter when macOS gets confused. I think as long as there is no hint of any partitioning at the beginning of the drive macOS doesn't even think to check the backup. At least I've never encountered a case where the backup partition table interfered. It is always something to keep in mind though for the extreme cases. Thanks for pointing it out.

May 20, 2020 4:08 PM in response to HWTech

HWTech wrote:


MrHoffman wrote:

HWTech: GPT-formatted disks have a partition tables at the low address range and a backup at the high address range. You’ll want to dd both ranges to clear, or expect the occasion surprise when things get repaired.
It doesn't seem to matter when macOS gets confused.


Having worked with a version of EFI that automatically (and silently!) fixed a corrupt GPT, don’t bet on that.

May 19, 2020 6:09 PM in response to Lucin99

Sorry, should have added that repair disk come up with no errors.


Here is the info on the disk...

/dev/disk1 (internal, physical):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:      GUID_partition_scheme                        *2.0 TB     disk1


   1:                        EFI EFI                     209.7 MB   disk1s1


   2:       Microsoft Basic Data                         248.8 GB   disk1s2


   3:                 Apple_Boot Blank                   650.0 MB   disk1s3


   4:       Microsoft Basic Data                         650.0 MB   disk1s4


   5:                  Apple_HFS hhhh                    250.0 GB   disk1s5


   6:       Microsoft Basic Data                         1.5 TB     disk1s6


Ignore the weird names (i.e. hhhh etc) I was just trying to format them in Terminal. Weird thing is that first one and last one are NOT formatted for Windows despite what it says. the first I can reformat to Mac OS but won't mount, and the last one was never formatted for windows, it just went weird when I reformatted the first one after getting rid of windows....which I failed to do via Bootcamp, but only because it wouldn't allow me to. At this point I just want to wipe the whole darn thing :)

May 19, 2020 6:57 PM in response to HWTech

Hello gain,


I have done as shown, and now see this is Terminal...

/dev/disk1 (internal, physical):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:      GUID_partition_scheme                        *2.0 TB     disk1


But I still get it filing when I try to erase the disk. Its says, "cannot open device".


Drive DX dis not have any serious error that I can see, but I can see the option for advanced info you mentioned sorry. But I can save the report. Here is part of it below..








May 19, 2020 6:32 PM in response to Lucin99

With more recent versions of macOS Disk Utility hides the physical drives from the default view. Within Disk Utility you need to click on "View" and select "Show All Devices" before the physical drives are seen in the left pane of Disk Utility.


Sometimes macOS & Disk Utility just get confused when it encounters an unexpected situation in the partition layout. In that case make sure all volumes are unmounted (but not ejected) and zero out the first part of the drive destroying the current partition layout. You do this using the "dd" command. This command is nicknamed data destroyer so make sure you use the proper disk identifier in the command in place of "diskN" in my example:


Unmount all volumes on "diskN" which you want to erase:

diskutil  unmountDisk  diskN


Zero out the first 1GB of the drive "diskN" to destroy the partition table (a little overkill):

sudo  dd  if=/dev/zero  of=/dev/diskN  bs=10m  count=100


Using the information in your post the commands would translate to:

diskutil  unmountDisk  disk1
sudo  dd  if=/dev/zero  of=/dev/disk1  bs=10m  count=100


Note: If you booting into Recovery Mode, then you don't need to use "sudo" on these commands since you are already root. After zeroing out the beginning of the drive and destroying the partition table you should be able to use Disk Utility to erase the drive normally.


This all assumes the hard drive is healthy and not beginning to fail. Unfortunately macOS and the Apple Diagnostics do not do a very good job of assessing drive health. If you are booting from a full install of macOS, then you can check the health of the hard drive by running DriveDX which can identify many more types of early drive failures especially if a user can interpret the SMART attributes. Feel free to post the report here using the "Additional Text" icon which looks like a piece of paper.

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.

Corrupted partition table

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