Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Samarkand on September 07, 2017, 10:21:56 AM



Title: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: Samarkand on September 07, 2017, 10:21:56 AM
I used Bitcoin on an old computer of mine using Ubuntu (16.04). Now I intend to sell the computer.
Because I had other sensitive information on this computer and also several altcoin wallets I like to format the hard
drive in order to wipe out all data before I sell the computer.

Is there an exhaustive way to delete every data in a way that it realistically canīt be restored?
Keep in mind that I run Ubuntu, so Iīm not able to utilize Windows cleaner tools.

Maybe someone of you has enough Linux experience to help me out with this.



Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: aplistir on September 07, 2017, 10:33:21 AM
I would prefer to keep/destroy the hard disk. It is the easiest way to be absolutely sure.

This is what companies do when they get rid of their old computers.

However, if you empty your disk, and fill it with random data and repeat that a few times, it would be almost impossible to restore any of your data.

It depends. How much coins do you have in your wallet. If you have millions, then destroy the disk, if just a little bit, then it doesn't really matter. Does it?


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: Samarkand on September 07, 2017, 10:51:29 AM
I would prefer to keep/destroy the hard disk. It is the easiest way to be absolutely sure.

This is what companies do when they get rid of their old computers.

However, if you empty your disk, and fill it with random data and repeat that a few times, it would be almost impossible to restore any of your data.

It depends. How much coins do you have in your wallet. If you have millions, then destroy the disk, if just a little bit, then it doesn't really matter. Does it?


I also thought of this proposition. However, as I said I intend to sell the computer, because it still is worth a few hundred $
(funds, that I could use to increase my BTC holdings!  :) ).

I used Electrum and therefore can recreate my wallet on another computer using the mmemonic seed. That means that I need to be absolutely sure
that my hard drive is wiped out, because otherwise the new owner could theoretically retrieve my wallet, if he is somehow able to recover the
Electrum installation.

This probably sounds paranoid, but I want to make really sure that the data canīt be recovered anymore.

Maybe I really have to accept the fact that I canīt sell it and instead make sure to destroy it physically.

Thank you for your reply, aplistir!


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: devans on September 07, 2017, 02:53:07 PM
The shred command can do what you're looking for and is preinstalled on Ubuntu (and most other Linux distributions). Here (https://askubuntu.com/a/17650) is a guide from a thread on Ask Ubuntu.


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: LeGaulois on September 07, 2017, 04:05:06 PM
What about doing a complete disk wipe and reinstall of the OS? It is more radical. Or perhaps creating a new user and deleting the old one.

http://www.dban.org/
In case you need to provide the same application profile you may use [dpkg --get-selections > list]


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: aplistir on September 07, 2017, 05:32:46 PM
You could also transfer all your coins to a new wallet (with new seed).
Then it would not matter if someone gains access to your old wallet.

The drawback is that you would have to pay a small transfer fee..


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: Samarkand on September 08, 2017, 08:30:50 AM
The shred command can do what you're looking for and is preinstalled on Ubuntu (and most other Linux distributions). Here (https://askubuntu.com/a/17650) is a guide from a thread on Ask Ubuntu.

Thank you for the link. Is this superior to the suggestion provided by LeGaulois? I think re-installing the OS might be easier than
executing the guide you linked to. I admit that itīs probably easy for someone with deep Linux knowledge, but I would already fail
at the step where I need to identify the name of the hard disk  ;D

What about doing a complete disk wipe and reinstall of the OS? It is more radical

http://www.dban.org/
In case you need to provide the same application profile you may use [dpkg --get-selections > list]

This seems like an easy and practical solution that might be secure enough. I will do this at the weekend, thank you for your help.


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: aleksej996 on September 08, 2017, 09:24:41 AM
Just overwrite the disk with random data few times. You can do this with "dd if=/dev/urandom of=/dev/sda" or whatever you disk is.
You will just need to run this from a live OS. So whichever way you installed Ubuntu, just choose the option Live instead of Install.
Or just download TailsOS and run the command.


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: devans on September 09, 2017, 05:38:27 AM
Thank you for the link. Is this superior to the suggestion provided by LeGaulois? I think re-installing the OS might be easier than
executing the guide you linked to. I admit that itīs probably easy for someone with deep Linux knowledge, but I would already fail
at the step where I need to identify the name of the hard disk  ;D

