OS X is identifying the disk as an APM disk ("Apple_partition_scheme"), although the gdisk tests for APM data are failing to find an APM signature. My suspicion is that the disk is a perfectly valid APM disk but that some utility went and wrote an MBR on it because it didn't recognize the APM data, and this is confusing GParted and may even have overwritten the signature that gdisk normally uses to identify APM disks.
As the developer of gdisk, I'd appreciate getting a copy of the first few sectors of the disk so that I can study this and see if I should be updating my gdisk partition table identification code. Could you please run the following command and send me the resulting apm.out file at rodsmith@rodsbooks.com? (This command sends me the first ten sectors of the disk, which should contain no sensitive data.)
Code:
sudo dd if=/dev/sdb of=apm.out bs=512 count=10
If you run it from OS X rather than Linux, change "/dev/sdb" to "/dev/disk1". Thanks.
As to how to proceed, I'm not sure precisely how to repair the damage, but I have several suggestions to try, in increasing order of desperation:
- Use Apple's Disk Utility to make some minor change to the disk, such as altering the name of a volume. With any luck, it will automatically fix the damage.
- Make a more extreme change to the volume using Apple's Disk Utility. For instance, you could delete a partition or create a new one (if there's any free space).
- Attempt to replace the bogus MBR data with valid APM data. Unfortunately, I know very little about the details of APM data, so my only suggestion is to create a valid APM volume (on a USB flash drive, say) using OS X's Disk Utility and then copy it over using dd, as in "dd if=/dev/disk2 of=/dev/disk1 bs=512 count=1". Be sure to include the bs= and count= options! You might need to increase the count value to 2. I have no idea if this will work, though; it could be that the APM sector 0 data must vary with the disk size or some other feature that varies with the disks.
- Copy the data off the affected disk, repartition using MBR or GPT rather than APM, and then copy the data back. You should probably do all this in OS X, although you could use Linux.
- Use TestDisk to attempt to recover the partitions as MBR partitions. You'll have to find some way to force it to treat the disk as an MBR disk, since from what you report, it seems to be detecting some APM data and is trying to treat it as an APM disk. I'm not an expert on APM, so I can't offer any specific suggestions for how to do this.
As a general comment, it's best to use MBR or GPT these days; Apple has largely abandoned APM, although it's still supported in the OS and in Disk Utility. MBR (referred to as "ms-dos" in most libparted-based tools) is the old-style partitioning scheme that's used on most PCs, but MBR is living like the dinosaurs 65 million years ago: There's a giant meteor, in the form of the 2 TiB limit, that will soon cause MBR's extinction. GPT is the answer to this problem, and Apple has already embraced it on its Intel-based Macs. Linux is happy with any of these partition tables, although I'm not sure if it's possible to boot Linux from APM on a PC.
Bookmarks