You are not logged in.

#1 2022-01-08 11:38:59

sweetthdevil
Member
Registered: 2009-10-20
Posts: 432

USB Drive Partition table Corrupted - Showing wrong drive size

Hello all,

I was setting up a 64gb usb drive using Gparted to install windows 10 on my son's PC ( Dual boot as he is using Archlinux as is daily driver smile )

Anyway, Gparted was complaining of a corrupted partitionon table, and now using gparted or fdisk the drive only show 1.87gb. I created a GPT partition, then a 1gb BOOT FAT32 partition, then the remaining was an INSTALL NTFS partition. I tried to use GPARTED live to rectify it but it's the same issue there.

Searching the web, it seems that plugging the drive on a windows machine would resolve the issue - trouble is that I don't have one yet...

Any help would be appreciated.

Thanks,

Offline

#2 2022-01-08 18:58:06

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: USB Drive Partition table Corrupted - Showing wrong drive size

Try

# sgdisk --zap-all /dev/sdX

And perhaps also

# wipefs -a /dev/sdX

But be careful with that axe, Eugene. If you use the wrong block device identifier you're gonna have a bad time.

If that doesn't fix things then post the output of

# gdisk -l /dev/sdX

And also share what dmesg says when you plug it in.


Jin, Jîyan, Azadî

Offline

#3 2022-01-09 07:46:14

mpan
Member
Registered: 2012-08-01
Posts: 1,597
Website

Re: USB Drive Partition table Corrupted - Showing wrong drive size

To minimize the risk of a catastrophic mistake, you may consider using the “/dev/disk/by-*” hierarchy instead of “/dev/sdX” names. In this case by-id may be useful, as it will clearly distinguish your local ATA drives from the USB-connected devices.


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#4 2022-01-09 09:47:24

sweetthdevil
Member
Registered: 2009-10-20
Posts: 432

Re: USB Drive Partition table Corrupted - Showing wrong drive size

Thank you for the replies.

All is good now - managed to get it sorted with gparted by deleting it all again and this time it works.

Offline

Board footer

Powered by FluxBB