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 02: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 02: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 03: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 03: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 03:38 AM

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

farslayer 03-18-2009 07: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 07: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 07: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 07: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 10:45 AM

Quote:

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

Yes you are. ;)

SlowCoder 03-18-2009 10: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 10: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 03: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 06: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 07: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).

farslayer 03-19-2009 08:02 AM

the advantage of DBAN is I can boot directly from the CD and at the prompt type autonuke, to do a DOD wipe of ALL drives in the machine. I can take out the CD after that has started, put it in the next PC and repeat the process, while the first one is still wiping. DBAN is lean so it boots faster than most live distros, and it automatically does multiple overwrites with the command I used as an example. There are other command options available. DBAN gives multiple options of HOW you want to overwrite the Drive as well

Sure dd works fine, there is nothing wrong with that method, dban has just been sorta streamlined for the purpose of wiping drives imho. I'm sure both methods take about the same amount of time to complete, depending on the number of overwrites you do to the drive.


Code:

What makes DBAN so popular?

■ It's Free.
■ It's Fast. Rapid deployment in emergency situations.
■ It's Easy. Start the computer with DBAN and press the ENTER key.
■ It's Safe. Irrecoverable data destruction. Prevents most forensic data recovery techniques.

Wipe Methods

■ Quick Erase
■ Canadian RCMP TSSIT OPS-II Standard Wipe
■ American DoD 5220-22.M Standard Wipe
■ Gutmann Wipe
■ PRNG Stream Wipe


Enhancements

■ 8/33/137 gigabyte disk size BIOS limit fix
■ Fast PRNG (Mersenne Twister)
■ Entropy Seeding
■ Verification
■ Logging
■ Hardware Drivers
■ Controllers: XT, IDE, PATA, SATA, SCSI


pixellany 03-19-2009 08:04 AM

And do some tests with different block sizes to see what is fastest---eg
bs=1G count=1
bs=512M count=2
bs=256M count=4
etc.

Each of these copy the same total amount of data, but the speed will change with the block size.


All times are GMT -5. The time now is 11:59 AM.