Initially my setup consisted of 2 storage devices. My primary drive is a SSD with Windows 10. My secondary drive is a 4TB HDD.This setup worked well.
I wanted to run linux on occasion so I installed another HDD. When installing Linux I removed the SATA and power from the Windows SSD and plugged them into the new HDD. I removed only the SATA cable from the 4TB HDD. I then proceed to installing CentOS. Finally reconnected the 4TB HDD, the SDD, and installed a new SATA cable and connected it to the new HDD. Using the boot menu I am able to switch between my Windows 10 and Linux installations.
At this point I noticed that the 4TB HDD was not appearing in Windows or Linux.
I can feel that the HDD is still spinning, I can see the 4TB HDD in the BIOs. I can't see the 4TB HDD in Windows using disk partition. I can see the drive in linux using gpart GUI and gdisk on the command line. 2 partitions are seen by the drive in gdisk and gparted.
Using Gparted:
When the drive is scanned by I get a prompt titled "Libparted Bug Found!" with text that reads "end of file while reading /dev/sda". Options are to retry, cancel, or ignore.
When I press ignore I get a prompt titled "Libparted Bug Found!" with text that reads "The primary GPT table is corrupt, but the backup appears OK, so that will be used." Options OK or cancel.
Using gdisk:
Information when launching gdisk and viewing drive detail with "i" and "v"
GPT fdisk (gdisk) version 0.8.6
Type device filename, or press <Enter> to exit: /dev/sda
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Command (? for help): i
Partition number (1-2): 1
Partition GUID code: E3C9E316-0B5C-4DB8-817D-F92DF00215AE (Microsoft reserved)
Partition unique GUID: 07987030-5C4E-4936-9BCD-129C622C99DF
First sector: 34 (at 17.0 KiB)
Last sector: 262177 (at 128.0 MiB)
Partition size: 262144 sectors (128.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'Microsoft reserved partition'
Command (? for help): i
Partition number (1-2): 2
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 9A23AFCE-2382-4C1C-AC0B-F25E6428E4C4
First sector: 264192 (at 129.0 MiB)
Last sector: 7814035455 (at 3.6 TiB)
Partition size: 7813771264 sectors (3.6 TiB)
Attribute flags: 0000000000000000
Partition name: 'Basic data partition'
Command (? for help): v
Caution: Partition 1 doesn't begin on a 8-sector boundary. This may
result in degraded performance on some modern (2009 and later) hard disks.
Consult http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/
for information on disk alignment.
No problems found. 3693 free sectors (1.8 MiB) available in 2
segments, the largest of which is 2014 (1007.0 KiB) in size.
Can someone please recommend what I need to do to safely recover the GPT or MBR without data loss?
I wanted to run linux on occasion so I installed another HDD. When installing Linux I removed the SATA and power from the Windows SSD and plugged them into the new HDD. I removed only the SATA cable from the 4TB HDD. I then proceed to installing CentOS. Finally reconnected the 4TB HDD, the SDD, and installed a new SATA cable and connected it to the new HDD. Using the boot menu I am able to switch between my Windows 10 and Linux installations.
At this point I noticed that the 4TB HDD was not appearing in Windows or Linux.
I can feel that the HDD is still spinning, I can see the 4TB HDD in the BIOs. I can't see the 4TB HDD in Windows using disk partition. I can see the drive in linux using gpart GUI and gdisk on the command line. 2 partitions are seen by the drive in gdisk and gparted.
Using Gparted:
When the drive is scanned by I get a prompt titled "Libparted Bug Found!" with text that reads "end of file while reading /dev/sda". Options are to retry, cancel, or ignore.
When I press ignore I get a prompt titled "Libparted Bug Found!" with text that reads "The primary GPT table is corrupt, but the backup appears OK, so that will be used." Options OK or cancel.
Using gdisk:
Information when launching gdisk and viewing drive detail with "i" and "v"
GPT fdisk (gdisk) version 0.8.6
Type device filename, or press <Enter> to exit: /dev/sda
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Command (? for help): i
Partition number (1-2): 1
Partition GUID code: E3C9E316-0B5C-4DB8-817D-F92DF00215AE (Microsoft reserved)
Partition unique GUID: 07987030-5C4E-4936-9BCD-129C622C99DF
First sector: 34 (at 17.0 KiB)
Last sector: 262177 (at 128.0 MiB)
Partition size: 262144 sectors (128.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'Microsoft reserved partition'
Command (? for help): i
Partition number (1-2): 2
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 9A23AFCE-2382-4C1C-AC0B-F25E6428E4C4
First sector: 264192 (at 129.0 MiB)
Last sector: 7814035455 (at 3.6 TiB)
Partition size: 7813771264 sectors (3.6 TiB)
Attribute flags: 0000000000000000
Partition name: 'Basic data partition'
Command (? for help): v
Caution: Partition 1 doesn't begin on a 8-sector boundary. This may
result in degraded performance on some modern (2009 and later) hard disks.
Consult http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/
for information on disk alignment.
No problems found. 3693 free sectors (1.8 MiB) available in 2
segments, the largest of which is 2014 (1007.0 KiB) in size.
Can someone please recommend what I need to do to safely recover the GPT or MBR without data loss?