I have two drives inside my MBP, an SSD for the OS and the original HDD for large Data. The HDD has 3 Partitions:
- My Data (Core Storage volume)
- 20Gb for Linux
- 4Gb for Linux Swap
Recently I ran repair disk
on the drive, as Disk Utility thought it was damaged. The repair aborted with the request to format and restore the whole drive, but I could use it like before (so maybe unrelated). Last night, everything was normal, but when I woke up, my data partition looked like this:
It used to be named Macintosh HD
(like the drive) and now it has lost its name and the partition type turned into FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
.
diskutil info /dev/disk1s2
reports
Device Identifier: disk1s2
Device Node: /dev/disk1s2
Part of Whole: disk1
Device / Media Name: Macintosh HD
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Partition Type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
OS Can Be Installed: No
Media Type: Generic
Protocol: SATA
SMART Status: Verified
Disk / Partition UUID: 00002980-188B-0000-A938-00003F710000
Total Size: 475.0 GB (474999996416 Bytes) (exactly 927734368 512-Byte-Units)
Volume Free Space: Not applicable (no file system)
Device Block Size: 512 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Ejectable: No
Whole: No
Internal: Yes
Solid State: No
Also a partition named Boot OS X
seems to be constantly mounted, even after restart, which has not been the case before.
Now, I have most of the data backed up, but can I somehow get my partition back without all the hassle?
Edit:
$ sudo gpt -r show /dev/disk1
gpt show: /dev/disk1: Suspicious MBR at sector 0
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 927734368 2 GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
928144008 262144 3 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
928406152 615800
929021952 39294976 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
968316928 2048
968318976 8388608 5 GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
976707584 65551
976773135 32 Sec GPT table
976773167 1 Sec GPT header
$ sudo fdisk /dev/disk1
Disk: /dev/disk1 geometry: 60801/255/63 [976773168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
*2: DA 1023 254 63 - 1023 254 63 [ 409640 - 927734368] <Unknown ID>
3: AF 1023 254 63 - 1023 254 63 [ 928144008 - 262144] HFS+
4: 83 1023 254 63 - 1023 254 63 [ 929021952 - 39294976] Linux files*
Since I know that it was an OSX Journaled file system in a Core Storage Volume, can I somehow convince OSX of this fact and fix the partition? Do I maybe need to edit the partition table?
As suggested, I removed partitions 2 and 3 with
sudo gpt remove -i 3 /dev/disk1
diskutil umountDisk /dev/disk1
sudo gpt remove -i 2 /dev/disk1
Now the partition table is
$ sudo gpt -r show /dev/disk1
gpt show: /dev/disk1: Suspicious MBR at sector 0
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 927734368 2 MBR part 218
928144008 262144 3 MBR part 175
928406152 615800
929021952 39294976 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
968316928 2048
968318976 8388608 5 GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
976707584 65551
976773135 32 Sec GPT table
976773167 1 Sec GPT header
sudo gpt -r show /dev/disk1
andsudo fdisk /dev/disk1
.