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

Wiping multiple drives for refurbishment - - Page 3

post #21 of 25
Quote:
Originally Posted by error10 View Post
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
You're right about the phone, although it depends on the model. If you can set it to "charge only", you'll be fine. If you set it to storage mode, you'll wipe whatever storage area is exposed as a USB drive - usually that isn't the system area on the phone.

Anyway, that's what mains sockets are for. By the way, is there a way to get a progress bar in dd? I'm sure I installed something once, but it never worked...

Edit:

@OP: These commands also work on Mac OS X if you ever have to use a Mac - it's a UNIX, easy as it is to forget. The drive assignments are different, but the dd command and the scripting is pretty much the same.
Edited by parityboy - 3/6/11 at 7:08pm
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
Apple Basic Keyboard 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
Apple Basic Keyboard Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #22 of 25
Thread Starter 
Quote:
Originally Posted by error10 View Post
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
Can't thank you enough! I'll be running this tomorrow on two drives as the cables have been ordered but not yet received for the rest of them. Many, many, very gracious, and very grateful thanks!


Quote:
Originally Posted by parityboy View Post
Edit:

@OP: These commands also work on Mac OS X if you ever have to use a Mac - it's a UNIX, easy as it is to forget. The drive assignments are different, but the dd command and the scripting is pretty much the same.
That is definitely good to know! Thanks

@error10

Do I need to save this to any specific file type or does Linux/UNIX not use file name extensions? Thanks again!
    
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 #23 of 25
Quote:
Originally Posted by GanjaSMK View Post
Can't thank you enough! I'll be running this tomorrow on two drives as the cables have been ordered but not yet received for the rest of them. Many, many, very gracious, and very grateful thanks!

Do I need to save this to any specific file type or does Linux/UNIX not use file name extensions? Thanks again!
Linux (UNIX) does not require file extensions, though people often use them anyway. Shell scripts usually don't use an extension, though sometimes the .sh extension is seen. If you decide to save it to a file, the main thing to remember is that it should be marked executable, e.g.:

Code:
chmod +x eraseeverything.sh
./eraseeverything.sh
It doesn't even really need to be saved to a file; you can just paste it in as-is at a root shell prompt.

I should also note that connecting your drives via USB will be much slower than connecting them directly internally, so if you can connect them directly to an IDE or SATA port, then it's a good idea to do so.
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 #24 of 25
Thread Starter 
Quote:
Originally Posted by error10 View Post
Linux (UNIX) does not require file extensions, though people often use them anyway. Shell scripts usually don't use an extension, though sometimes the .sh extension is seen. If you decide to save it to a file, the main thing to remember is that it should be marked executable, e.g.:

Code:
chmod +x eraseeverything.sh
./eraseeverything.sh
It doesn't even really need to be saved to a file; you can just paste it in as-is at a root shell prompt.

I should also note that connecting your drives via USB will be much slower than connecting them directly internally, so if you can connect them directly to an IDE or SATA port, then it's a good idea to do so.
I wish I could, but I don't have things set up like that. The IDE-to-USB seems to be the easiest way of connecting more than six drives to the machine.
    
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 #25 of 25
One more thing - if you DO save it somewhere in a live environment, remember it will disappear if you lose power. it might be an idea to save it to a USB stick, then copy it into the live environment and REMOVE THE USB STICK immediately after - no need to wipe the USB stick, eh?

Or you could simply bookmark this thread...
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
Apple Basic Keyboard 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
Apple Basic Keyboard Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  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 -