Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
Check this out: 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 2 '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 <return>. 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 2 '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 Answers 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.
share|improve this answer
    
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 <return>. 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 2 '12 at 16:34

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.

share|improve this answer
    
Hi Teppic, do you think my approach was OK for SSDs? If you have writing interests please contact me at biotags. –  biotags Sep 2 '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 2 '12 at 19:36

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.