[ale] How do I fill a new hard drive with random data to burn it in?

Watson, Keith krwatson at cc.gatech.edu
Mon Dec 31 09:44:34 EST 2012


nwipe is the program used by dban. You can install it under linux and wipe any drive on the system other than the boot drive.

keith

-- 

Keith R. Watson                        Georgia Institute of Technology
IT Support Professional Lead           College of Computing
keith.watson at cc.gatech.edu             801 Atlantic Drive NW
(404) 385-7401                         Atlanta, GA 30332-0280


> -----Original Message-----
> From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Ron
> Frazier (ALE)
> Sent: Sunday, December 30, 2012 22:48
> To: Atlanta Linux Enthusiasts
> Subject: Re: [ale] How do I fill a new hard drive with random data to burn
> it in?
> 
> 
> 
> Hi all,
> 
> I decided to reply to several at once.  I think I've found an even better
> way to do this, which I'll document at the bottom.  See inline comments.
> 
> ------------------------------
> 
> Hi gcs8 (not sure of your name),
> 
> Thanks for the note.  This drive is new and doesn't have any data or
> partitions.  It's not mounted.  I'm pretty sure the Linux commands will
> hit all of it.  I'm not trying to erase it, per se, just give it a
> thorough read / write test.  Based on prior discussions here that revealed
> that drives and OS's don't normally verify after write, I don't think that
> dban would test the drive's ability to read every sector, it would only
> write every sector and assume it was readable, although it's not
> necessarily trying to leave anything in a readable format.
> 
> gcs8 <gcsviii at gmail.com> wrote:
> 
> >I always dban new disks 3 times over, you will not hit the parts of the
> >disk that have the OS or data on it and might miss something. just my
> >.02
> >
> >
> >On Sun, Dec 30, 2012 at 5:46 PM, Ron Frazier (ALE) <
> >atllinuxenthinfo at techstarship.com> wrote:
> >
> >> got it running.
> >>
> >> estimated time till done is 2 days.  dd isn't very fast.
> >>
> >> Ron
> >>
> 
> ------------------------------------------------
> 
> Hi Erik,
> 
> Thanks for the note.  I wanted to use data with 1's and 0's since I think
> it provides a more thorough test of the drive's abilities and gives the
> controller more of a chance to detect surface flaws.  I have used
> ultimatebootcd before.  I think it's very cool.  In this case, I wanted
> something I could do while the OS is running (from a different drive) so I
> can still use the computer for other tasks while the drive test is
> running.
> 
> Erik Mathis <erik at mathists.com> wrote:
> 
> >Its not dd thats slow its urandom, use /dev/zero. I posted a few weeks
> >ago on how to do this. If you really want to burn in a disk use this
> >bootdisk which has loads of extra goodies
> >
> >http://www.ultimatebootcd.com/
> >
> >-Erik-
> >
> 
> ------------------------------------
> 
> Hi Phil,
> 
> Thanks for the note.  I was trying something very similar, except for the
> bs=1M.  It appeared to be working ok, but was very slow.  I haven't had a
> chance to try shred.  I think I've found a better tactic below.
> 
>  Phil Turmel <philip at turmel.org> wrote:
> 
> >bare bones, but works pretty much everywhere:
> >dd if=/dev/urandom of=/dev/sdX bs=1M
> >
> >or if you have shred:
> >
> >shred -n1 /dev/sdX
> >
> 
> --------------------------------------
> 
> So, my objective is to burn in the drive.  I want to write and read and
> verify every sector on the drive several times and give the controller
> plenty of chance to find and map out any weak sectors.  I was doing some
> research on the badblocks command, and I think I can get everything done
> with just that.  I was going to use it anyway after filling the drive with
> random data, but I now think using a different command is superfluous.
> 
> I found this reference from the Arch Linux site, but I think it would work
> the same in Ubuntu.
> 
> https://wiki.archlinux.org/index.php/Badblocks
> 
> I read about the write test in DESTRUCTIVE mode.  Do NOT use this on a
> drive with data you want to keep.  As I understand it, this test
> 
> a) writes the drive with 00000000
> b) reads back and compares
> c) writes the drive with 10101010
> d) reads back and compares
> e) writes the drive with 01010101
> f) reads back and compares
> g) writes the drive with 11111111
> h) reads back and compares
> 
> So, this, apparently, will do everything I want.  It writes to the drive
> several times, and makes sure it can be read back each time.  If you add
> the p parameter, you can have it do the whole sequence several times.  So,
> I set p to 4.  This will write every pattern 4 separate times, and read it
> and compare it 4 separate times.
> 
> Here's the command I'm using.  Again, this is DESTRUCTIVE.
> 
> sudo time badblocks -wsv -p 4 /dev/sdX
> 
> On this 750 GB drive, it looks like each write pass takes about 2 hours
> with each pattern.  Assuming each read pass takes 2 hours as well, each
> complete set of patterns will take 16 hours.  Therefore, 4 complete sets
> will take 64 hours or just under 3 days.
> 
> After that's done, I'm going to run gsmartctl and / or disk utility and
> make sure there are no reallocated sectors or other things showing up in
> red.  Then, I'll clone my other hard drive that's failing onto this one
> and trust the new one with data.
> 
> You should be able to use the following on a drive with data for a NON
> DESTRUCTIVE read / write test.  The w parameter was replaced by n.  This
> is a single pass test, so the p parameter is missing.  You could run this
> command multiple times either manually or with a script.
> 
> sudo time badblocks -nsv  /dev/sdX
> 
> As I understand it, this test
> 
> a) reads original sector data and saves it
> b) writes a random pattern
> c) reads and compares
> d) writes the original data back
> 
> Thanks for the help and advice.
> 
> Sincerely,
> 
> Ron
> 
> 
> 
> 
> --
> 
> Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9
> Mail.
> Please excuse my potential brevity.
> 
> (To whom it may concern.  My email address has changed.  Replying to
> former
> messages prior to 03/31/12 with my personal address will go to the wrong
> address.  Please send all personal correspondence to the new address.)
> 
> (PS - If you email me and don't get a quick response, you might want to
> call on the phone.  I get about 300 emails per day from alternate energy
> mailing lists and such.  I don't always see new email messages very
> quickly.)
> 
> Ron Frazier
> 770-205-9422 (O)   Leave a message.
> linuxdude AT techstarship.com
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo



More information about the Ale mailing list