Corrupted USB drive partition table
by hiddenocelot from LinuxQuestions.org on (#5S7MY)
Hi all,
I've had a USB that I'm trying to format but it seems to be giving me some trouble. Originally I had an ISO for a now unnecessary Linux distribution. I deleted this and formatted the drive but all is not well. It allows me to format ~20Gb out of 30Gb available into ext4, but no more. It seems ok in exFAT format for now but I'm not 100% sure if it works fine.
I am unable to shred the contents of the drive for some reason and it appears to have a corrupted partition table. I've used gdisk a little but this has not fixed anything. I don't need any of the data on the drive, although I intend to backup my system on it, so it's important that I can trust it.
The output from gdisk below highlights that the partition table is corrupted.
Code:sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.8
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.
Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR
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): v
Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.
Identified 1 problems!Does anyone know how to help? I was also unsure where to post this so I put it in general. I'm happy to get directed to somewhere more relevant
I've had a USB that I'm trying to format but it seems to be giving me some trouble. Originally I had an ISO for a now unnecessary Linux distribution. I deleted this and formatted the drive but all is not well. It allows me to format ~20Gb out of 30Gb available into ext4, but no more. It seems ok in exFAT format for now but I'm not 100% sure if it works fine.
I am unable to shred the contents of the drive for some reason and it appears to have a corrupted partition table. I've used gdisk a little but this has not fixed anything. I don't need any of the data on the drive, although I intend to backup my system on it, so it's important that I can trust it.
The output from gdisk below highlights that the partition table is corrupted.
Code:sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.8
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.
Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR
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): v
Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.
Identified 1 problems!Does anyone know how to help? I was also unsure where to post this so I put it in general. I'm happy to get directed to somewhere more relevant