Yes, it is: If you only format your disk and reinstall the OS it will still be possible to recover at least some of your data. The same is true for deleting your user and creating a new one. Overwriting the contents of the disk even once prevents that for all practical purposes.


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: argamemnon on September 10, 2017, 02:11:32 PM
what you are looking for is low level format. or factory format. i believe you can do that through your bios, im not sure since i have neer done it... but i do know there are software that will allow you to do this


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: vapourminer on September 10, 2017, 07:23:38 PM
What about doing a complete disk wipe and reinstall of the OS? It is more radical. Or perhaps creating a new user and deleting the old one.

http://www.dban.org/
In case you need to provide the same application profile you may use [dpkg --get-selections > list]

dban. it is a tried and true time tested utility. it will totally wipe the drive by overwriting every sector and can be set to do it multiple times.

just reinstalling the OS may not do it. same with just deleting an account.

dban is a bootable image, put it on CD or flash drive. make sure the disk you want to nuke is the ONLY disk attached.



Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: mensa84 on September 10, 2017, 08:21:43 PM
I used Bitcoin on an old computer of mine using Ubuntu (16.04). Now I intend to sell the computer.
Because I had other sensitive information on this computer and also several altcoin wallets I like to format the hard
drive in order to wipe out all data before I sell the computer.

Is there an exhaustive way to delete every data in a way that it realistically canīt be restored?
Keep in mind that I run Ubuntu, so Iīm not able to utilize Windows cleaner tools.

Maybe someone of you has enough Linux experience to help me out with this.



Faster and more secure one more like:
Quote
dd if=/dev/urandom of=/dev/sda bs=1M
This introduces a lot more fuzz to the overwriting pattern than zeros only, which should be more difficult to restore but not noticeably slower to perform.
Some people claim, this is not enough and one should overwrite hard disks multiple times and with more elaborate patterns, but most will say once is enough, if an attacker wants to restore more than a few bits with a significant chance.


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: SilentNightElf on September 11, 2017, 06:42:22 AM
if its ssd, put parted magic on a cd, boot to it, and use internal secure erase to zap the drive to all 0's instantly


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: Venidici on September 11, 2017, 07:32:37 AM
Encrypt the whole drive, then Secure-Erase with PartedMagic.


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: romecheo on September 11, 2017, 10:49:52 AM
You may try all the suggested command and application above to add level of security on the hard drive or storage device.

however, If you really wanted to make it sure that your data / privacy was still safe and no one can extract information from your storage device, the rule of thumbs was to replace your storage device before selling.



Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: aplistir on September 11, 2017, 11:24:25 AM

Even if you delete everything from your disk, and then write it full with random data etc.
It is still theoretically possible to restore your data. (Would be expensive though)

Because the write head of your disk wont write to the exact same place than it did on the previous time. There will be a very thin strip with the old data right next to the new data still there. (on the same "groove")

But would someone really want to spend lots of money and energy for restoring your data. They would have to be very sure that there is something valuable in there.

That is why companies do not give HD:s when they sell their old machines.

 


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: aroweyen on September 11, 2017, 12:10:46 PM
If you want the safest option just please just destroy your hard drive, there's always a possible way to retrieve the data.


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: SilentNightElf on September 12, 2017, 01:44:52 AM
you never indicated how to correctly destroy the hard drive


Title: Re: Format a hard drive / wipe out a hard drive (Ubuntu)
Post by: TanyaDegurechaff on September 12, 2017, 04:55:54 AM
I have worked on data recovery of hard drives for some time. And I can assure you that even you have a software that shreds the file or data there is always a way to retrieve that(in most cases half of the data is being recovered). so I recommend that you just replace the hard disk with a cheap one. and use your old hard disk as an external storage.