I stupidly ran the following command on an external ext4 USB disk, typing
/dev/sdb instead of
/dev/sda which was the new disk I was setting up:
dd if=/dev/zero of=/dev/sda bs=512 count=100
These were the lines I used to initially set up that drive, I was just going to repeat them:
dd if=/dev/zero of=/dev/sdb bs=512 count=100 parted -a optimal /dev/sdb mklabel gpt parted -a optimal /dev/sdb mkpart -- primary ext4 1 -1 mkfs.ext4 -L BIGDRIVE /dev/sdb1
Can I retrieve the boot sector and get the drive operational again?