Score:0

is there is an easy method do a basic scrub of my harddrive partions now that i have ubuntu running on my old laptop?

co flag

i did a 'new install' of ubuntu on an old windows laptop. I probably will sell/donate this machine and want to 'rewrite' all the free disk space because i think when ubuntu created new 'partion tables?' , my old data is still there physically on disk

is there a simple linux app or command that can maybe rewrite all the free space with garbage data, it doesnt have to be NSA grade security :) ?

cc flag
shred from the coreutils package should do the job if you don't trust format.
Cool Pontiac avatar
co flag
@ubfan1 - i will try the shred app... but btw - its not that i dont trust format...but i think format just frees up the disk with a new partiion table... your old 1's and 0's are still there and can easily be extracted by a bad actor.. isnt that the case?
Terrance avatar
id flag
Does this answer your question? [How can I securely erase a hard drive?](https://askubuntu.com/questions/17640/how-can-i-securely-erase-a-hard-drive)
Cool Pontiac avatar
co flag
@Terrance actually no. i looked at the shred command. it seems to shred a file(s) that you name... I actually want to shred all the free disk space on my partions so that i can donate my linux laptop and know that my old windows data has at least been written over 1 time. how can i do this?
Terrance avatar
id flag
Honestly, it would be better to scrub the entire drive and reinstall the OS after the scrub so that there is no data left over whatsoever. I used to do drive scrubs for data centers when they would get rid of servers and sell them. We would scrub them anywhere from 3-7 passes over the entire drive so that there was zero chance of data recovery from bad actors.
cc flag
Remember, "everything is a file": from the shred man page: "...it is common to operate on device files like /dev/hda". SDD's may have a problem when overprovisioning removes blocks from use -- not sure anything will ever touch those blocks again, but they are still there!
Score:0
in flag

If you wish to completely wipe the disk, leaving nothing behind, this is the process that I generally follow:

  1. Boot into a live session using the Ubuntu installation USB

  2. Open the terminal and directly write random data to the entire disk. Assuming you have just one SATA disk, the command would look something like:

    dd if=/dev/urandom of=/dev/sda bs=1M
    

    Note: This destroys all partitions and all data. There is no undo. Use with care.

  3. (Optional) Install the next OS of choice.

Some people suggest using /dev/zero rather than /dev/urandom, however, some SSDs will not write blocks of zeroes in predictable ways depending on the firmware installed. If you are using a spinning disk, /dev/zero is more than sufficient unless you need to wipe a disk that can escape reconstruction by nation state-level intelligence agencies.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.