0

Background: I have a Dell Laptop with Ubuntu (VERSION="20.04.3 LTS (Focal Fossa)"). This laptop has a 1TB hard drive. Now I am looking to upgrade the laptop to a 2TB hard drive (SSD).

Problem: Once I install the new drive and install Ubuntu, I would lose the environment, such as browswer cookies etc..

Question: How can I restore the entire contents of the current hard drive to the new drive?. End state: Once I finish the upgrade, I want the new drive to be complete replica of the old drive.

  • Then you can clone it with Clonezilla, and after that remove the original drive before rebooting. When you know that it works, you can switch it off again, and from another drive (for example the Ubuntu install drive) run gparted and expand the partition(s) of Ubuntu (or optionally create a new 'data' partition and add a line for it in /etc/fstab to mount it). – sudodus Oct 06 '21 at 13:34
  • https://askubuntu.com/a/1367529/1460940 Does this solve your problem? Look at answer instead of question. – Error404 Oct 06 '21 at 13:35

1 Answers1

4

IF possible add the 2nd one to the 2nd connector of the notebook if you have. That would make it a lot quicker to do.

IF that is not possible you could add both to a desktop and do it from there.

Otherwise get an external casing (usb 3 connector at least because it will take some time), add the 2Tb to the casing. Then Attach the 2 Tb to the laptop

With those 2 disks available ...

diskdump the 1 Tb onto the 2Tb from a LIVE session to avoid changes to the active disk. After that switch the disks and use gparted to format and merge the 2nd Tb onto the 1st one.

Problem: Once I install the new drive and install Ubuntu, I would lose the environment, such as browswer cookies etc..

I would approach this in another way though that is more in line with a new install. You do THAT more often than replace a hard drive. And that method is repeatable with the use of a couple of scripts. Far quicker and more robust.

Install the new disk, install from fresh Ubuntu 20.04 or 21.04 (next lts) and then copy personal data over from the 1Tb (put that one in a case) to the 2Tb. Those browser cookies are not that interesting but you could copy them over from the 1Tb if needed. It is such a small file you could store it on google drive. That method is also possible with a lot of other settings.

Rinzwind
  • 299,756
  • 1
    diskdump is my goto for this task, however I have had issues doing this while the disk is mounted. I always do it from another OS or a Live disk. You can also put both disks in a desktop to do the job if an external drive is not available for the laptop. – rtaft Oct 06 '21 at 13:54