3

I would like to know how to proceed in a safe way that is simple and works, booting my system as it was, on a new hard drive. I consider using CloneZilla

Upgraded both RAM and SSD to about the same size of the preceding disk (1Tb)

The SSD has a fresh install of windows 10 on it, the objective is it dual booting on my 19.10 dev Ubuntu setup so that I don't have to reinstall and reconfigure all of my environment again.

2 Answers 2

1

I proceeded this way:

1/ Install a base beta version of 19.10 (or the same version of the system you are willing to clone) on the installed SSD drive, making sure it dual boots correctly.

There are many walthroughs; here is an example.

2/ Proceed with CloneZilla

as of this walkthrough. Download Clonezilla stable ISO or Direct Download clonezilla-live-*.iso

Make a bootable (Live) USB using Startup Disk Creator.

Boot from the created Clonezilla media.

Now you have many options :

  • Create an image of only '/' (saveparts) and clone it to any partition of your other SDD.

  • Create an image of the full disk (savedisk) and clone it to your new SSD

  • Create an image of a partition and clone it to your new SSD

...

(I used the third option) - note: if your SSD is smaller look here.

Be prepared, the CloneZilla lingo is a bit cryptic, but very logically organized, be sure to understand what you do at each step:

As of above, select the option that allows to copy partitions, save it (my 19.10 install has only one partition) to an external USB drive (saving images doesn't erase the contents of the drive, just make sure you have enough free space for a whole partition's image).

3/ Now once your freshly inserted SSD drive is working, proceed with restoring the partition where it belongs:

Be sure to know which target partition you are aiming at for the restoration, use Gparted or Disks to that purpose, write down which partition you are aiming at (your root / partition /dev/sda5 in my case) on your new system, and proceed with rebooting with CloneZilla

Now select the options to restore an image from the USB drive to the target partition on your new system.

4/ Once this is done, you have to reinstall Grub 2.

I personnally use Boot-repair. Make sure you run it from UEFI on your new system.

(I had an issue that I could not install boot-repair from the 19.10 beta live iso for some reason. Tip: I used a Linux Mint Cinnamon iso where it is installed by default, and proceeded fixing grub there).

As a consequence, my 19.10 dev is working as well as of the previous disk.

Note: as this walkthrough is present on many other locations, I only redirect to existing ones, just detailing the steps I followed for a specific Ubuntu solution.

Note: you may have to edit etc/fstabs, but I didn't have to using Boot-repair.

Just in case, if you experience boot issues after SUCCESSFULLY running boot-repair (always check rebooting first) the Ubuntu doc for Boot-repair specifies as follows:

If after using Boot-repair, you experience boot issues, you have to add the following line to the /etc/fstab in order for the future grub-install commands run appropriatedly:

UUID=XXXX-XXXX  /boot/efi       vfat    umask=0077      0       1 

The value XXXX-YYYY is to replace by what will have been returned by the below command, by replacing EFI by the appropriate value (you will know by opening the file for edition):

sudo blkid | grep EFI

If, despite all of your attempts, the repair does not work, the forum is there to help you!

Good luck!

0

If the two drives are on the same machine, I would probably use dd to copy the entire partition. Otherwise, you could use tar to copy the system partition into a tar archive and then transfer it as a single file.

Of course, you will need to create a suitable partition for Linux on the new SSD drive first, which may require re-sizing existing partitions to make space (using gparted).

Whatever you do though, it is highly recommended you back up your data!

2
  • Thank you for the suggestion! dd will run for a very long time, how about adding bs=10M to it? (added from Dmitry Grigoryev' suggestion) - as of the suggested walkthrough on the answer I posted. CloneZilla allows to backup drive/partitions images and is licensed under the GNU General Public License (GPL) version 2.
    – Lurch
    Oct 10, 2019 at 3:41
  • tar would probably be faster, as it won't be copying the entire partition (including empty space), which dd would. tar is also what is typically used to package up base Linux systems for distribution. There are many different options - basically whatever works best for you.
    – Time4Tea
    Oct 10, 2019 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .