Clone whole installation to new (same type) laptop

Hi,

My laptop (Lenovo Ideapad 3 Ryzen 7 16GB 512ssd) is broken, the screen falls apart. So I have bought a new one, just the same, only a faster Ryzen 7).

Is there a way, or does anyone know how to easily copy my whole setup from the old laptop to the new one, installation, files etc…?

I only use Ubuntu, no dual boot, so the partition on the new laptop can be completely overwritten. I have two partitions, one small FAT for startup and then the Ubuntu Ext4 partition.

Any ideas or help would be much appreciated.

Ubuntu Version:
24.04.3 LTS

Desktop Environment (if applicable):
Gnome

I did it on a old laptop using Clonezilla.
You just need:

  • a USB Key to boot clonezilla
  • an external hard drive to store the disk image

Boot Clonezilla (Old laptop) and save the image of the whole disk on the external hard drive. Then boot clonezilla on the new laptop and use it to restore the disk image on the new hard drive.

It’s very easy (just read well the instruction on the screen) and I used clonezilla many times.

If it doesn’t work on the new laptop for any reason, you can always format the drive and install ubuntu normally. So it worth a try

2 Likes

Hi Jupiter,
Thanks!
I’ll try Clonezilla out as soon as my new laptop arrives (should be tomorrow).
Hope it works.
(Normally I would do a new installation, but it takes me too much time to get used to and I have a big project to finish.)

1 Like

You’re welcome. It’s very useful because you have a 1:1 copy of your current disk. You will find your system exactly as it’s now on your old laptop. The only problem is when you restore a partition on a different hard disk size (eg a 256GB SSD on a 512 SSD or viceversa)

I use clonezilla as a backup solution, as well. I copy the whole disk on an image and then restore it if needed. It uses compression so the disk image will be smaller than the original disk.

Let me know if it works! :slight_smile:

Why not do what I do? Just swap the hard drive from the old PC to the new one?

1 Like

@jaime-cruz I would imagine because you’d rather have the newer hard drive than the older one. It’ll last longer, and might be faster or bigger (or both) if it’s a newer model.

FWIW, the Samsung SSD I am using is in its THIRD laptop after over two decades of traveling with me in the saddlebag of my motorcycle. When the laptop dies, I just buy a refurb model of the same type from Egghead and then swap the hard drive into the replacement laptop.

I do take monthly backups using Clonezilla “just in case” but so far, so good.

Hi Jaime-Cruz,
Thanks, but I don’t know how to replace a harddisk in a laptop, in a PC, yes, but I’m not going to open a brand-new laptop :wink:
I’ll try Clonezilla.

1 Like

There is likely a YouTube video showing how to do it for your particular laptop. I discovered for my Thinkpad T-Series it was RIDICULOUSLY simple. One screw to open the hard drive case and just slide the drive out, then in the new laptop, slide out the original drive, slide in your original drive, replace the cover and the screw and you’re done. Took less than three minutes vs. however long it takes to clone your existing drive, and then boot and restore to your new one.

As mentioned above, if you do use clonezilla make sure you use the option to clone the disk so your Ubuntu system partition and the vfat EFI partition are cloned. If you take apart the laptop to install a new drive, you will be responsible if you accidentally damage anything on the laptop or do something like spilling a liquid on it. It varies to some degree based on country of residence/purchase.

1 Like

Note that UEFI systems boot from the UEFI boot menu.

When booting an external drive you manually boot /EFI/Boot/bootx64.efi, by description of the drive. That entry normally is also in the ESP on an installed system and first time you boot cloned drive you will need to manually boot it, just like booting the external drive. The “ubuntu” entry will not be in the UEFI menu for booting.

To add UEFI boot entry into UEFI and make it new default, you just need to reinstall grub. This assumes the mount of the ESP - efi system partition is correct UUID. Otherwise multiple parameters normally required.

sudo grub-install

To see UEFI entries before & after grub install.

efibootmgr

More info

man efibootmgr

IF HP computer, you have to go into UEFI system settings to change boot order and have “ubuntu” as first entry.
If Acer you have to go into UEFI system settings and enable “trust” on unlabeled entry and rename to “ubuntu” or whatever you like.

2 Likes
  1. Possibly, even probably, the cloned Ubuntu system will work in the new computer because it is similar to the old one.

  2. But you mention that there will be a faster Ryzen CPU, and there might also be some other new hardware, for example the wifi chip, that might cause problems. If problems to run the cloned system we might be able to help you, but it will probably be easier to make a fresh installation and then copy the content of the home directory from the old computer to the home directory of the new computer using the tool rsync.

2 Likes

Hi, thanks for letting me know.
I would much prefer to clone my old computer with all settings and tweaks I have applied (and I don’t remember any more how I did them).
So I’m going to give Clonezilla a go. If that not works, I’ll do a fresh install and try to copy as many of my settings, fonts, etc as possible.

1 Like

If you reinstall from scratch, and then copy across your entire home folder, including all of the hidden files and folders, that should copy across all of your settings.

There might be a few stored outside your home folder that I’m not aware of, though — perhaps someone on this thread can correct me if I’m wrong.

1 Like

https://www.youtube.com/watch?v=4Oqx5_BTPFg

Update

Hi everyone,

So I decided on Rescuezilla (a GUI for Clonezilla) and it worked like a charm.

I’m typing this on my new computer, with all my settings, recent files, Firefox history, passwords, fonts etc intact.
Making the image took 3.5 hours (475 GB), restoring it took 3 hours.
I had to turn off secure boot on the new laptop (I think it was needed, I’m not sure, but I did it anyway).
Strange thing, my wifi passwords are not copied. But no problem of course. And Gmail wanted some extra info, wondering why I’m on a new device (because my screen broke on my old laptop, Google, that’s why, you’re welcome.)

So, all’s well that ends well.

Thanks for all the advice.

2 Likes

While booted into Ubuntu you can open a terminal and enter the command: sudo efibootmgr -v and look at the output. If your Ubuntu entry ends with: o\EFI\ubuntu\shimx64.efi, you can have Secure Boot On or Off. If it ends with grubx64.efi, Secure Boot needs to be OFF.

1 Like

Hi Yancek,

Thanks.

I have shimx64.efi, so secure boot can be on or off.

I turned it off because when I booted with the USB stick, it still booted into windows. USB boot was enabled and I choose the USB stick, so I thought maybe the secure boot was the problem.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.