I have a disk that has a corrupted GPT and a protective MBR, and I'm looking for a way to completely erase it so I can reformat. I'm not interested in recovering any data from it. The guides I find mostly discuss fixing the GPT instead of how to wipe it. When I try to format using GParted or Disks on Ubuntu, I keep getting errors. Any simple solutions?
3 Answers
To completely wipe the GPT, you can rewrite it with any random data or simply overwrite the beginning of the drive. This will destroy the GPT. However, I’m curious about the errors you’re getting when trying to format. Can you share the exact commands and error messages? It’ll help us assist you better!
You could try using `gdisk`; it can help you zap the existing GPT info and create a new protective MBR. If that doesn't work, there's a more brute force method: use `sudo dd if=/dev/zero of=/dev/sdX bs=512 count=34`. This will zero out the first 34 sectors on the disk and will wipe the MBR and GPT tables completely. Just make sure to replace `/dev/sdX` with your actual disk identifier. Also, proceed with caution as this will delete everything!
If your drive is SSD or NVMe, you might want to try the `blkdiscard` command. First, check your disk ID with `lsblk`, and then run `sudo blkdiscard -f /dev/(diskID)`. For example, `sudo blkdiscard -f /dev/sdb`. This command will reset all the data blocks on the disk to factory default, and it’s usually pretty quick.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures