Overclock.net › Forums › Components › Hard Drives & Storage › Wiping multiple drives for refurbishment -
New Posts  All Forums:Forum Nav:

Wiping multiple drives for refurbishment - - Page 2

post #11 of 25
Quote:
Originally Posted by GanjaSMK View Post
Windows XP, not Linux base.

( edit )

Unless I can do this from a Ubuntu boot which is fine by me. I just don't understand what the command is/does.
Well, when you said

Quote:
Originally Posted by GanjaSMK View Post
Would DBAN work this for me or can I use fdisk?
I assumed you had access to Linux. Anyway, dd reads from a block device of some kind, and writes to a block device of some kind.

In the example I gave, if is input file and of is output file (everything is considered to be a file, under UNIX and its lookalikes) . Under Linux, /dev/zero is a pseudo device which simply supplies zeros - you can use /dev/random in its place if you wish.

/dev/sda is the first SCSI block device (SATA devices are treated as SCSI devices under GNU/Linux), /dev/hda is the first PATA block device. /dev/sda1 would be the first partition of the first SCSI block device.

In your case, you wish to wipe the whole device, so you would address it as /dev/sda (or /dev/hda)

Any live Linux CD will let you do this, such as Ubuntu - simply open a terminal window, and type the command. :-) However, for future utility, you may be interested in something like PartedMagic or System Rescue CD.
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Dell SK-8185 Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Dell SK-8185 Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #12 of 25
Thread Starter 
Quote:
Originally Posted by parityboy View Post
Well, when you said



I assumed you had access to Linux. Anyway, dd reads from a block device of some kind, and writes to a block device of some kind.

In the example I gave, if is input file and of is output file (everything is considered to be a file, under UNIX and its lookalikes) . Under Linux, /dev/zero is a pseudo device which simply supplies zeros - you can use /dev/random in its place if you wish.

/dev/sda is the first SCSI block device (SATA devices are treated as SCSI devices under GNU/Linux), /dev/hda is the first PATA block device. /dev/sda1 would be the first partition of the first SCSI block device.

In your case, you wish to wipe the whole device, so you would address it as /dev/sda (or /dev/hda)

Any live Linux CD will let you do this, such as Ubuntu - simply open a terminal window, and type the command. :-) However, for future utility, you may be interested in something like PartedMagic or System Rescue CD.
That is excellent information. So would I be able to boot a machine into a Ubuntu CD (with or without a system HDD), then hook up all of my HDD's (will be using a 2.5" IDE-to-USB cable, run this command in multiple instances and/or with some sort of batch/script that would initiate deleting the disks to a blank state to be later formatted as NTFS?

Would a USB HDD still be read like a hard-wired device on the motherboard controller according to Lunix (it does via Windows, essentially), or would the /dev/sda target be different according to whatever USB port it is plugged into?

I think I may have to get something like Partition Magic or similar software to do what I want simply.

Perhaps someone knows a Windows program, or better yet a DOS utility (or batch/VBS script) that I can load into a CMD prompt in Windows that will just reformat the entire drive (basically deleting all partitions, then formatting to NTFS)?
    
CPUMotherboardGraphicsRAM
INTEL ASUS XFX  SAMSUNG 
Hard DriveOptical DriveCoolingOS
WD/ST LG KUHLER WINDOWS 
MonitorKeyboardPowerCase
LG/SAMSUNG IBM MODEL M CORSAIR THERMALTAKE 
MouseMouse PadAudio
MS INTELLIMOUSE EXPLORER 3.0 REGULAR LARGE PAD ONBOARD but it USED TO BE A XONAR DG  
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
INTEL ASUS XFX  SAMSUNG 
Hard DriveOptical DriveCoolingOS
WD/ST LG KUHLER WINDOWS 
MonitorKeyboardPowerCase
LG/SAMSUNG IBM MODEL M CORSAIR THERMALTAKE 
MouseMouse PadAudio
MS INTELLIMOUSE EXPLORER 3.0 REGULAR LARGE PAD ONBOARD but it USED TO BE A XONAR DG  
  hide details  
