I had this problem after a dd image copy to an SD card for my Raspberry Pi failed and left the SD card inoperable.
Running fdisk would give the error:
fdisk /dev/sde
You must set cylinders.
You can do this from the extra functions menu.
You must set cylinders.
You can do this from the extra functions menu.
Cylinders related to spinning platter hard drive technology so I didn't know how to calculate them for an SD flash card so this trick will nuke the partition table by overwriting with zeros from the device "/dev/zero":
I CANNOT WARN STRONGLY ENOUGH THAT YOU MUST MAKE SURE YOU USE THE CORRECT DEVICE FOR THE of= PARAMETER
Get this wrong and you will wipe the partition table of another drive, possibly leaving your PC unbootable.
You can find the device name of your SD card by inserting it and then using:
dmesg
Look for output like this:
[ 1857.197006] sd 6:0:0:2: [sde] 62552064 512-byte logical blocks: (32.0 GB/29.8 GiB)
[ 1857.197745] sd 6:0:0:2: [sde] Assuming drive cache: write through
[ 1857.200390] sd 6:0:0:2: [sde] Assuming drive cache: write through
[ 1857.200395] sde: sde1 sde2
[ 1857.197745] sd 6:0:0:2: [sde] Assuming drive cache: write through
[ 1857.200390] sd 6:0:0:2: [sde] Assuming drive cache: write through
[ 1857.200395] sde: sde1 sde2
This tells you that the SD card is device
/dev/sde
To wipe the partition table use:
dd if=/dev/zero of=/dev/sde bs=1M count=2