LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2018, 12:16 PM   #1
chonk0
LQ Newbie
 
Registered: Apr 2013
Posts: 16

Rep: Reputation: Disabled
wipe all drives on system


Hello Id like to wipe all my drives on a machine at once with dd. Would dd if=/dev/zero of=/dev/* bs=16M work?
 
Old 02-16-2018, 12:19 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
No, look in /dev directory: ls /dev/*
You don't want to fill all these device files

What sort of drives is? And you run the command from live system? (OS mounted from removeable media?)
 
1 members found this post helpful.
Old 02-16-2018, 12:30 PM   #3
chonk0
LQ Newbie
 
Registered: Apr 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
https://i.imgur.com/YGhMJMT.png

Its a live system yes. Im logged in remotely via terminal.

I dont have KVM so I wanna make sure i wipe everything at once. Standard SATA disks.
 
Old 02-16-2018, 12:35 PM   #4
chonk0
LQ Newbie
 
Registered: Apr 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
No, look in /dev directory: ls /dev/*
You don't want to fill all these device files

What sort of drives is? And you run the command from live system? (OS mounted from removeable media?)
https://i.imgur.com/YGhMJMT.png

Its a live system yes. Im logged in remotely via terminal.

I dont have KVM so I wanna make sure i wipe everything at once. Standard SATA disks.
 
Old 02-16-2018, 03:37 PM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
So of value for dd would be only /dev/sdb and /dev/sdc

As it is only 2 command iterations, no need to use clever loops or globing
Just run the command twice (1st with of=/dev/sdb, 2nd with of=/dev/sdc)
After that, there will be nothing left in these devices
 
Old 02-16-2018, 04:24 PM   #6
chonk0
LQ Newbie
 
Registered: Apr 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
So of value for dd would be only /dev/sdb and /dev/sdc

As it is only 2 command iterations, no need to use clever loops or globing
Just run the command twice (1st with of=/dev/sdb, 2nd with of=/dev/sdc)
After that, there will be nothing left in these devices
Thanks
 
Old 02-16-2018, 05:36 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Note that depending on drive size, it may take a while to finish

With fdisk and mdadm tools, it's a matter of less than one minute to delete partitions and start over
Code:
mdadm --zero-superblock /dev/sdb
mdadm --zero-superblock /dev/sdc
fdisk /dev/sdb (delete partitions, write changes)
fdisk /dev/sdc (delete partitions, write changes)
 
Old 02-16-2018, 07:58 PM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Dd will run multiple instances. But I've never been able to get globbing to work with it.
 
Old 02-17-2018, 09:17 AM   #9
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,521

Rep: Reputation: Disabled
To overwrite data partitions, you could use shred.

To remove file allocation tables, use dd & /dev/zero to overwrite the first MB (or two) of your disks, sdb & sdc, (bs=1M count=2)

Using dd to erase your two disks will take a considerable time.
 
Old 02-17-2018, 05:53 PM   #10
Stev8
Member
 
Registered: Mar 2012
Location: Hamilton, Ontario
Distribution: Ubuntu 17.10 64 bit
Posts: 113

Rep: Reputation: Disabled
you can also use
sudo cfdisk

or gparted on the live cd.
 
Old 02-18-2018, 08:26 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
These days, the fastest way to "wipe a drive" is to use equipment with on-board encryption, and simply load a new random key-value into the drive firmware. This will render the entire contents pragmatically unrecoverable. (To anyone but sophisticated law-enforcement, and "so far as we know.") Anyhow, it will quickly zap the drive, and do it in a way that's satisfactory to your liability-insurance carrier. With today's ultra-high capacity drives, other alternatives take hours or days. This strategy takes five seconds.

Last edited by sundialsvcs; 02-18-2018 at 08:28 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Tiny system to wipe hdds brilyant Linux - Software 7 06-21-2012 01:30 AM
LXer: How To Securely Destroy/Wipe Data On Hard Drives With shred LXer Syndicated Linux News 0 02-22-2012 10:10 AM
System Wipe - Clean up before restore micxz Linux - Security 18 07-11-2009 01:06 PM
xfs problem? X Server won't start after system wipe browny_amiga Linux - General 3 09-22-2003 08:06 AM
defrag causes mandrake to wipe out system dick19272000 Linux - General 1 02-17-2002 03:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration