UNIX: how do I completely wipe out a hard disk?

rlee

Gawd
Joined
Jan 30, 2003
Messages
596
I'm a total newbie to UNIX and I'm wondering what is the best way to completely wipe out a hard disk? For example, for a windows system, what I would do is just delete all partitions to completely wipe out the disk. I researched on google for quite some time and I'm coming across this "dd" command, but I'm not exactly sure if thats what I'm suppose to use. Any help would be appreciated. Oh yea this will be done on a solaris sparc20 system.
 
dd is for copying, just use fdisk like you would in a windows system to remove partitions and such.
 
deuce868 said:
dd is for copying, just use fdisk like you would in a windows system to remove partitions and such.

how do i use the fdisk command?

i tried fdisk /dev/rdsk/c0t3d0
but it says cannot stat device /dev/rdsk/c0t3d0
also tried fdisk /dev/hda but i get the same message

also when i enter the format utility,
i get a warning saying:
[disk unformatted]
Warning: error writing VTOC
Warning: no backup labels
Write label failed

Since the disk is unformatted, I tried formatting it, but I left it on over night and after 15+ hours, it was still going so i decided to shut it down.
 
How wiped out do you want it? You can just use fdisk to get rid of any partitions, just as you would on Windows (the Linux fdisk is way more powerful). If you do this, the data still exists on your hard disk, but it's harder to get to. If you just want to wipe the system to do a re-install, then fdisk is the way to go.

If you want to erase the data because you're getting rid of the drive then fdisk is the wrong way to go. You can use 'dd if=/dev/zero of=/dev/hda' to write "0" across the entire hard drive. All your data is then replaced with 0. You might need to change /dev/hda to the device file for your hard disk.
 
bdavids1 said:
How wiped out do you want it? You can just use fdisk to get rid of any partitions, just as you would on Windows (the Linux fdisk is way more powerful). If you do this, the data still exists on your hard disk, but it's harder to get to. If you just want to wipe the system to do a re-install, then fdisk is the way to go.

If you want to erase the data because you're getting rid of the drive then fdisk is the wrong way to go. You can use 'dd if=/dev/zero of=/dev/hda' to write "0" across the entire hard drive. All your data is then replaced with 0. You might need to change /dev/hda to the device file for your hard disk.

I actually just want to do a reinstall. I'm trying to install solaris 9 on a sparc20 system. I booted through cdrom and get into the console. However, I'm clueless as to how to use the fdisk command in unix. Even in windows, I dont use fdisk. I just boot using the windows xp cd and delete partitions through there.
 
i just tried
fdisk /dev/hda
fdisk /dev/hdb
fdisk /dev/hdc
fdisk /dev/hdd
fdisk /dev/sda
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd

none works. Im not even sure if this is an IDE or SCSI drive. I'm so lost
 
If you end up wanting to really wipe out everything, just use killdisk to write zeros to the drive. That will wipe out everything.

The free version of killdisk does just that. www.killdisk.com
 
Which OS are you using?

The device names for SunOS/Solaris are going to be different from Linux which aren't the same as FreeBSD etc...
 
rlee said:
i just tried
fdisk /dev/hda
fdisk /dev/hdb
fdisk /dev/hdc
fdisk /dev/hdd
fdisk /dev/sda
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd

none works. Im not even sure if this is an IDE or SCSI drive. I'm so lost

Boot up using a Win98 boot disk or any other DOS boot disk equivelent (make sure you have fdisk.exe on the disc), and run fdisk from the DOS command. Trying to use fdisk in UNIX isn't going to work.

I am right about this.......right?
 
Win98 is going to work on a Sparc20.

And fdisk works just fine under Unix-like systems.
 
If you have one of the Pizza Box Sun Sparc20's then most likely the drives will be Fast SCSI.

Hopefully you have a drive larger then 4gig too. (most Sparc20's had 4 gig's i think) Solaris 9 needs more than that i think. 9gig or greater i think is what your aiming for.

A DOS boot disk is not going to help you any (different processor/hardware type)
 
I installed solaris 9 on a ss10 not too long ago and there really was not a need to mess around with fdisk. You should be able to answer all the yes/no or 1-N option's it's requres and it will go into the GUI install

The install CD will re-partition the disk unless you specify any mount points you wanted to preserve.

The traditional solaris fdisk command is fairly interactive (and also pretty convoluted), you can just run fdisk from the prompt and select on of the disks listed.
 
"Note: Autoclave only works on x86 PCs"

For the superblind :
a) we're not talking about making data unrecoverable, we're just talking about blowing away the partition table

b) We're talking about Solaris on a SPARC, which, last I checked, is not an x86 PC.
 
Back
Top