LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to initialize HDD using Shell script? (https://www.linuxquestions.org/questions/programming-9/how-to-initialize-hdd-using-shell-script-641810/)

meibabe 05-13-2008 02:20 AM

How to initialize HDD using Shell script?
 
Hi I need help in writing a shell script to clear off all the partitions on a IDE hard drive. Can anyone help?
Thanks
gail

Stéphane Ascoët 05-13-2008 04:10 AM

Erase MBR!
 
dd if=/dev/zero of=/dev/devicetoerase bs=512 count=1

harsshal 05-14-2008 05:07 AM

can't we use fdisk on whole device?


All times are GMT -5. The time now is 07:56 AM.