Pages

Your Ad Here

This Blog is not to read or go through

because, I have never been such a mess


Search the blog instead

Wednesday, May 6, 2009

low level formatting in linux

Source: http://tldp.org/LDP/LGNET/issue37/tag/38.html


dd if=/dev/zero of=/dev/hda
... to wipe out the whole first IDE drive, or
dd if=/dev/zero of=/dev/sda
... to wipe out the whole first SCSI drive.
Actually you could just blow away one sector on these drives using
dd if=/dev/zero of=/dev/sda count=1
It wouldn't make sense to do this to other drives (/dev/hdb, /dev/hdc, /dev/sdb, etc) since their boot sectors aren't referenced as code and you can reformat those drives with normal DOS or Linux commands to re-make your filesystems on them. However, you can issue this command for all of your drives if you like. In fact you should be able to do something like:
for i in a b c d; do
dd if=/dev/zero of=/dev/hd$i
done
... to get four IDE drives or
for i in a b c d e f g ; do
dd if=/dev/zero of=/dev/hd$i
done
... to wipe out all seven disks on a SCSI chain.
(?)

No comments:

Your Ad Here