You need to remove the gpt structure at the beginning of the disk like this.
Code: Select all
dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=1 conv=notrunc
There's another backup of that structure at the end of the disk. Delete that one like this:
Code: Select all
dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=1953525167 conv=notrunc
You need another number after seek=. Consult the output of fdisk -l. The number you need to put after the seek= is the total of sectors MINUS ONE. In this case 1953525168 - 1 = 1953525167.
Before you run those commands I recommend you backup the areas of the disk we are going to overwrite. Put those backups onto an external media as they are useless otherwise. Also be sure to unplug that device before you continue for additional safety.bobferrell wrote:255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
To backup the beginning of the disk do this:
Code: Select all
dd if=/dev/sda of=first64.img bs=512 count=64
Code: Select all
dd if=/dev/sda of=last.img bs=512 count=1 skip=1953525167
Note that it's skip instead of seek here because we switched input/output. This creates files named first64.img and last.img which you should copy in a safe location. To restore them you would replace the /dev/zero in the commands used to overwrite the gpt structures like this:
Code: Select all
dd if=first64.img of=/dev/sda bs=512 count=1 seek=1 conv=notrunc
dd if=last.img of=/dev/sda bs=512 count=1 seek=1953525167 conv=notrunc