Jump to content

Clear SSD before cloning


JustinAiken
 Share

6 posts in this topic

Recommended Posts

So I'm working on installing a fresh start with Lion right now to a USB drive... After it's working, I'd like to "reset" my SSD; it's an Intel G2, and I haven't ever had Trim on it before... How do I zero out (or one out) the drive for optimal performance before using CCC to move my Lion installation home?

Link to comment
Share on other sites

What you need to do is an ATA secure erase as outlined in this guide: https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase

 

It's a quick, single ATA command that instead of writing 0's to every drive block, it tells the controller to mark all blocks as empty, which is exactly what you want. (EDIT: Actually I think it is supposed to do both, but I noticed on my Vertex 2, it was too fast to have done that, so I'm guessing it just marked them as empty. Probably the way Sandforce implemented the command. But still it gets the result you want, which is brand new fast SSD.)

 

Download and burn a Gpartd boot cd (http://gparted.sourceforge.net/download.php) and use it to run the hdparm commands from the command line. I tried an Ubuntu live CD but it had trouble recognizing my drives. The other nice thing with Gpartd is that it has a gui tool that pops up that lists your drives so you know right away what to put for /dev/X in the hdparm commands.

 

I used this process to refresh my drives before I clean installed Lion yesterday, and they're benchmarking like new again.

Link to comment
Share on other sites

OS X Disk Utility has option to erase disk securely (Select partition>Erase tab>security options>chose method). Other method is to use Linux shred tool. Like:

shred -vfz -n 100 /dev/hda

where -n X number of passes to use, /dev/hda disk to erase. The tool should be available on any Linux live CD.

Link to comment
Share on other sites

Another easy method that works in OS X is:

 

1. open terminal

2. type 'diskutil list' & hit enter. Get the disk number of the drive you want to erase (ie disk2)

3. type dd if=/dev/zero of=/dev/disk2

4. have a coffee.

5. If you want a more secure erase then type dd if=/dev/urandom of=/dev/disk2

 

You can also use the above in linux just as well. except step 2 becomes 'fdisk -l' and disk2 becomes sdc or w/e on your end

Link to comment
Share on other sites

  • 2 months later...
What you need to do is an ATA secure erase as outlined in this guide: https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase

 

It's a quick, single ATA command that instead of writing 0's to every drive block, it tells the controller to mark all blocks as empty, which is exactly what you want. (EDIT: Actually I think it is supposed to do both, but I noticed on my Vertex 2, it was too fast to have done that, so I'm guessing it just marked them as empty. Probably the way Sandforce implemented the command. But still it gets the result you want, which is brand new fast SSD.)

 

Download and burn a Gpartd boot cd (http://gparted.sourceforge.net/download.php) and use it to run the hdparm commands from the command line. I tried an Ubuntu live CD but it had trouble recognizing my drives. The other nice thing with Gpartd is that it has a gui tool that pops up that lists your drives so you know right away what to put for /dev/X in the hdparm commands.

 

I used this process to refresh my drives before I clean installed Lion yesterday, and they're benchmarking like new again.

I've done this with Gpartd live CD and the erase is realy done quicly but when I use it in OSX again

I have very low speed on writing(140) and reading(350) on my Kingston HyperX SSD 120 GB.

I use a ASMedia 6GB/s PCI-card in PCI-Express 2 slot on a P55-UD6 board.

Any idea what could be wrong?

 

Ed

Link to comment
Share on other sites

 Share

×
×
  • Create New...