0

I would like to move my hard drive Ubuntu installation to a new SSD.

The source disk has 5 partitions,

sdc1 - EFI
sdc2 - NTFS
sdc3 - Ubuntu root
sdc4 - Swap
sdc5 - Ubuntu home

I would like to move partition 1, 3, 4 and 5 to the SSD. I can resize them, and they will then fit on the SSD.

I am looking at this answer here,

How can I repair grub? (How to get Ubuntu back after installing Windows?)

It's saying that I can copy a whole drive, then mount it and install grub to fix the boot loader.

Will the same work if I copy separate partitions rather than a whole drive? I don't want to include the NTFS partition.

I think I would be doing something like this on the new SSD, set it up as GPT, copy the four partitions separately, then boot into a ubuntu live installation, mount the new installation, chroot, update-grub.

My questions are, will this work, and do I need to copy over the EFI partition? Does ubuntu add the EFI parition, or would my windows installation have added that?

I had a look at /etc/fstab and I think it has some of the answers,

# / was on /dev/sdd3 during installation
UUID=1e2e2c4b-020b-41c6-b30a-21173388e4a7 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sdc2 during installation
UUID=F03B-8C98  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdd5 during installation
UUID=9941c627-fce7-4a0c-821d-f140f2a7fa43 /home           ext4    defaults        0       2
# swap was on /dev/sdd4 during installation
UUID=c0704a89-c408-4d6d-bd08-a42127dba046 none            swap    sw              0       0

The EFI partition mentioned in there is not the EFI on that drive, it is the EFI partition from a different drive which is my windows 10 drive. Should I copy that one instead or does it not matter?

peter
  • 191

2 Answers2

2

Yes, as suggested by Charles Green, this could have worked, but what's the point.

I did go for a fresh install on the SSD and got everything I needed back up and running in a couple of hours. It has been running very well ever since, good suggestion.

peter
  • 191
0

I just did this.

I booted up using the rescue version of Ubuntu 22.04. (In this case, my rescue version was the Desktop install version). You really don't need a rescue version. But on your boot USB stick, you may be required to install gparted. Boot up using the USB stick. Don't install just try it out.

Open a Terminal. Type sudo su Type apt-get install gparted.

Run gparted. Create a partition. Copy the desired partition to the new partition. Copy then paste.

Reboot into your original Desktop.

Open a Terminal

Switch to the root user. sudo or su Type update-grub.

When it's done, reboot, use the grub boot menu, and choose the new partition.