3

I just want to ask if is it possible to clone the entire system to a new one? I want to change my SSD to a bigger one, what if I don't want to re-install it? How to make it possible? are there any tools that I could use?

I have balenaEtcher-1.7.3-x64 app, there is an option to clone the drive, is there anyone who has used it before?

Thanks in Advance

  • Yep, plug both drives into the computer, boot to a live CD (boot the installer, and press Try Ubuntu), and use balenaEtcher to clone the drive. Or, use dd. Warning: dd and to some degree, balenaEtcher can destroy all your data if you mess up. So double-check what you do, and have a backup not on that computer of anything important – cocomac Mar 11 '22 at 04:11
  • 1
    If replacing drive, you are ok, but if using both drives, you cannot have duplicate UUIDs when you reboot. https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379 Is drive gpt or MBR(msdos) partitioned? – oldfred Mar 11 '22 at 13:37
  • You could try Clonezilla. It's in the Ubuntu repos, and more info is at https://clonezilla.org/ – heynnema Mar 11 '22 at 15:19
  • Thanks @cocomac I will consider your answers – JanuriDP Jul 27 '22 at 00:31
  • @oldfred I think gpt, because I'm not used any Windows for my room – JanuriDP Jul 27 '22 at 00:35
  • Thanks @heynnema I will consider your answers – JanuriDP Jul 27 '22 at 00:35

4 Answers4

3

I've not used balenaEtcher; dd is effective for cloning a drive if used carefully and it's installed by default. There are also other cloning tools that you'd need to install.

I have cloned a HDD to an SSD so I could upgrade to SSD - but both were the same size.

I used dd ... as countless people have warned, dd is a very effective way to destroy your disk / data so do be very careful - in particular with the i and o.

If your current drive is /dev/sda and your new ssd is /dev/sdb, the syntax is:

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

A few things to say though -

(1) Back up all important data to an external drive first

(2) you should unmount the source drive before doing this to ensure the clone is not corrupted by data changes during the process. That means you'll need to use a live USB session.

(3) If you are going to do this, to be absolutely certain you have the correct source and destination, I'd suggest boot up the system with just one drive in and note its details; then add the second drive so you know which is which.

(4) Double check the syntax before hitting enter!

(5) Do note that if your new drive is larger, dd (and other cloning tools) will create an exact copy of your current drive's structure, and leave the remaining space unallocated - so your drive will not appear any larger and the extra space will be unusable. You will then have to expand your partition into the unallocated space (using GParted from a live USB). Having never cloned from a drive to a larger drive, I don't know how the system will handle this situation - if anyone has done it please add to comments or edit my answer. (As per oldfred's comment) - If using GPT, you'll need to move the backup partition table to the end of the drive using gdisk (see http://www.rodsbooks.com/gdisk/repairing.html & Fixing corrupt backup GPT table?) .

Because of point (5), and that you'll need to create an installation USB anyway, do consider backing up your data and performing a fresh install on your larger drive, then copying your files back over. Often a clean install is a better option.

Will
  • 2,292
  • 2
    If gpt partitioned, you need to move the backup partition table to the end of the drive using gdisk. http://www.rodsbooks.com/gdisk/repairing.html & https://askubuntu.com/questions/386752/fixing-corrupt-backup-gpt-table/386802#386802 – oldfred Mar 11 '22 at 13:40
  • thanks @oldred - added that to my answer. – Will Mar 11 '22 at 14:20
0

I normally use GParted Live (but you'll need a USB drive): https://www.addictivetips.com/ubuntu-linux-tips/clone-a-linux-hard-drive-with-gparted/

Jonny Soe
  • 101
0

Just use Clonezilla.

Follow instructions to create a live usb. Plug in both drives and boot with the usb. Follow the prompts.

Humpity
  • 180
  • 10
0

You have a few solutions:

  • dd
  • Partimage
  • Clonezilla
  • Partclone
  • If you are using Samsung SSD it comes with Samsung Magician
phi3nix
  • 26