PDA

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


rlee
06-10-2004, 08:41 AM
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.

deuce868
06-10-2004, 08:55 AM
dd is for copying, just use fdisk like you would in a windows system to remove partitions and such.

rlee
06-10-2004, 09:06 AM
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.

bdavids1
06-10-2004, 09:06 AM
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.

rlee
06-10-2004, 09:20 AM
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.

deuce868
06-10-2004, 09:27 AM
http://www.linuxforum.com/linux-partition/partition-5.html

HTH

rlee
06-10-2004, 09:45 AM
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

Shadow2531
06-10-2004, 10:00 AM
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

ameoba
06-10-2004, 01:04 PM
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...

Private Citizen
06-15-2004, 06:04 AM
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?

ameoba
06-15-2004, 02:15 PM
Win98 is going to work on a Sparc20.

And fdisk works just fine under Unix-like systems.

saterth
06-16-2004, 11:17 AM
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)

mcarlson
06-16-2004, 05:44 PM
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.

mrbobo
06-17-2004, 08:41 AM
google.com autoclave

Problem solved.

and for the super lazy
http://staff.washington.edu/jdlarios/autoclave/

ameoba
06-17-2004, 01:24 PM
"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.

mrbobo
06-17-2004, 03:07 PM
"Note" I am super blind sorry.