Results 1 to 10 of 20
A friend of mine has just given me an old 80GB hard drive provided that i erase the hard drive. So could someone tell me that if i used
Code:
...
- 03-20-2011 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 98
Erasing an old hard drive?
A friend of mine has just given me an old 80GB hard drive provided that i erase the hard drive. So could someone tell me that if i used
to erase all data contained on the hard drive Would i then have to reformat the hard drive so i could install a Linux OS on it?Code:shred -vz -n 3 /dev/hda
- 03-20-2011 #2
I would recommend using dd to fill your hard-drive with zeros. I say this because shred can sometimes miss bad sectors that were mapped out by the HDD, which are completely invisible to applications, such as shred.
Use dd to write all zeros to your entire hard drive:
Or just to a selected partition:Code:dd if=/dev/zero of=/dev/hda bs=1M
However, if your just going to be installing Linux to the hard drive, you might as well let your distributions installation program do all the work for you. It should make new partitions and reformat them. In my opinion, I think formating is best practice to clean up any 'dirty' sectors. Is there a reason why you'd like to avoid formatting?Code:dd if=/dev/zero of=/dev/hda1 bs=1M
- 03-20-2011 #3Just Joined!
- Join Date
- Apr 2009
- Posts
- 98
The only reason why i would like to avoid formatting an hard drive is because i don't have a clue how to do it.
- 03-20-2011 #4forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,095
Check out the Parted Magic LiveCD for your formatting chores. It uses gparted and with its very nice GUI, it is highly doubtful that formatting can get any easier. The disk itself also comes with lots of other great utilities to have on hand. It is by far my favorite liveCD.
oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.
- 03-20-2011 #5
Ahh, I see.
Well that really shouldn't be much of a problem. Most Linux distributions these days do all that work for you using the installation wizard. Generally, the wizard will ask if you'd like it to wipe the entire drive and setup as well as format the partitions for you. All you need to do is tell it the size of the partitions and what file system you'd like to partition it as. I personally recommend using the ext3 file system.
You also usually have a more manual approach as well. This will let you define your partitions, their size, their file system and more if you'd like a custom configuration.
Also, as Ozar suggested, Parted-Magic is a wonderful partitioning tool.
Since I imagine you have nothing to loose on this hard drive, I say just give it a go! Let us know if you need any help along the way
- 03-20-2011 #6Just Joined!
- Join Date
- Apr 2009
- Posts
- 98
Thanks for the replies both. Think i might have to come back if i mess things up lol
- 03-20-2011 #7forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,095
oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.
- 03-20-2011 #8
If your friend is concerned about protection of data on the drive then use dd to zero the entire drive then install Linux after, partitioning the drive as you like. I suggest this will meet requirements your friend may have for security ... otherwise they would destroy the drive or wipe it before letting you have it

Make sure you select the correct drive when using dd command ... run fdisk -l first and check you have selected the correct drive ...
- 03-20-2011 #9
Yes, using dd is an easy option, but requires the command line and an understanding of what is "/dev/hda" etc. This is something which puts off the average user from Linux.
Simple reformatting of a drive is not unlike resetting the file listing held at the start of a drive, and marking the whole drive as empty and ready for use. It doesn't overwrite any of the actual data sectors. These will remain filled with whatever data was written on them until the OS uses them because they are "empty" space.
The dd command would overwrite as stated, but the question might be asked - why don't you get a new and bigger drive?
If your friend is concerned with security, he/she should physically destroy the old drive. A good few hits with a hammer, or drill through the casing and pierce the platters.
Hard drives are so cheap these days, and you get much better performance and a warranty!
Just my 2 cents...
- 03-21-2011 #10
I'm with Jonathan. Honor your promise to your friend by zeroing the drive, no matter what else you do. Formatting leaves much of the old data subject to harvesting.


Reply With Quote
