How can I permanently erase data on Internal HDD?
I have a laptop which I use Ubuntu as my primary OS. However I am trying to sell it to help towards a new PC. I want to COMPLETELY erase data on the Internal HDD (Such as passwords, banking info, etc...) and use my Windows 10 USB Installer to put a new Windows setup for whoever it gets passed on to. I do have another PC which I can use to help with this process, if needed.
PS: This is only for an INTERNAL hard drive, not a USB or external hdd.
22 Answers
DBAN
An alternative to shred is DBAN, which is preferred for wiping a HDD by several people. It is rather straightforward to run DBAN and let it wipe the internal drive (when there is only one internal drive in the computer).
Download an iso file or two: I suggest two versions, because they might work in different computers. The file size is less than 20 MB (very small compared to typical linux iso files),
See this link (to the current version), where you find a description of DBAN and the Download DBAN button near the bottom of the page to download the newest iso file, when this is written
dban-2.3.0_i586.iso, orDownload an older iso file
dban-2.2.7_i586.isovia this link (DBAN 2.2.7). This version of DBAN has worked for me in several computers, also when treated withisohybridand cloned to a USB pendrive. This is a good alternative, if there is no CD drive in the computer.
md5sums:
066fb83c43f6ba96f92b8fe1302cb431 dban-2.2.7_i586.iso 33a1df4171e649462ef9679ac207aa77 dban-2.3.0_i586.isoCheck with
md5sum dban-2.2.7_i586.iso md5sum dban-2.3.0_i586.isoEither burn the iso file to a CD or DVD disk: 'Burn an iso image' (do not create a CD data disk),
or treat the iso file with
isohybrid:isohybrid dban-2.2.7_i586.isoand after that you can clone the iso file to a USB pendrive in a safe way using mkusb according to this link (mkusb).
Boot with a live CD. Then issue the command lsblk to list the block devices. Find the device name of the harddrive. Issue the command
sudo shred -n 1 /dev/sdX- where
/dev/sdXrefers to the device you found.
If you're paranoid, you can overwrite more than once. Increase the 1 above to your desired number. If it's a SSD, a secure erase is quicker and better for the drive:
Secure erase can be used on a normal hard drive as well, but it is more complex than simply running shred. It may be better, as it may overwrite unaccessible areas, or in case of encrypted drives, simply erase the encryption key.
0