LinuxQuestions.org
Help answer threads with 0 replies.
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 08-24-2004, 01:58 PM   #1
acb67
Member
 
Registered: Jun 2002
Posts: 50

Rep: Reputation: 15
How to wipe out all the data on a machine


Hi all. I have a couple of machines running old hardware that I need to decommission. I want to wipe out the entire OS to make sure no data is left before we get rid of the machines. Ideally, I would like the machine to try to boot, and when it does, nothing comes up. Is there an easy way to do this? A format command or something? I thought about just deleting the partitions, but I'm not sure if this will destroy the data as well. Couldn't someone use a boot disk to then find the data?

Any help is much appreciated. Thanks!
 
Old 08-24-2004, 02:05 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
well in Linux-like systems there is a command called shred, that overwrites data with the options you give to it...X many times and so on, before deleting ("freeing the memory place") it. it takes time/processor time, but is somehow more secure than normal deleting/removing partitions..I guess. but it won't work on journalled filesystems, or so I've heard (never used myself, though).
 
Old 08-24-2004, 02:10 PM   #3
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Take a look at << http://dban.sourceforge.net/ >>.

I've not tried it myself, but I've heard it works.
 
Old 08-24-2004, 02:14 PM   #4
acb67
Member
 
Registered: Jun 2002
Posts: 50

Original Poster
Rep: Reputation: 15
hmm interesting. well we do use reiser, so the shred command will not work. as for dban, some of the machines are remote, and therefore cannot get to them with a boot disk. thanks anyway.

am i making this too complicated? will deleting the partitions securely delete the data as well? cfdisk, fdisk, etc...?
 
Old 08-24-2004, 03:16 PM   #5
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Quote:
am i making this too complicated? will deleting the partitions securely delete the data as well? cfdisk, fdisk, etc...?
No. It doesn't take too much to recover a deleted partition.

Quote:
hmm interesting. well we do use reiser, so the shred command will not work. as for dban, some of the machines are remote, and therefore cannot get to them with a boot disk.
DBAN will wipe journalled filesystems...
Code:
    *  DBAN supports all Microsoft platforms and securely destroys FAT, VFAT, and NTFS filesytems.
          o MS-DOS, Windows 3.1
          o Windows 95, Windows 98, Windows ME
          o Windows NT 3.0, Windows NT 3.1, Windows NT 3.5, Windows NT 4.0
          o Windows 2000, Windows XP
    * DBAN supports all unix platforms and securely destroys ReiserFS, EXT, and UFS filesystems.
          o FreeBSD, NetBSD, OpenBSD
          o Linux
          o BeOS
          o QNX
I'm sure it wouldn't be too hard to make a DBAN disk and see what program it uses. You might even be able to distribute it to the remote computers and run it.
 
Old 08-24-2004, 03:40 PM   #6
acb67
Member
 
Registered: Jun 2002
Posts: 50

Original Poster
Rep: Reputation: 15
ok, will try to look into that. thanks for the advice.

what about mke2fs or mkfs or something? doesn't that format the drive?
 
Old 08-24-2004, 03:49 PM   #7
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
If you are planning on getting rid of the hardware, it's best to use something like DBAN which will overwrite the filesystems. Deleting the partition table and creating new filesystems just remove all of the pointers to the old data. The data is still on the disk. There's just no mountable filesystem and directory tree to get you to the data quickly. If you don't completely destroy the data, you might wind up the subject of one of those "we bought drive off Ebay and look what we found" articles.

If the systems are remote, make some floppies and mail them out to the people who do have physical access. You can talk them through it over them phone.
 
Old 08-24-2004, 08:19 PM   #8
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
I would suggest taking a look at section 18.5.2 of the Rute guide here which describes how you can use the dd command to write random characters to fill the entire disk.

I'd suggest considering using cfdisk to drop all the existing partitions on the drive, then recreate a single partition occupying the entire disk, then running something along the lines of
Code:
dd if=/dev/urandom of=/dev/hda1 bs=1024 count=xxxxx
where xxxxx is whatever number necessary to fill your disk (and of course "hda1" is the appropriate value). See the man pages of dd for more info. Unless you have some pretty extreme security concerns, I would think that probably would be sufficient. Naturally, the other suggestions already listed are worthwhile. -- J.W.
 
