Simple, detailed instructions to wipe free space please.
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What I want are simple instructions like: Do this, do that, so and so will happen, then do that, etc. until the desired result is achieved. If these cannot be provided I just won't bother and will simply re-install WXP, wipe the free space (which is easy in Windows), abandon Ubuntu and carry on happily using Windows.
PeterJD
Peter; I'm sorry, but the tone of this suggests that you think you are talking to the support desk at a company that sells Linux. This is a community of volunteers who will put out substantial effort to help you, but--when threatened with your return to Windows--will likely just yawn.
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329
Rep:
Quote:
Originally Posted by PeterJD
Sorry, I just don't understand how to apply most of what you have said. I am a complete newbie to Linux. All my computer work has been in Windows.
What I want are simple instructions like: Do this, do that, so and so will happen, then do that, etc. until the desired result is achieved. If these cannot be provided I just won't bother and will simply re-install WXP, wipe the free space (which is easy in Windows), abandon Ubuntu and carry on happily using Windows.
PeterJD
It's easy in Linux too, they gave you all the answers. If you can't be bothered to read properly, that's your own fault.
WeirdOne and Valery's method works by creating a new file, filling the entire free space, and that is all zeroes. Thus, the space freed by any previously deleted files will be used by the new file, and hence zeroed out. You then delete the big file full of zeroes to recover your space.
And dd can create a file that does not exist.
I just realized that I had seen this method before!! Sorry for the knee-jerk reaction earlier.
I wonder if anyone has tested this to ensure that is gets **everything**.
Peter;
Turning it into detailed steps (and adding a few):
Make sure all important data is backed up.
Open a terminal.
Enter "su" to get root (admin) privileges.
enter "dd if=/dev/urandom of=junk"
wait until it is done
enter "rm junk"
(optional) enter "dd if=/dev/zero of=junk"
wait until it is done
enter "rm junk" (end of optional)
Repeat all of the above in every directory which is on a different partition. (Or just do it tne directory(ies) where your deleted files were.
The optional part gives you a double pass, which is more secure than just one. If you do just the single pass, you can use /dev/zero instead of /dev/urandom. I doubt if there is any real difference when doing one pass.
How long it takes depends on the free space on each partition.
So can I just use the dd command as described by Valery Reznic? And how long will it take? Otherwise it just seems too complicated. I'm not really paranoid.
PeterJD
Hi,
I recently wiped my external harddrive with dd method. You can use the approach described in earlier posts. Two things I would recommend additionally:
1. tell dd to use a block-size of 1MB. This will speed up the process.
Using pixelany's suggestion:
Code:
# enter "dd if=/dev/urandom of=junk bs=1M"
# wait until it is done
# enter "rm junk"
# (optional) enter "dd if=/dev/zero of=junk bs=1M"
Although I did three passes first filling with zeros, then random and finally with zeros again.
2. To avoid locking up your system you could run the commands from a liveCD. You would have to mount your linux partition and create the output file on that partion:
Code:
mount /dev/sdxx /mnt
dd if=/dev/zero of=/mnt/junk bs=1M
...
where /dev/sdxx is your linux partition, e.g. /dev/sda2 or /dev/sdb4 ...
As for the time it will take, writing zeros happened at a speed of appr. 30MB/s, writing random was 4MB/s. So doing the math this results in 5 minutes/GB if you first fill random and then zeros.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.