I have a Hackintosh computer, with a secondary hard drive installed with a bunch of data on it. I was trying to partition off part of the secondary hard drive to install Windows so I could dual boot, and I have managed to completely ruin the partition table and I'm afraid that I've lost my data. I used the Windows 10 installer to create a partition, but it did some weird stuff where it labeled my existing data partition as a recovery partition, so I ended up deleting everything that the installer did but I cannot see my old data back in OS X now. Here is the output of diskutil list:
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk1
1: DE94BBA4-06D1-4D40-A16A-BFD50179D6AC 1.9 TB disk1s1
$ sudo gpt -r show disk1
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 409606
409640 3798935504 1 GPT part - DE94BBA4-06D1-4D40-A16A-BFD50179D6AC
3799345144 107683991
3907029135 32 Sec GPT table
3907029167 1 Sec GPT header
$ sudo fdisk /dev/disk1
Disk: /dev/disk1 geometry: 243201/255/63 [3907029168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 0 0 2 - 1023 255 63 [ 1 - 3907029167] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
disk1s1 was where my data originally was, but it is no longer recognized by Disk Utility and I cannot mount it.
Is there anything I can do to repair this, or is my data all lost?
edit: I ran fsck and it recognizes the volume type and name, so it appears that it's still there:
sudo fsck_hfs -fy /dev/disk1s1
Password:
** /dev/rdisk1s1
Executing fsck_hfs (version hfs-285).
** Checking Journaled HFS Plus volume.
The volume name is Macintosh HD
** Checking extents overflow file.
** Checking catalog file.
** Checking multi-linked files.
** Checking catalog hierarchy.
** Checking extended attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Macintosh HD appears to be OK.
I'm not sure how to mount the drive/fix the partition table, however.
edit2: so, using this method I was able to mount the disk and see the data. Is there an easy way to fix the partition?