I was trying out new OS on my Macbook, now I started to install elementary on my primary drive and force quit the installation in middle.. which resulted in bad GPT partition.
Now, when I contacted apple support they made me erase the drive, but it did not work, the drive is detected when I boot up my mac with linux OR macOS but as I try to format it, the disk just vanishes.
I tried to perform fsck on ubuntu:
fsck -a /dev/sda1
and this was the output:
fsck from util-linux 2.31.1 fsck.ext2: Bad magic number in super-block while trying to open /dev/sda1 /dev/sda1: The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device> or e2fsck -b 32768 <device>