Not only i want to low level format it, i want to reinitialize it, factory reset style, like some kind of HDparm but in the deepest level, like, absolutely destroying every sector and or hard drive settings.
Asked
Active
Viewed 3.2k times
3
-
What are you trying to achieve? If you want to simply delete data irrecoverably, then shred it. If you want to destroy the hard disk itself, then you should burn or recycle it. – Registered User Dec 12 '14 at 08:02
2 Answers
3
Well, you could overwrite every sector with zero, if you're absolutely positively sure you don't want any more data off the drive...
dd if=/dev/zero of=/dev/sdx
(where x is your drive's letter, see lsblk
or fdisk -l
to be sure FIRST)
And probably adding bs=1M
or bs=5M
might help too, to read/write in 1 MB or 5 MB blocks, should be ok for the hard drive, a little (maybe a lot) faster in case it defaults to a block size of 512 bytes

Xen2050
- 8,705
-
dd may not overwrite spare or damaged blocks. For this harddrives have a secure-erase feature builtin. there is a nice tool gnome-disks that actually can perform the job. https://askubuntu.com/a/860658/1182429 – queeg Dec 15 '23 at 07:03
1
If you want the data on HDD to be unrecoverable then follow this procedure.
You can do it in graphical way also:
- live boot in Ubuntu
- launch Disk from dash and delete all partitions
- then click on format and set Erase to Overwrite existing data with zeroes (Slow). Filesystem can whatever you want

Alex Jones
- 7,982
- 9
- 55
- 94
-
-
@Xen2050 I think for utility and ease of accessibility purpose its a good thing right ? – Alex Jones Dec 12 '14 at 08:02
-
I'd be much more comfortable with more of a warning than "(Slow)" when I'm about to irreversibly wipe a drive, and I know what I'm doing (usually). Brand-new & novice users would probably benefit from a little more info. I like Disks, but if for example a cat walks on my keyboard with Disks open I don't want it to start wiping my drives with a CTRL-F arrow enter – Xen2050 Dec 12 '14 at 08:13
-
This may not overwrite spare or damaged blocks. For this harddrives have a secure-erase feature builtin. there is a nice tool gnome-disks that actually can perform the job. https://askubuntu.com/a/860658/1182429 – queeg Dec 15 '23 at 07:04
-
@queeg That's true, but if the drive can't write to those blocks, it can't read them either... unless they're swapped back into rotation for some reason. Only very specialized (expensive) tools might have a chance to read everything. SSD's and all flash drives (even tiny microSD cards) are even worse in that regard, they have controllers that secretly swap blocks around too. And FYI this answer does use gnome-disks aka gnome-disk-utility aka Disks, just an older feature – Xen2050 Dec 16 '23 at 10:41