LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-19-2004, 04:03 AM   #1
saravkrish
Member
 
Registered: Mar 2004
Location: KY, USA
Distribution: Fedora Core 1
Posts: 190

Rep: Reputation: 30
Zeroing out ununsed space in a ext3 partition


Hi,

How do I zero out the usused space of an ext3 partition without loosing any data. I need to do this to make sure that the disk imaging software is not accidentally imaging old data in the unused blocks.

Thanks,
Sarav
 
Old 11-19-2004, 02:54 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"How do I zero out the usused space of an ext3 partition without loosing any data. I need to do this to make sure that the disk imaging software is not accidentally imaging old data in the unused blocks."

You can set free space to zeros when you delete files by deleting with the shred command and the -z option. See man shred.

For existing free space you could allocate a temporary file that uses up all of the free space and then shred the temporary file.

-------------------------
Steve Stites
 
Old 11-19-2004, 03:10 PM   #3
saravkrish
Member
 
Registered: Mar 2004
Location: KY, USA
Distribution: Fedora Core 1
Posts: 190

Original Poster
Rep: Reputation: 30
shred wont work for ext3

Hi,

Checked out "man shred" - it doesn't work for journaling filesystems. I anyway wanted to clear only the existing free space and did this to take care of that-

cat /dev/urandom > dump
rm dump
cat /dev/zero > dump
rm dump

Note: Your working directory should be in the parition that you want to wipe the free space.

Thanks,
Sarav
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ext3 lost space??? Fordor Linux - General 15 07-10-2005 12:09 PM
how to convert ext3 to ntfs? cannot even see ext3 partition parv Linux - Hardware 1 12-31-2004 02:56 PM
Zeroing free space? RyanBarnard Linux - Software 2 09-23-2004 06:05 PM
Format ext3 ONLY on unallocated space X-Crawler Linux - General 3 03-16-2004 11:27 AM
ext3 no free space even if there is m1-rail Linux - Software 2 04-20-2003 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:31 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