0

I have a Ubuntu box which is currently running on an old 500GB HDD.

As I got hold of a 240GB SSD and the HDD was only used partially (10% used) I decided to clone the HDD to the SSD.

Since the HDD is larger then the SSD, I defragmented it and resized its data partition to a size under 240GB. After this the system is still working and boots up as usual.

Here is the new HDD geometry as reported by gparted.

Since the SSD was on a 100% Windows machine it had a MBR partition table which I replaced with a gpt partition table. I then created two partitions of the same size as the ones present in the HDD.

Here is the SDD geometry as reported by gparted.

I then started the PC using another Ubuntu bootable USB and issued these two dd commands:

sudo dd if=/dev/sda1 of=/dev/sdd1 status=progress
sudo dd if=/dev/sda2 of=/dev/sdd2 status=progress

All went fine without errors but at the end of it the PC refuses to boot from the SDD.

Partition /dev/sdd2 seems to have been correctly cloned since I can mount it when I either boot from /dev/sda or from the bootable USB. But I notice that the used space in /dev/sda2 is larger then the used space in /dev/sdd2. I suspect this is due to any temporary files and devices resulting from booting from it.

I tried to boot from the SSD without any other disks connected but all I get is that when the PC is booting it goes straight into the BIOS/EFI menu.

Any idea why my SSD refuses to start?

Fabricio
  • 101

2 Answers2

1

I recently faced an Ubuntu no boot issue after cloning my dual boot (Windows 10 + Ubuntu 20.04) from my HDD to a new M.2 NVMe SSD. Windows was booting fine but Ubuntu was just showing the Grub shell.

As recommended here and in some other forums too I used the Ubuntu Boot-Info tool which showed the issue was, during cloning GRUB was installed in partition1 instead of partition7 where my Ubuntu installation was. So I used Ubuntu Boot-Repair tool which reinstalled GRUB in the correct partition and voila! My Ubuntu was back in business and Grub loaded working as before

Boot-Info :

Boot-Repair screenshot

0

Copying individual partitions was necessary to clone the original disk since the target disk was smaller than the original one. However following a couple of comments I eventually realized that copying individual partitions wouldn't copy the boot record.

To resolve this issue I eventually used the application Boot-Repair (help.ubuntu.com/community/Boot-Repair)

Fabricio
  • 101