Your boot repair output clearly shows that /dev/sda2 is a separate boot partition but it is not possible to tell if it is used.
The boot repair run from 16.04 shows this entry in the EFI grub.cfg file:
Code:
search.fs_uuid 18570a9f-c96f-4e70-9cce-453a1cef1774 root hd0,gpt4
That is pointing to the grub.cfg file on sda4, the 16.04 grub.cfg file. If you scroll down to the blkid output in that boot repair, you clearly see that is the correct UUID for partition 4 so that means that the EFI partition boots to the grub.cfg on sda4 (16.04) but we don't see that grub.cfg file so don't know which OS it boots to. 20.04 could be the default.
Are you using images from 2 different drives?
The second boot repair which you ran from 20.04 shows the below entry for the EFI file on line 193 which clearly shows a different UUID:
search.fs_uuid 8fb26d47-14fe-41dd-8cf6-62a406e887aa root hd0,gpt4
If you look at the boot repair from 20.04 you can see the blkid for that entry is:
sda4 ext3 8fb26d47-14fe-41dd-8cf6-62a406e887aa
Compare the UUIDs in the 2 boot repair outputs. They are all different.
Have you tried simply copying sda5 to sda4 overwriting 16.04 and then changing the UUID in the EFI/ubuntu/grub.cfg file to the UUID that 20.04 had? Before doing that, you would need to run the blkid command to get the correct UUID for the partition to boot.
This is done from the recovery partition using "partimage -b restore". Only the 5th partition is overwritten. You have an EFI system, that won't work. You need to change the EFI partition, particularly the grub.cfg file there so that it points to the correct partition by UUI, the partition on which the Grub bootloader exists.
Bookmarks