0

How do I replicate a SSD drive and copy the MBR so that that replicated SSD is identical?

biotags
  • 1
  • 1
  • Check this out: http://askubuntu.com/a/106585/9598 – Geppettvs D'Constanzo Aug 28 '12 at 23:23
  • Thanks to Budric , I have been successful! Here's how I did it: – biotags Sep 02 '12 at 16:04
  • I have been successful! Here's how I did it: 1-standard Ubuntu 12.04 install onto copy-to drive, 2- setup 3 HDs on system - boot, source, copy-to; source and copy-to 64 GB SATA SSDs (OCZ). 3- Use System monitor-file systems to see which SSD is the copy-to. 4-SUDO DD /dev/sda1 /dev/sda2 . 5-Wait..checking System monitor-resources-CPU history for loading, when loading drops below 25% its done. 6- shutdown, move SSD drives to new systems, boots as usual but with all setups and installed SW intact. Great! – biotags Sep 02 '12 at 16:12
  • Can you add this as an answer so that we can upvote it for the system to consider it technically 'answered'. – Mahesh Sep 23 '12 at 19:09

3 Answers3

3

I've had success cloning system installed on USB sticks using dd command.

dd if=/dev/sda of=/dev/sdb

Where I'm assuming /dev/sda is your source and /dev/sdb is your destination. It's important not to mess these up or you're overwriting your good disk with 0s.

You'll probably want to run dd from a bootable utility disk. Don't dd a live system, because you may get a corrupt filesystem on the destination disk.

You can identify disks attached using fdisk -l. But this won't tell you which one's source and destination. You'll have to mount them and see which one contains your system files and then proceed to dd it.

Also, when you're cloning whole device, it will likely work when both your device is by same manufacturer and same type. Even though disks say they're 16 GB, some are a few bytes longer, some are shorter. fdisk -l will report size and make sure these are the same. If your source is larger than destination you can try:

  1. gparted to resize source partition
  2. gparted to create partition on destination drive of the same size
  3. dd /dev/sda1 /dev/sdb1 to copy partitions
  4. grub to make /dev/sdb bootable. You'll have to search how to install grub.
Budric
  • 295
  • 2
  • 6
  • 15
  • Here's how I did it: 1-standard Ubuntu 12.04 install onto copy-to drive, 2- setup 3 HDs on system - boot, source, copy-to; source and copy-to 64 GB SATA SSDs (OCZ). 3- Use System monitor-file systems to see which SSD is the copy-to. 4-SUDO DD /dev/sda1 /dev/sda2 . 5-Wait..checking System monitor-resources-CPU history for loading, when loading drops below 25% its done. 6- shutdown, move SSD drives to new systems, boots as usual but with all setups and installed SW intact. Great! – biotags Sep 02 '12 at 16:34
0

Using dd will certainly work, but it's not ideal for SSDs because it will cause all sorts of problems with TRIM and garbage collection, as it will be writing to the entire SSD. A better option is to use something that only copies used parts of the drive -- I think partimage and similar type utilties can do this.

teppic
  • 201
  • 1
  • 9
  • Hi Teppic, do you think my approach was OK for SSDs? If you have writing interests please contact me at biotags. – biotags Sep 02 '12 at 16:34
  • I don't recommend dd for an SSD. It will harm performance, and it's not good for the SSD's life. – teppic Sep 02 '12 at 19:36
0

I've always found that clonezilla, which uses dd is the easiest way to accomplish your task. It is a modified Debian distribution.

apolinsky
  • 210