<html><body><div style="font-family: Arial; font-size: 12pt; color: #000000"><div>NICE!!!&nbsp; *Very* cool topic, Dave!!&nbsp; (Even if it *does* have '*REALLY* bad idea for jr. admins!!!' written all over it...)&nbsp; ;-)<br></div><div><br></div><div>T.<br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"David L. Willson" &lt;DLWillson@TheGeek.NU&gt;<br><b>To: </b>"list, CLUE" &lt;clue@cluedenver.org&gt;<br><b>Sent: </b>Tuesday, July 29, 2014 12:51:28 PM<br><b>Subject: </b>[clue] Whack-a-disk<br><div><br></div>How can I quickly and simply wipe and re-partition a disk from a script? <br><div><br></div>Here's a proposal, using sdc as the example. <br><div><br></div># Quickly wipe the head of the disk.<br>sudo dd if=/dev/zero of=/dev/sdc bs=16MB count=1 <br><div><br></div># Create a new, basic partition table. Good for up to 2TB. <br>sudo parted /dev/sdc mklabel msdos<br><div><br></div># If you have a disk larger than 2TB, use this instead.<br># sudo parted /dev/sdc mklabel gpt<br><div><br></div># Create a new, cylinder-aligned, primary partition, the full size of the disk <br>sudo parted --align cylinder /dev/sdc mkpart primary 0% 100% <br><div><br></div>The most interesting part might be that last line. I found many posts by people looking for a way to create a partition using parted non-interactively that is the full size of the disk and "properly aligned for best performance", but I didn't find anyone giving the answer. So... So that.<br><div><br></div>--<br>David L. Willson<br>Teacher, Engineer, Evangelist<br>RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 UbuntuCP NovellCLA<br>Mobile 720-333-LANS(5267)<br>http://sofree.us<br><div><br></div>This is a good time for a r3VOLution.<br>_______________________________________________<br>clue mailing list: clue@cluedenver.org<br>For information, account preferences, or to unsubscribe see:<br>http://cluedenver.org/mailman/listinfo/clue<br></div><div><br></div></div></body></html>