I have a disk that's showing signs of a corrupted GPT along with a protective MBR. I'm not interested in keeping any of the data on it and just want to completely wipe it clean so that I can reformat it. I've tried using GParted and the Disks utility on Ubuntu, but I'm running into errors during the formatting process. Is there a straightforward method to fully erase the disk?
5 Answers
For wiping the disk, you can also rewrite the GPT with anything you prefer, or simply overwrite the beginning of the disk to obliterate the old GPT. By doing this, you'll be able to use the drive however you want afterward. Also, could you share what errors you're encountering when trying to format? That info could really help diagnose the issue!
It's a good idea to install GSmartControl and check the disk's health. If you're facing errors, the drive could be having physical problems that might need addressing.
You might want to check your BIOS settings; some systems have a secure erase feature that will fully wipe the drive and delete all partitions.
You can use `gdisk` to zap the existing GPT information and create a new protective MBR. If that doesn't work for you, another option is to run `sudo dd if=/dev/zero of=/dev/sdX bs=512 count=34`. This command will zero out the first 34 sectors, effectively wiping the MBR and GPT tables.
If your disk is an SSD or NVMe, try using `sudo blkdiscard -f /dev/(diskID)`. This command will reset all data blocks to factory default and is usually very quick. Just make sure you're targeting the correct disk.

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