1

my current Ubuntu 18.04 installation is on an old laptop and I have now bought a new one. I am currently working with the old laptop and am in the middle of a project. I installed a lot of different things, set up different workspaces for python and ROS.

Now I want to start working on my new laptop, but I do not want to invest a lot of time installing everything again and setting everything up again.

What is the best way to move to a new computer?

Gparted Screenshot:

enter image description here

user68186
  • 33,360
Metz
  • 13
  • Welcome! Do you have an external disk? – schrodingerscatcuriosity Mar 03 '20 at 17:58
  • Yes, I do have an external disk. I also have a USB Stick that I can prepare to make bootable – Metz Mar 03 '20 at 18:31
  • 1
    The easiest option would be to literally pop the drive from your old machine into your new one, assuming you haven't installed any proprietary drivers specific to the hardware in your old laptop. – You'reAGitForNotUsingGit Mar 03 '20 at 18:35
  • I have it installed as a dual boot. Does that change anything? I only want the Ubuntu installation, not the windows. – Metz Mar 03 '20 at 18:40
  • 4
    The BEST way is to have 1) Good notes on all your customizations and 2) Complete set of up-to-date data backups. Then you can rebuild from scratch anytime, and need not fear any disaster. It's never too late to begin - right now, when you can make mistakes on a test system, is a perfect time to begin. – user535733 Mar 03 '20 at 18:41
  • I was thinking of doing a clone with Clonezilla. Can you recommend doing that? – Metz Mar 03 '20 at 19:36
  • @Metz I was going to suggest the clonezilla approach. If you want I can answer with a guide, but it'll take some time. – schrodingerscatcuriosity Mar 03 '20 at 19:39
  • Windows is capricious with changes of hardware. It may not work in your new laptop. – schrodingerscatcuriosity Mar 03 '20 at 19:43
  • I am trying to find a good guide online right now but and found this: https://www.tecmint.com/linux-centos-ubuntu-disk-cloning-backup-using-clonezilla/ I am just not sure if it only takes the partition or the whole drive. Further, how to determine in Clonezilla which is the windows and which Ubuntu – Metz Mar 03 '20 at 19:44
  • @guillermochamorro As said I do not want to clone the windows partition. I only want to transfer the Ubuntu partition to the new laptop. So there should be no "changes of hardware" for the windows partition. – Metz Mar 03 '20 at 20:04
  • It's possible with clonezilla, the tricky part is how the disk is partitioned. Could you share a screenshot of the disk made with gparted? – schrodingerscatcuriosity Mar 03 '20 at 20:07
  • @oldfred made some good points in the comments to the "answer". The basic problem seems to be gpt versus mbr and EFI System Partition (ESP). Part of the grub now lives in theESP. So just cloning the /dev/sda7, the Ubuntu system root (/) partition is not enough. – user68186 Mar 03 '20 at 22:12
  • 1
    You could install Ubuntu from live USB on the new PC (that would set up your UEFI partition), then clone sda7 partition from old PC into the / partition on the new PC. Edit fstab, update grub and done. – Organic Marble Mar 03 '20 at 23:24
  • It is easy enough to Rsync your home directory from your old computer to a fresh install on your new computer. I prefer the GUI interface of Grsync myself. All your project data should be in your home directory. Installed programs will need to be reinstalled, this is not usually a big deal. – C.S.Cameron Mar 04 '20 at 03:33
  • Completely agree with @user535733. Install from scratch, copy your home directory, and run two computers for a while, so you can copy any customizations from the old one to the new. Much less error-prone, no lengthy disk operations, no driver problems, and you'll be certain to have a working system in the end. – Jos Mar 04 '20 at 09:20

1 Answers1

1

As suggested in the comments - it is best to install things from scratch and backup only needed files and configurations, as new hardware configurations on a new computer might actually not fully function (such as drivers and overall filesystem and hardware indexing). Same goes for Windows.

But if you still want to give it a try (as it might work even better than expected), there are many ways to accomplish that. I think this thread offers most of the common tools and ways to do so: How to make a disk image and restore from it later?

Pizza
  • 1,428