Bad GPT partition - how to replace it with alternate?
Posted: 15 Oct 2022, 12:04
I've tried to repair some chinese pendrive with some weird chinese firmware tool but instead writing new sectors only on pendrive they were written on every removable media connected to pc. I've managed to recover most of my important files from smaller MBR drives without visible partitions. On 4TB GPT drive windows drive management shows weird unmountable set of partitions while testdisk reports bad GPT but shows all partitions correctly (allowing listing and copying files and directories without problem). So my question is: Is there a way to replace bad GPT with alternate version reported by testdisk at this point? Or should I do very time consuming quick search or simply copy everything and reformat whole drive?


part of log shows proper partition structure:


part of log shows proper partition structure:
Code: Select all
Hard disk list
Disk /dev/sda - 128 GB / 119 GiB - CHS 453024 138 4, sector size=512 - TS128GSS D370, S/N:4C91914039, FW:N112
Disk /dev/sdb - 500 GB / 465 GiB - CHS 60797 255 63, sector size=512 - WD Elements 25A2, S/N:WXN1A57JCNPT, FW:1019
Disk /dev/sdc - 4000 GB / 3726 GiB - CHS 486401 255 63, sector size=512 - Seagate Expansion, S/N:NA8HTT67, FW:0708
Disk /dev/sdd - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - ST350041 8AS, S/N:00000000000000000000, FW:0105
Disk /dev/sde - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - WDC WD50 00AAKX-003CA0, S/N:00000000000000000000, FW:0105
Partition table type (auto): EFI GPT
Disk /dev/sdc - 4000 GB / 3726 GiB - Seagate Expansion
Partition table type: EFI GPT
Analyse Disk /dev/sdc - 4000 GB / 3726 GiB - CHS 486401 255 63
hdr_size=92
hdr_lba_self=7814037166
hdr_lba_alt=1 (expected 1)
hdr_lba_start=34
hdr_lba_end=7814037133
hdr_lba_table=7814037134
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
1 P MS Reserved 34 262177 262144
Bad GPT partition, invalid signature.
Trying alternate GPT
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
1 P MS Reserved 34 262177 262144
1 P MS Reserved 34 262177 262144
2 P MS Data 264192 2147747839 2147483648 [Download]
3 P MS Data 2147747840 3615754239 1468006400 [Filmy]
4 P MS Data 3615754240 5083760639 1468006400 [Muzyka]
5 P MS Data 5083760640 7231244287 2147483648 [Gry]
6 P MS Data 7231244288 7650674687 419430400 [Programy]
7 P MS Data 7650674688 7692617727 41943040 [Dokumenty]
8 P MS Data 7692617728 7793063935 100446208 [Backup]
9 P MS Data 7793063936 7814035455 20971520 [Encrypted]
Current partition structure:
Bad GPT partition, invalid signature.
Trying alternate GPT
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
1 P MS Reserved 34 262177 262144
1 P MS Reserved 34 262177 262144
2 P MS Data 264192 2147747839 2147483648 [Download]
3 P MS Data 2147747840 3615754239 1468006400 [Filmy]
4 P MS Data 3615754240 5083760639 1468006400 [Muzyka]
5 P MS Data 5083760640 7231244287 2147483648 [Gry]
6 P MS Data 7231244288 7650674687 419430400 [Programy]
7 P MS Data 7650674688 7692617727 41943040 [Dokumenty]
8 P MS Data 7692617728 7793063935 100446208 [Backup]
9 P MS Data 7793063936 7814035455 20971520 [Encrypted]