How can I wipe my hard drive?

Asked by Bill McLeod

I have a laptop which I wish to sell with just the bare-bones Linux OS. Following the directions from another user's question, I tried to wipe the hard drive by booting from a live cd, running Gparted, deleting partitions and then reformat. I am left with one empty partition and one with data. This one, and the swap file shows a closed lock, and I can't find reformat as an operation. What should I do?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gparted Edit question
Assignee:
No assignee Edit question
Solved by:
nhasian
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Usually i use gparted to delete partitions on hard disk with success...

Please copy and paste here the result of the terminal command:

sudo fdisk -l

booting that pc from The Ubuntu Live cd...

Thank you

Revision history for this message
Best nhasian (nhasian) said :
#2

it sounds like you did it correctly, perhaps you missed a partition? when you boot the liveCD, and launch gparted, make sure to delete all the paritions on all the discs if your laptop has more than one hard disk. then you can create a new EXT3 partition for the root / and one for swap and complete the fresh ubuntu installation.

Revision history for this message
Bill McLeod (wbmcleod) said :
#3

Thanks nhasian, that solved my question.

Revision history for this message
Elliot (elliot-orwells) said :
#4

Actually this isn't the recommended way to wipe a harddrive. I would use "dd" on the command line and copy /dev/zero to the drive, or run Badblocks in destructive mode (this would also check for damaged sectors).

Just changing the filesystem won't erase your files, they would still be easily recovered.

Revision history for this message
as (asteinborn78) said :
#5

I'd do what Elliot said, or create a new DOS disklabel.