Cannot partition external drive I  have an external drive that I just cannot partition. It's blank, so i have used Disk Utility and diskutil to erase, verify,repair etc., but nothing works.
It gives me this sort of thing:
Error: -69845: File system verify or repair failed
Underlying error: 8: POSIX reports: Exec format error

Trying fsck on the external drive does nothing useful but returns a bunch of hex with some recognizable text:
fsck_hfs -y /dev/disk2
returns a very amusing &quot;got&quot; and then 2 lines later &quot;U&quot;
fsck_hfs -y /dev/disk2s1
text is &quot;Non system disk Press any key to reboot&quot;
I'm not sure where i can go from here.
I attempted to use GParted and received the error
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
I then removed the GPT using GDisk and changed the partition table to MBR.
Then I had no issues creating multiple partitions under MBR, but any attempt to go back to GPT led to the message above re backup table and failure to create multiple partitions under GPT.
I have created a single HFS+ using GParted and will see how that travels.
FINAL UPDATE - I have declared it dead.
The error that your getting...
Exec format error

Is a response from the SATA controller (USB to SATA bridge) to diskutil that there was an error when you tried to format your drive.  This points to a failing drive.
fsck is a utility to fix A corrupted file system and will not have sny effect here.  Looking at it from a simplified perspective, in order for fsck to work, you have to have an existing filesystem in place for it to fix.  formatting a disk is the act of wiping away whatever was there in order to install a new filesystem.  It’s like bulldozing your property to build a house. In this case, the guy doing it reported a problem that prevents you from doing it (they found a fault line).  Running fsck at this point would be like calling the plumber to come fix the pipes because you can’t clear away your property.

External Hard Drive no longer working

Basically, you need to replace that drive.
From your further attempts:

Then I had no issues creating multiple partitions under MBR, but any attempt to go back to GPT led to the message above re backup table and failure to create multiple partitions under GPT.

This further lends credibility to the diagnosis that your drive is failing. Where the tables are stored is in different places on the drive; the “whole” drive doesn’t have to be completely inaccessible for the drive to be considered bad.
I’ve seen this many times: folks will spend countless hours trying to get a drive to format that keeps generating errors. Then, they’re successful once, get it formatted, copy data over, do work, then suffer a catastrophic failure because the drive was dead (dying) to begin with.
Formatting a drive is a super easy task. If it takes you multiple utilities and days of effort, something is very wrong.  Don’t risk your data; get a new drive.