Old 08-24-2004, 08:36 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That's easy, and fast, but unreliable ...

http://freshmeat.net/projects/securedelete/


That's the way to go ;)


Cheers,
Tink (putting on his tin-foil hat)
 
Old 08-24-2004, 10:50 PM   #10
dawizman
Member
 
Registered: Feb 2004
Distribution: Gentoo
Posts: 119

Rep: Reputation: 15
If the hardware is not going to be re-used, have you considered taking a drill bit and putting a few holes through the platters?
 
Old 08-25-2004, 02:54 AM   #11
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
I think we all agree in principle, but probably disagree on the level of paranoia that is appropriate given the described scenario. I'm assuming that the data in question is considered "company confidential" rather than something more serious/important, and most likely as long as steps were taken to delete and then overwrite the full disk with dummy bits, I think you'd be covered. If the data in question is more critical, and any "leakage" would create major problems, then physical destruction of the disk, such as the suggested of drilling holes into the disks, or other point-of-no-return decisions such as using bolt cutters to clip the disks into pieces, etc, may be appropriate.

Realistically though, I'd say the next owner of a second-hand PC is probably unlikely to have either the technical savvy, resources, or desire to try to recover old data which has been overwritten from a used computer, and they're just looking for an extra machine at a decent price. As long as you take steps to wipe the data from the disk and possibly even install something like Windows 95 or 98 onto it as a red herring, you're doing the right thing, and are doing more than most people. Naturally, if the data on your disks is such that any kind of recovery by an outside party would or could create a major problem, then you probably do need to destroy them. If not, the previously suggested options to wipe out the data should work out OK Just my 2 cents, others (obviously ) have other views. Definitely clear the data though, just to play it safe. -- J.W.

Last edited by J.W.; 08-25-2004 at 07:52 AM.
 
Old 08-25-2004, 07:38 AM   #12
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
Quote:
Originally posted by J.W.

... wipe the data from the disk (and possibly even install something like Windows 95 or 98 onto it as a red herring)...
LOL Excelent suggestion that would make it totally unusable.

If it were me I would do the old 'rm -rf /' and then boot off a knopix CD and use J.W.'s dd command to totally wipe it.
 
Old 08-25-2004, 01:34 PM   #13
acb67
Member
 
Registered: Jun 2002
Posts: 50

Original Poster
Rep: Reputation: 15
thanks for all the help. i initally tried the dd command, but it seemed to take a really long time. i ended up just using the dban. it is simple, works well, and i can just pop it in and walk away. maybe for the remote systems that i need to clean, i will use the dd command since i cannot get a disk to them. either way, it was some pretty cool stuff. thanks!
 
Old 08-25-2004, 01:48 PM   #14
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You might want to consider an alternate strategy for your remote systems if you plan to wipe the entire disk. If you ssh in and start a dd command, things may not work as expected since you'll be overwriting the OS. If you started to wipe filesystems where key binaries and libraries are kept, there's no guarantee that your dd command will finish.
 
Old 08-25-2004, 04:13 PM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Like putting busybox, a few tools and libraries into
a chroot-jail in a RAM-disk? :)


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Free data wipe tools for Unix davholla Linux - General 1 12-21-2004 11:35 AM
Kernel Panic: Resume Machine: Unable to find suspended-data signature ( - mispelled? ToddM Linux - General 1 09-30-2004 10:59 AM
"document contains no data" error when i try to connect to SWAT on local machine squeaky-steve Linux - Networking 2 12-03-2003 08:12 AM
Data transfer from one Linux machine to another with FTP or scp faucon Linux - Newbie 6 09-10-2003 01:37 PM
Reading data from floppy (on Linux) and copying to Windows Machine yrraja Linux - General 1 07-30-2003 08:36 AM

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

All times are GMT -5. The time now is 05:53 AM.

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