As quoted by legendary Mr Ratan Tata "I don't believe in taking right decisions, I take decisions and then make them right." will applies in the case when we buy a system with limited budget or the latest technology might get older over time. We usually have laptops and desktop with slow performance and we think that we can 

Why and when to migrate?

We all love our laptop with which we have spent our years, played games, completed dissertation or thesis. Sometimes due to budget we get laptop with lower performance.

  1. We might have bought HDD instead of SSD.
  2. Or our OS is installed in HDD instead of SSD which takes way too longer than 10s.
  3. Old HDD is at risk of getting corrupt or has completed its lifespan.

How to migrate to get better performance?

We recommend to move to SSD from HDD and increase the RAM size for example from 4GB to 8/12/16GB. These will cost around 6000 INR but performance of the system will increase 10X minimum and you will get rid of the lagging experience, the article is reason to spread words as we helped many of our friends and colleagues to stop buying a new laptop but retain the same with new performance. We will explain how to move your OS to new drive without 

How does it work?

With advancement in technology we all can enhance the performance within the 1/6th of the budget of a new laptop with similar performance. With replacement of SSD (> 100 MBps) which has higher read write speed than HDD (~ 50 MBps) we can get 10X performance. We got Windows 10/11 OS booting in ~10s which earlier used to take more than 45 seconds. This can be enhance by adding more RAM. This will enhance the performance of the system that system will work way faster and save us from the frustration.

I am student of Biology and my friends and colleagues face a lot issues when it comes to computer and technology. In this article I am focusing mainly on migrating our OS from older drive to new drive to avoid losing earlier experience. I migrated OS my laptop from 1TB HDD to 240GB SSD and desktop from 240GB SSD to 500GB SSD. You can choose new SSD from online store based on your requirement. A new 500GB SSD (NVME for new laptop or SATA for desktop and older laptops) will cost around 3500 INR and new 8GB RAM (DDR4 for laptop or SO-DIMM DDR4 for laptop) around 3500 INR. Please check the compatibility of your system before buying. 

Following cases can be handled from this article-

  1. Migrating OS from Smaller to Larger or drive of same size
  2. Migrating from Larger to Smaller drive

By drive I mean SATA HDD, SATA SSD or NVME SSD.

The requirements for easy migration

  1. Old drive
  2. New drive
  3. Software to clone/transfer your OS (I am describing GParted here.)
    1. GParted on portable Ubuntu 20 or any other Linux distro you favor
    2. Other similar tool on your preferred OS which can clone drive byte by byte.

Case 1: Migrating OS from Smaller to Larger or drive of same size

Migrating from smaller capacity to larger capacity device is easier. To migrate boot into Linux distro and plug the both drives. Old drive can be kept intact during this process and new drive can be plugging using SATA to USB adapter. From Linux open GParted tool (ensure that both the drives are not mounted.).

Assuming that your old drive is at /dev/sda and new drive is at /dev/sdb (change this as per your requirement). This will copy your whole old drive to new drive (all partitions)

This simple command will copy your older drive to new drive through terminal. (For me it took 30 minutes to copy from 240GB SSD to 500GB SSD)

sudo dd if=/dev/sda of=/dev/sdb bs=1M status=progress

When the copying is completed you can extend your home or root partition using GParted utility.

Case 2: Migrating from Larger to Smaller drive

Migrating OS from smaller capacity to larger capacity is easier however it becomes complex when you want to migrate OS to smaller drive. This happened when I had to replace NVMe with larger capacity. 

First replicate the table/partition information using the following command assuming /dev/sdc is the target drive (https://unix.stackexchange.com/a/574262)-

sgdisk -R=/dev/sdc /dev/nvme0n1

And then copy the sections as per your requirement assuming if=/dev/nvme0n1** are the source-

 

sudo dd if=/dev/nvme0n1p1 of=/dev/sdc1 bs=1M

sudo dd if=/dev/nvme0n1p2 of=/dev/sdc2 bs=1M

sudo dd if=/dev/nvme0n1p3 of=/dev/sdc3 bs=1M

sudo dd if=/dev/nvme0n1p4 of=/dev/sdc4 bs=1M status=progress

sudo dd if=/dev/nvme0n1p5 of=/dev/sdc5 bs=1M

sudo dd if=/dev/nvme0n1p6 of=/dev/sdc6 bs=1M