LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-22-2018, 06:52 AM   #1
nbwilson
LQ Newbie
 
Registered: Oct 2018
Posts: 1

Rep: Reputation: Disabled
Verify Disk is Wiped in Linux


Hello all,

I used the command shred -vfz -n 3 /dev/sda to wipe my drive. What commands do I use to verify that the drive is indeed wiped?

Appreciate anyone's assistance.

Thanks,
WN
 
Old 10-22-2018, 07:04 AM   #2
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
Code:
dd if=/dev/urandom of=/dev/sda
 
Old 10-22-2018, 07:22 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
That's pretty pointless, the OP has already wasted enough time.
Code:
dd if=/dev/sda count=100 | hexdump -C
 
1 members found this post helpful.
Old 10-22-2018, 09:25 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Hopefully you unmounted any filesystems that relied on /dev/sda or its partitions before the shred. If you had metadisks or LVM relied on /dev/sda or its partitions you need to verify that what is left (e.g. if RAID1 your /dev/sdb) is also shred'ed.

The man page for shred cautions that it doesn't work for journaled filesystems however, so long as the filesystems were unmounted before the shred and you did it on the device (/dev/sda) rather than the mounted filesystem this shouldn't be a concern.

What I do after shred'ding devices is just try to mount the filesystem. If that fails then it tends to confirm it was overwritten.

What syg00 advised would let you see what is at the beginning of the device. However, unless you knew what it was before you did the shred I'm not sure you would recognize if it had changed.

Note to bradvan: Shred has an option to specify a urandom device.
 
1 members found this post helpful.
Old 10-22-2018, 12:01 PM   #5
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
I was just trying to give an alternative to destroy it. I wanted to give syg00 gave, but could not come up with hexdump.
 
Old 10-22-2018, 04:29 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Note the use of "-z", hence my suggestion. The output will be minimal.
 
Old 10-23-2018, 06:16 AM   #7
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
In this case, you need to destroy all backups.
 
  


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] Disk burners that can verify that the copy is exact after burning to disk grumpyskeptic Linux - Software 7 03-04-2017 05:39 PM
How to verify a disk matches an ISO file? user1x Linux - Software 8 06-10-2013 07:23 AM
Ubuntu install in free disk space wiped Windows boot droolinggeezer Linux - Newbie 4 05-29-2011 04:03 PM
openssl ssl error code 14090086 verify the CA cert is ok / certificate verify failed acummings Slackware 14 02-27-2009 01:51 AM
Verify disk drive integrity bhassel Red Hat 1 09-20-2006 12:39 PM

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

All times are GMT -5. The time now is 02:17 PM.

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