Reply
post #13 of 25
Quote:
Originally Posted by GanjaSMK View Post
That is excellent information. So would I be able to boot a machine into a Ubuntu CD (with or without a system HDD), then hook up all of my HDD's (will be using a 2.5" IDE-to-USB cable, run this command in multiple instances and/or with some sort of batch/script that would initiate deleting the disks to a blank state to be later formatted as NTFS?
Essentially correct, although you are advised to remove the system HDD first - no need to risk making a mistake, eh?

Quote:
Originally Posted by GanjaSMK View Post
Would a USB HDD still be read like a hard-wired device on the motherboard controller according to Lunix (it does via Windows, essentially), or would the /dev/sda target be different according to whatever USB port it is plugged into?
Correct on the first assumption, in fact USB and FireWire storage devices use a subset of the SCSI command set for storage operations, so they too are treated as SCSI devices, and so would show up as /dev/sd[next available letter]. The physical port is irrelevant.
Edited by parityboy - 3/6/11 at 12:27pm
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Dell SK-8185 Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Dell SK-8185 Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #14 of 25
Thread Starter 
Quote:
Essentially correct, although you are advised to remove the system HDD first - no need to risk making a mistake, eh?

Correct on the first assumption, in fact USB and FireWire storage devices use a subset of the SCSI command set for storage operations, so they too are treated as SCSI devices, and so would show up as /dev/sd[next available letter]. The physical port is irrelevant.
Got it. That's excellent then, very simple. So what could I write a script to read that would do this for me in an 'automated' state so I could leave it unattended? And would this work on all drives simultaneously (would it do all drives at the same time {can the command be extended to do it an all devices} or do I need to run a batch that initiates each command instance for each particular drive?

That's kind of a tough question ... confuses me even. What I mean is:

If I can't extend the command to do each device simultaneously, and have to have the command essentially start one drive at a time, is it possible to do all drives at the same time (essentially) by using a script of the commands?

Also; /dev/sd(x) where x is the drive letter/path (A through L would be 12 drives) correct? And is the command to wipe them just:

dd if=/dev/zero of=/dev/sda

Does that delete the data or just write over, and will it remove all partitions on the disk?

*So many questions , many thanks for the help!*
    
CPUMotherboardGraphicsRAM
INTEL ASUS XFX  SAMSUNG 
Hard DriveOptical DriveCoolingOS
WD/ST LG KUHLER WINDOWS 
MonitorKeyboardPowerCase
LG/SAMSUNG IBM MODEL M CORSAIR THERMALTAKE 
MouseMouse PadAudio
MS INTELLIMOUSE EXPLORER 3.0 REGULAR LARGE PAD ONBOARD but it USED TO BE A XONAR DG  
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
INTEL ASUS XFX  SAMSUNG 
Hard DriveOptical DriveCoolingOS
WD/ST LG KUHLER WINDOWS 
MonitorKeyboardPowerCase
LG/SAMSUNG IBM MODEL M CORSAIR THERMALTAKE 
MouseMouse PadAudio
MS INTELLIMOUSE EXPLORER 3.0 REGULAR LARGE PAD ONBOARD but it USED TO BE A XONAR DG  
  hide details  
Reply
post #15 of 25
Essentially yes, you could write a script that loops through the entries in /dev and for each one that conforms to /dev/sd[letter], do dd if=/dev/random of=$DEVICE where $DEVICE is /dev/sda or whatever. I'm not sure if you could do the drives in parallel, or simply set off a script and leave it running overnight. dd itself will not address multiple devices, but you could spawn multiple dd commands.

Another thing worth considering (especially if you can spawn parallel instances) is doing multiple passes per drive, to make double sure the data is wiped. Unfortunately, I'm no script expert (need to brush up, tbh ).

The command will write data over the whole device including the partition tables. In my opinion it would be more secure to use /dev/random (or /dev/urandom) as an input device, as opposed to /dev/zero. Additionally it would probably be quicker to use a block size larger than the default. For example, the parameter bs=1M will write to the disk in 1MB blocks.

Look here for more info on dd.
Edited by parityboy - 3/6/11 at 12:21pm
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Dell SK-8185 Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Dell SK-8185 Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #16 of 25
Thread Starter 
Awesome. I'll have to consult an IT guy I know who is a oldschool UNIX/Linux guy - he'll probably know how to get a script working for me.

Again thanks very much parityboy; very helpful.

If anyone else can give me more insight on how this can be done in Windows XP or via a DOS prompt I would greatly appreciate it!
    
CPUMotherboardGraphicsRAM
INTEL ASUS XFX  SAMSUNG 
Hard DriveOptical DriveCoolingOS
WD/ST LG KUHLER WINDOWS 
MonitorKeyboardPowerCase
LG/SAMSUNG IBM MODEL M CORSAIR THERMALTAKE 
MouseMouse PadAudio
MS INTELLIMOUSE EXPLORER 3.0 REGULAR LARGE PAD ONBOARD but it USED TO BE A XONAR DG  
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
INTEL ASUS XFX  SAMSUNG 
Hard DriveOptical DriveCoolingOS
WD/ST LG KUHLER WINDOWS 
MonitorKeyboardPowerCase
LG/SAMSUNG IBM MODEL M CORSAIR THERMALTAKE 
MouseMouse PadAudio
MS INTELLIMOUSE EXPLORER 3.0 REGULAR LARGE PAD ONBOARD but it USED TO BE A XONAR DG  
  hide details  
Reply
post #17 of 25
No worries mate, it's what we're here for. Remember though, as much as you want to do this in Windows, the DOS shell has nowhere near the scripting power of the UNIX & Linux shells. In the Windows world everything is GUI, and nearly everything is commercial. I don't think Windows even has dd or anything like it.
Edited by parityboy - 3/6/11 at 12:39pm
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Dell SK-8185 Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Ryzen
(12 items)
 
  
CPUMotherboardGraphicsRAM
Ryzen 7 1700 Gigabyte GA-AB350M Gaming 3 Palit GT-430 Corsair Vengeance LPX CMK16GX4M2B3000C15 
Hard DriveCoolingOSMonitor
Samsung 850 EVO AMD Wraith Spire Linux Mint 18.x Dell UltraSharp U2414H 
KeyboardPowerCaseMouse
Dell SK-8185 Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #18 of 25
Indeed. You could probably get away with doing 12 drives at once in Linux (if you have 12 SATA ports!) just by throwing each dd command in the background. I can't imagine any way Windows could pull this off.
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #19 of 25
Thread Starter 
Quote:
Originally Posted by error10 View Post
Indeed. You could probably get away with doing 12 drives at once in Linux (if you have 12 SATA ports!) just by throwing each dd command in the background. I can't imagine any way Windows could pull this off.
Any chance you have some scripting advice on how to do this simultaneously? I'd love to be able to just boot an empty machine and run a script that can do this with the swipe of a click or two and/or command.

Basically the drives are 2.5" IDE which will be connected through a 2.5" IDE-to-USB cable, via direct USB or a combination of USB/HUB.
    
CPUMotherboardGraphicsRAM
INTEL ASUS XFX  SAMSUNG 
Hard DriveOptical DriveCoolingOS
WD/ST LG KUHLER WINDOWS 
MonitorKeyboardPowerCase
LG/SAMSUNG IBM MODEL M CORSAIR THERMALTAKE 
MouseMouse PadAudio
MS INTELLIMOUSE EXPLORER 3.0 REGULAR LARGE PAD ONBOARD but it USED TO BE A XONAR DG  
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
INTEL ASUS XFX  SAMSUNG 
Hard DriveOptical DriveCoolingOS
WD/ST LG KUHLER WINDOWS 
MonitorKeyboardPowerCase
LG/SAMSUNG IBM MODEL M CORSAIR THERMALTAKE 
MouseMouse PadAudio
MS INTELLIMOUSE EXPLORER 3.0 REGULAR LARGE PAD ONBOARD but it USED TO BE A XONAR DG  
  hide details  
Reply
post #20 of 25
This will erase EVERY DRIVE connected to the system, INCLUDING internal hard disks! Only run this from a Live CD (NOT a Live USB), and REMOVE any hard drives or USB sticks you wish to preserve. That means don't charge your phone from it either, or it will get erased. This script must be run as root.

Code:
#!/bin/sh

for i in /dev/sd?
do
    nohup dd if=/dev/zero of=$i &
done
wait
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Hard Drives & Storage
Overclock.net › Forums › Components › Hard Drives & Storage › Wiping multiple drives for refurbishment -