How best to format/wipe hard drive clean?
Can anyone post a link for a good step-by-step guide for wiping a hdd clean (like with DBAN) and setting up the cd-rom and floppy drive from scratch so one can install a new os (like FreeDOS, linux, whatever else)...
|
You can use a LiveCD (such as knoppix) fdisk, and then dd:
fdisk /dev/hda (remove all the partitions, then create 1 using the entire space) Then: dd if=/dev/zero of=/dev/hda1 There are probably a zillion other ways too ;) Cool |
Quote:
2.)Do I type the above commands at a console prompt? 3.)Is Quote:
Thanks... |
You would boot with the LiveCD, then get to a root console, then, assuming it's the primary master drive on an IDE cable:
fdisk /dev/hda Using fdisk, you'll need to delete the partitions: d And do this until all the partitions are gone, then, create the new partition (hit m for more info, I can't remember the exact key off the top of my head). Then, after the single new partition is created, use dd (yeah, just dd): dd if=/dev/zero of=/dev/hda1 dd is for data dump (maybe, someone may have a better idea, but that's what I've always taken it to mean). You take the input file (if=) and output it to output file (of=). HTH Cool |
Much easier with dd only:
dd if=/dev/zero of=/dev/hda This wipes everything, including the mbr, partition tables, etc. The other method only zeros the actual partition. But, DBAN is even easier: Boot from the DBAN floppy, select an option, and go. Now that we have all that straight, you don't normally need to wipe a disk to install a new OS.... |
In my experience, I've wasted 2 drives dd then entire thing. I don't see a need to dd /dev/zero to the MBR, it's just the MBR afterall ;) It could be coincidence, but since then I've never dd'd the entire drive, instead I'll create a single partition of the entire drive and then dd that partition. Superstition? Yeah maybe, but I haven't had a drive die doing it that way...
Cool |
Quote:
|
I would suggest you to use a bootable CD with Partition Magic 8 ;)
It's so user-friendly you just can't mess up the things. |
Quote:
Also, I did not know that PM has a wipe function?? |
|
Quote:
Ah well, good luck. Cool |
linux wipe disk
Wiping disks in LINUX
Boot from a knoppix CD The following will wipe each partition clean. It can take a while to run, so let it run overnight. Easiest way is to run badblocks. The normal behavior of badblocks with the -w option (destructive write) is to write 0xAA, then 0x55, then 0xFF, and finally 0x00. If you give the -v option, you can watch the progress as badblocks cycles through. Let's say I have a disk (or disk array) with 7 soft (O/S) partitions: hda0, hda1, hda2, hda3, hda4, hda5, hda6. The first command wipes the whole disk: badblocks -vw /dev/hda Let's say I wanted to wipe the odd partitions only. for i in 1 3 5; do badblocks -vw /dev/hda$i done Now, let's say I have a disk array with 4 hard (controller based) partitions: sda1, sdb1, sbc1, sdd1. use the following command. for i in a b c d; do badblocks -vw /dev/sd${i}1 done |
I have had similar problems with reloading windows after using linux.
What I did was grab a mandriva installer disc (mandriva's installer cd was the best for doing this that I had found), boot into the installer and go through the steps until I got to the partitioning. I then setup a fat32 partition and some ext3 partitions and hit next, the installer formatted the partitions. I then quit the installer and put in the WinXP CD and restarted. The Windows installer came up and was able to load the necessary files, I was able to recreate the partitions the way I wanted and install |
this command format and assign the filesystem
mkfs.ext3 -c -c -L /yourlabel /dev/hdd1 mount -t ext3 /dev/hdd1 /yourlabel once u have formated the drive then u have to mount the drive which is done by the above command |
I never zero a hard disk or its partitions.
When a user starts the cfdisk program with command like Code:
cfdisk /dev/hda People can be obsessed with the boot loader in the MBR as it is not supposed to be deleted. Every user needs it for booting and so when installing a new system it will automatically "overwrite" it. If needed One can zero it by Code:
dd if=/dev/zero of=/dev/hda bs=512 count=1 People who have a need to "zero" every bit in the hard disk are bankers or secret agents who cannot let others to recover their information. Good forensic people can still recover your data after you have zeroed a hard disk a few times. |
All times are GMT -5. The time now is 10:56 AM. |