Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Knoppix Help Forum > Problem wiping a drive with shred command

Forgot Password?
 Knoppix Help Forum   For all discussions about Knoppix, the Linux "Live CD" that lets you run Linux without needing to install on your hard drive.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 05-29-2008   #1 (permalink)
Just Joined!
 
Join Date: Apr 2008
Posts: 78
Problem wiping a drive with shred command

Hi,
I'm trying to wipe an entire 20GB drive with the shred command using Knoppix. Specifically this is the command I'm entering
Code:
shred -n 2 -f -v /dev/hda
To my understand from reading the man pages, this writes random data to the drive(/dev/hda) twice, forces permissions, and shows progress.

I see progress up to about 96% for the 1st pass, then I get 2 lines of error at the end of the drive. Something like "error writing to offset x, input/output error", where x is the end of the drive.

The 2nd pass never runs due to this error, the the program terminates back to the shell.

Does anyone know what's wrong?

TIA.
galapogos is offline  


Old 05-31-2008   #2 (permalink)
Just Joined!
 
FoolishGhoul's Avatar
 
Join Date: May 2008
Location: Cumbria
Posts: 2
you need to unmount the drive first.

code you will need:

Code:
sudo umount /dev/hda

shred -n 2 -vf /dev/hda
might not need to sudo if you're already in superuser mode...
FoolishGhoul is offline  
Old 05-31-2008   #3 (permalink)
Super Moderator
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, India
Posts: 21,081
Send a message via Yahoo to devils casper
I would suggest you to write zeros in whole harddisk through dd command instead of using shred.
Code:
dd if=/dev/zero of=/dev/hda
Or

Use DBAN.
__________________
It takes a lot of time to be a genius, you have to sit around so much doing nothing, really doing nothing. - Gertrude Stein
New Users: Read This First
devils casper is offline  
Old 05-31-2008   #4 (permalink)
Just Joined!
 
FoolishGhoul's Avatar
 
Join Date: May 2008
Location: Cumbria
Posts: 2
yeah, i'd forgotten about that, Darik's Boot and Nuke (DBAN) is an excellent tool for wiping hard-drives of computers, have used it on many i've sold/given away/scrapped...
FoolishGhoul is offline  
Old 05-31-2008   #5 (permalink)
Just Joined!
 
Join Date: Apr 2008
Posts: 78
I do know about DBAN. In fact it was the first thing I've tried. However, most of DBAN's algorithms do a final zeroization pass, which I don't want. I want the contents of the HDD to be randomized instead. Hence I'm using shred w/o the -z option, and hence I'm not using dd.

Of course, if there is an easy way to disable the final zeroization pass then I'm open to using DBAN.

I will try umount on the drive with shred in the meantime.
galapogos is offline  
Old 06-02-2008   #6 (permalink)
Just Joined!
 
Join Date: Apr 2008
Posts: 78
Hmm, the drive doesn't seem to be mounted at all, so umount did nothing. Any other ideas? Could the drive have bad sectors or something? DBAN did complete the wipe though.
galapogos is offline  
Old 06-05-2008   #7 (permalink)
Super Moderator
 
ozar's Avatar
 
Join Date: May 2004
Posts: 12,051
Hi, galapogos!

If you still need help with this please create a new thread. I'm locking this one because it has attracted 8 different spam messages already.

Sorry for any inconvenience.
__________________
oz

New Members: * README *
ozar is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 09:55 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2