LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to format Linux Box in single command? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-format-linux-box-in-single-command-712422/)

your_shadow03 03-18-2009 03:19 AM

How to format Linux Box in single command?
 
I want to submit the rental machines back to Vendor.
So I need to format in no time to 8 machines.
RHEL AS 4 Update 6 is installed on those Boxes.
How can I format them in single shot?

your_shadow03 03-18-2009 03:25 AM

I heard about shred command but how to use it for completely cleaning the hard disk.
I dont want vendor to recover the essential corporate data.

arckane 03-18-2009 04:18 AM

Grab UltimateBootCD and then use the Hard Disk tools. Plenty on there including one that'll do a DOD level wipe.

syg00 03-18-2009 04:26 AM

Quote:

Originally Posted by your_shadow03 (Post 3479070)
So I need to format in no time to 8 machines.

Ain't gunna happen - will take (quite) a while.

your_shadow03 03-18-2009 04:38 AM

No issue regarding the time factor..But Server should be completely wipe out.
.Why shred not recommended?

farslayer 03-18-2009 08:05 AM

I use dban to wipe machines.. depending on the drive size it's not a quick process though.

http://www.dban.org/

pixellany 03-18-2009 08:15 AM

"shred" operates on files (and--I assume--complete directories) "man shred" for details.

For secure erasing of a disk, you need to wipe everything---not just specific files. If you don't want to use something like DBAN, then you can do it manually with dd**. Regardless of the method, it takes time.....

**"Secure wiping" is nothing more than multiple passes using combination of random data, zeros, etc. I'm no expert, but it's hard to imagine anyone easily recovering data after 2 passes: random, then all zeros.

openSauce 03-18-2009 08:50 AM

shred can also do disks or partitions, just do
Code:

shred /dev/sda
It's very slow though! But presumably so is any other method.

pixellany 03-18-2009 08:58 AM

OK---so I should follow my own advice and actually read the man page? Nah, it's easier to just type a dd command.........;)

SlowCoder 03-18-2009 11:45 AM

Quote:

Originally Posted by pixellany (Post 3479297)
I'm no expert

Yes you are. ;)

SlowCoder 03-18-2009 11:48 AM

Software like DBAN wipes your drive(s) at the bit level. Not just files or directories. It wipes out EVERYTHING. Boot sector. FAT. Etc. If there is a faster way to kill all the bits on your drives, please let us know. Start it on your computers and let it run overnight.

your_shadow03 03-18-2009 11:56 PM

I appreciate all comments.
LAstly I thing I should try using DBAN.
Just for the knowledge what is the complete to wipe hard disk through dd.

openSauce 03-19-2009 04:11 AM

Quote:

Originally Posted by your_shadow03 (Post 3480213)
Just for the knowledge what is the complete to wipe hard disk through dd.

Code:

dd if=/dev/zero of=[device]
Where device can be /dev/sda, /dev/hda, etc. If you think overwriting with random data is more secure than zeroing, you can do

Code:

dd if=/dev/urandom of=[device]
You might be able to speed it up by adding the parameter bs=1G (read/write 1GiB blocks at a time), I'm not sure. The command shred [device] effectively does many of the above random overwrites, followed optionally by an overwrite with zeroes. This may be overkill though from what I've heard elsewhere.

Don't really see the need for DBAN et al when dd is so simple and comes with every linux distro, but maybe the others have some advantages I don't know about.

your_shadow03 03-19-2009 07:28 AM

You mean I need to start wiping out with:
Code:

dd if=/dev/zero of=[device]
First of=/dev/hda5
then of=/dev/hda4
then of=/dev/hda3
and so on..

openSauce 03-19-2009 08:57 AM

That would wipe the partitions individually if you want to do that (not the MBR or partition table though), or you can just do the entire drive with of=/dev/hda (no numerical suffix).


All times are GMT -5. The time now is 04:47 PM.