SCIENTIFIC-LINUX-USERS Archives

February 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Schanzle <[log in to unmask]>
Reply To:
Chris Schanzle <[log in to unmask]>
Date:
Tue, 10 Feb 2015 22:03:32 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
On 01/29/2015 11:07 AM, Lamar Owen wrote:
> On 01/29/2015 12:32 AM, Yasha Karant wrote:
>> The target hard drive is supposed to have no file system format (just the low level format from the manufacturer) -- not MS Windows, Mac OS X, or any other file system format.  It is supposed to be "brand new raw".
> The way I've always prepped a disk for cloning is to run (booted from a live CD and with no other drives in the system for safety):
> dd if=/dev/zero of=/dev/sdX bs=10240k count=100
> where X is the actual device letter.  This zeroes out the first 1GB of space; you can do more, or less, as long as you zero out the first few tens of MB you should be ok.

[sorry for the late response, just catching up on some old threads, thought this might be helpful.]

I think 8MB is plenty to wipe and less wear on SSD's.

Partition table backups are also held at the end of the disk.  Wipe those too (snippet from my kickstart scripts):

blocks=`blockdev --getsz /dev/$i` # number of 512-byte blocks
mb=$(($blocks / 2 / 1024))
echo "erasing end of drive...blockdev reports $blocks blocks ($mb MB)"
if [ $mb -gt 0 ]; then
    echo erasing last 8MB of drive...
    dd bs=1M if=/dev/zero of=/dev/$i  seek=$(($mb - 8))
else
    echo "MB came back zero or less: $mb  Check math.  Skipping wipe of end of drive."
fi

ATOM RSS1 RSS2