Format hard drive overwriting it with zeros or writing zeros to the hard disk

Is there a GUI app on a Live USB system that formats an entire hard drive (drive, not partition) by overwriting each and every bit of the hard disk with zero or an app that writes zeros? If not, what is the command to format as mentioned or if such a command does not exist, the command to write?

If it is a spinning disk you can use dd.

Don’t do that with an ssd or nvme drive though.

I guess the first question is what kind of device is it because the commands are different for all 3(hdd, ssd, nvme).

1 Like

If your goal is to destroy all data on the hard drive (and by “hard”, I mean a spinning disk drive, not SSD), so that it is impossible (or really impractical) to recover it, writing zeros over it may not give you the best result. Personally, I’d first write random data to it (using dd and /dev/urandom), and then wipe it clean.

There are many commands / programs…Not many GUI though :laughing:

https://wiki.archlinux.org/title/Securely_wipe_disk

Yeah indeed, it’s not healthy for them. Only do this with SSD / nvme if you absolutely need to make sure that none of your data is there if you have some secrets or want to sell it…

P.S. Welcome! :rocket:

honka_animated-128px-40

1 Like

Even then you probably shouldn’t. Writing new data to an ssd/nvme won’t actually remove all the data.

2 Likes

Wait, really, even with all those techniques above?

https://wiki.archlinux.org/title/Securely_wipe_disk#Flash_memory

Ah yeah…not fun :unamused:

Yeah, because of the spare blocks on the storage that are managed by the firmware. That being said most ssds and I think all nvme drives have commands for doing a secure erase.

2 Likes

Still doesn’t look like a fun walk in the park…Never trust a goddamn SSD manufacturer! :rofl:

2 Likes

Yeah, just don’t sell or give away your SSDs and flash drives. If they contain sensitive data, physically destroy the device.

Thanks for your welcome. The reason why I intend to to it is that I get a hard drive error report from a Pre-boot system assessment at each startup I cannot get rid of. I assume it is a HDD.
keybreak: You wrote … ‘Not many GUI though’… and the link does not contain GUI apps, so are there any?

Why does the type of user interface matter? You want to accomplish a very specific task, and there are tools that do that. It’s not like you do this every day, so that the ergonomics of a preferred UI plays an important role. :man_shrugging:

Don’t assume, check. Wrong assumptions will lead to very unhappy time, especially when it comes to stuff like this.

1 Like
3 Likes

If not in such a panic, I would do that outdoors. You don’t want to breathe those NAND fumes, it will mess up your logical reasoning. :rofl:

An empty metal can, some gasoline and a match is all you need.

I preferred GUI apps, yet, because I do not know whether the commands are the same in every Linux distro and therefore, whether it is worth learning them. When it is written, not many GUI apps exist, I suppose there are any. In the BIOS or in Gparted I did not read anything about SSD or nvme. Because of that and due to the age of the computer I assume it is a SSD.

Kresimir: Why confused Emoji?

Can we see the output of ls /dev/disk/by-id

Please ignore my question about confused Emoji. Sorry wanted to write I assume it is a HDD.

There is no need to assume though. You can check…

ls /dev/disk/by-id
ata-MATSHITA_DVD+_-RW_UJ8C1_SHB4100345 wwn-0x50014ee6ac1f07f7
ata-WDC_WD7500BPKT-75PK4T0_WD-WX51A71Y6825 wwn-0x50014ee6ac1f07f7-part1
ata-WDC_WD7500BPKT-75PK4T0_WD-WX51A71Y6825-part1

I do not read anything about hdd, sdd nor nvme.

Did a quick search for both of those codes, they are in fact HDDs.