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.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > Your Distro > Knoppix Help Forum
Reload this Page Problem wiping a drive with shred command
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

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.

Closed Thread
 
Thread Tools Display Modes
Old 05-29-2008   #1 (permalink)
galapogos
Just Joined!
 
Join Date: Apr 2008
Posts: 24
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)
FoolishGhoul
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)
devils casper
Ghost
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, INDIA
Posts: 18,103
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.
__________________
New Users: Read This First
If you woke up breathing, Congratulations! You get another chance.

devils casper is offline  
Old 05-31-2008   #4 (permalink)
FoolishGhoul
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)
galapogos
Just Joined!
 
Join Date: Apr 2008
Posts: 24
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)
galapogos
Just Joined!
 
Join Date: Apr 2008
Posts: 24
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)
ozar
Super Moderator
 
Join Date: May 2004
Location: Arch Linux
Posts: 8,538
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 Users: * FAQ *

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




All times are GMT. The time now is 11:40 AM.




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

Content Relevant URLs by vBSEO 3.0.0