2

I was trying to clone the OS + files on my 500GB HDD to a 250GB SSD. To achieve this, I followed the steps in This question. In step 3, I shrunk the partition of my original HDD to 43GB (The smallest possible), which seemed about right since it did not contain vast amounts of data/programs. In step 8, I was told to re-install GRUB. I did this for the original HDD, by following This link.

However, after resizing and copying, nor my original HDD or my new SSD boots up. The original HDD does show the purple Ubuntu loading image, but gives some strange text afterwards (See picture below). The SSD does not boot at all (But I also didn't try to re-install GRUB here).

enter image description here

When I open Gparted from a flash-drive with Ubuntu again, all the partitions seem to be intact. Also, after restarting the HDD many times, I was able to get into some kind of basic linux terminal by pressing ctrl + alt + F2. I was unable to install a repair-bootloader from there, it said I did not have enough space (Probably because I resized my partition to the smallest possible size).

With some basic cd ls and pwd commands I was able to check if my files are intact, and that seems to be the case.

How can I fix the issue, and make ubuntu boot normally again?

Psychotechnopath
  • 663
  • 1
  • 8
  • 18
  • Did you try booting after you shrank the original partition but before you copied it? If you followed all the steps in that answer and backed up your data, it's probably easiest to reinstall the OS. – Organic Marble Jan 14 '20 at 18:07
  • Almost always easier just to do a new install to SSD. Then you still have a working install on HDD for emergencies. You can restore your normal backup to SSD to confirm your backups include everything. And you still have HDD install to recovery anything missing from backups. You cannot have duplicate UUIDs. That will be at least grub and fstab. You can change all UUIDs in one system or other. Manually update fstab with correct/new UUIDs and reinstall grub. Check system for any other UUID references that may be wrong. – oldfred Jan 14 '20 at 18:19
  • @Organic Marble Unfortunately, i do not have a backup insert facepalm here. I'm hoping there exists a way to restore the ubuntu boot-process. – Psychotechnopath Jan 14 '20 at 18:39
  • @oldfred sorry, I'm new to linux (And all the terminology) so I'm not sure if I exactly know what a UUID is and what fstab is. – Psychotechnopath Jan 14 '20 at 18:40
  • I actually just did this (big HDD -> smaller SSD). Since I have my / and /home on different partitions, I cloned the / partition, then I copied the data from /home to a new, smaller /home using rsync. That was a lot easier than dealing with the shrinking partition thing. – Organic Marble Jan 14 '20 at 18:49
  • @OrganicMarble So what you're suggesting is to simply do a clean ubuntu install on my SSD, and copy my / folder to it? Will that retain all my installed programs? – Psychotechnopath Jan 14 '20 at 19:00
  • No, my method only works if you have separate / and /home partitions. – Organic Marble Jan 14 '20 at 19:07
  • 1
    If you have space you can move /home to a separate partition either on HDD if room or if enough space on SSD. To move /home uses rsync- Be sure to use parameters to preserve ownership & permissions https://help.ubuntu.com/community/Partitioning/Home/Moving I keep /home inside my / (root) on SSD but have all data like documents, music etc in a data partition on HDD. That way my user configurations also load from SSD faster. Only data not as often used is on HDD. You do have backups on still another drive other elsewhere? – oldfred Jan 14 '20 at 19:23
  • As @oldfred suggests a clean install of Ubuntu into the SSD may be the best option rather than figure out what went wrong where and fix them. If you followed step 4 and copied the partition to an external hard drive, then you have an extra copy of your /home folder there. Once you install Ubuntu, you can rsync your home folder from the external hard drive to the SSD. – user68186 Jan 14 '20 at 20:27
  • And will that retain all my installed programs? – Psychotechnopath Jan 14 '20 at 20:47
  • @Psychotechnopath no, you will need to install all of them again. I am glad you found a solution. Don't forget to accept your answer as correct by clicking on the gray check box next to the answer and turn it green. – user68186 Jan 14 '20 at 22:48
  • Is there a way to clone my OS without having to worry about these UUID and grub and fstab thingies? On windows it's as simple as downloading AOMEI backupper and pressing apply. Will copying my OS from a HDD to a SSD lead to reduced performance on the SSD? – Psychotechnopath Jan 15 '20 at 17:03

1 Answers1

5

Managed to solve the issue!

Step 1: Boot from flash USB-drive, select option try ubuntu

Step 2: Launch Gparted, expand HDD partition again so that it has more space

Step 3: Launc terminal, sudo apt-add-repository ppa:yannubuntu/boot-repair

Step 4: sudo apt-get update

Step 5: sudo apt-get install -y boot-repair

Step 6: Launch bootrepair, under GRUB options select "purge GRUB before reinstalling it"

Step 7: click apply and reboot, HDD boots again!

Psychotechnopath
  • 663
  • 1
  • 8
  • 18