LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-23-2008, 03:18 AM   #1
noir911
Member
 
Registered: Apr 2004
Posts: 682

Rep: Reputation: Disabled
deleting the whole server


I have some servers that I want to rm -rf / to delete everything. But from what I heard, rm -rf / won't delete everything, as in rm will delete itself at some stage. I cannot boot from a Live DVD as these are very old HP-UX, AIX and SUN servers and don't have optical drives. Also, I don't have access to external optical media for them. So what is the best way to delete everything (including hidden files) from a *nix box?

Thanks for any help.
 
Old 07-23-2008, 03:46 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,291

Rep: Reputation: 65
if you dd if=/dev/zero of=/dev/<hard drive device>, that will pretty much wipe the boot record, partition table, and most filesystem information before the machine crashes.
 
Old 07-23-2008, 09:42 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,735

Rep: Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523
Are you sure you want to do that? It only makes sense to do that to data dirs. If you wipe out the OS dirs as well, that's the same as re-installing, which you'll have to do anyway...
Also equiv to initializing the disk.
In any case, the rm will run from RAM, so it'll work...
 
Old 07-23-2008, 09:59 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Take the storage disk out, pull out a power drill, run the drill trough the disk some ten to twenty times at random locations troughout the surface below which the storage media is (no need to wreck up the mechanical parts, just kill the magnetic plates or whatever your disk uses) and you can be sure it's Erased better than Arnold could have done it (they found out in a research that this is a very effective way of making a disk permanently useless)

Seriously, there is no need to delete the operating system files as they aren't probably so vital, at least if they're old. Run rm or some other removal tool over the user data etc. to get rid of them. If you have a floppy drive in it, chances are you find somewhere in the web a tiny Linux that runs off a floppy and includes a removal tool.. Just remember even after you "rm" the data on the disk, it is possible to recover it -- a more secure method is to use something like "shred" to overwrite all the data n times (n being a big enough number), which makes it more difficult or even impossible to recover the old data. And if you don't trust that, there's always the power drill method..
 
Old 07-23-2008, 10:27 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Quote:
Originally Posted by b0uncer View Post
Take the storage disk out, pull out a power drill, run the drill trough the disk some ten to twenty times at random locations troughout the surface below which the storage media is (no need to wreck up the mechanical parts, just kill the magnetic plates or whatever your disk uses) and you can be sure it's Erased better than Arnold could have done it (they found out in a research that this is a very effective way of making a disk permanently useless)
Nope, somewhere and somehow, someone will pull some data from the drive. Better if you melt it or turn it to dust somehow and scatter it across the Atlantic ocean.
 
Old 07-23-2008, 10:58 AM   #6
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
You could always netboot (pxeboot) them with a small image that runs out of ram and wipes the drive.
 
Old 08-01-2008, 02:46 AM   #7
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
no no i really dont see why this should be - when you type "rm" it reads the exe from the disk into memory and then runs it - if subsequently it deletes the "rm" file, what's in memory shouldn't stop working...?
 
Old 08-01-2008, 05:17 AM   #8
vladmihaisima
Member
 
Registered: Oct 2002
Location: Delft, Netherlands
Distribution: Gentoo
Posts: 196

Rep: Reputation: 33
What is the purpose of the deletion ? If you want to reinstall, then delete the partion table and reinstall. If you want to make sure the data can't be read, you should do anyhow more than a rm.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting version from Subversion Server drpaudel Linux - Newbie 2 07-07-2008 02:58 PM
Deleting Duplicate files on server adamsjw2 Linux - Server 1 03-07-2007 03:09 PM
Yum / RPM problem deleting mysql-server mperkel Fedora 7 11-14-2006 09:45 PM
Deleting mail on the server joji_in_changwon Programming 3 06-15-2005 07:00 PM
X server deleting system files bkersey Linux - Software 3 11-02-2003 09:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration