3

I want to switch to SSD from HDD. I have dual boot on my hp laptop. My C drive in Windows and Ubuntu / directories have less size than new SSD.

But the whole HDD is of 1 TB and SSD of 240 GB. I am putting my SSD inside laptop using hard disk candy into the CD/DVD slot. And I'm not planning to use the DVD port for DVD again.

How can I clone both systems (only C drive + Ubuntu /) without reinstalling everything if that's possible? I want to use SSD for the operating systems and the old HDD for storage. Noob here. Thanks in advance.

Zanna
  • 69,223
  • 56
  • 216
  • 327
Yogi Katba
  • 345
  • 3
  • 7
  • 16

1 Answers1

0
  • Connect both HDD and SSD to the PC.

  • (optional) Boot Windows installation, install drivers for SSD, shutdown.

  • Boot PC from live cd/usb (Ubuntu will be ok).

  • Open gparted. Resize all partitions to smallest possible size, but leave around 100 mb of free space on each one. And move partitions closer to "left border". Apply this operation.

  • Open terminal. Detect which drive is your HDD and which one is SSD (see cat /proc/partitions)

  • sudo dd if=HDD_DEVICE bs=1M of=SSD_DEVICE - it will take some time

    (for example: sudo dd if=/dev/sda bs=1M of=/dev/nvme0n1)

  • sudo partprobe SSD_DEVICE (for example: /dev/nvme0n1)

  • Probably, you'll need to expand partition table and file systems again, so you can use gparted again.

  • Shutdown. Remove HDD.

  • Try to boot again.

Next:

  • If everything looks ok, you can connect HDD, format it, and use as you wish.
  • OR Change UUIDs of HDD file systems: tune2fs /dev/sda1 -U random /dev/sda1 (probably the same for sdb if you have, etc). But don't do this with your SSD!

This operation is potentially dangerous. Be attentive with device names you're using!

Ihor Drachuk
  • 101
  • 3