I use a PC with SSD (240GB) and 2 HDDs (2TB and 500GB). I have Ubuntu 22.04.1 and Win10 installed in the SSD, and use the HDD for data.
Recently, after one of the usual Ubuntu updates, Ubuntu stopped working: on start-up, after the grub menu, it remained stuck in the loading screen with the logo, and the spinning icon. It did not continue to the user/password screen.
I created a Ubuntu liveUSB, and chose to replace the current installation of 22.04.1 I had, replacing it with 22.04.1. Installation went ok, until a final pop-up indicated "a grub error" (sorry I cannot be more specific). However, the installation's final message was that installatation had been successful.
After this, on start-up, grub no longer loads, and the PC would enter grub rescue.
I then used the liveUSB session to run boot-repair. Before running the recommended repair, I ran an analysis, the report is: https://paste.ubuntu.com/p/kt7xKPF8DQ/ After running the recommended repair, the report is: https://paste.ubuntu.com/p/y2XQN2hhMJ/
I had ran boot-repair previously for other issues some years ago, and it worked fine. However, this time, running boot-repair did not seem to solve anything, and the PC still loads directly into grub rescue.
Quite out of my depth, I found in several pages which indicated a similar solution for grub rescue, and have followed the instructions. When typing "ls", the only unit which has a known filesystem, is (hd1,msdos6), which has an ext2 filesystem. Since normal.mod file was not in the usual place, I had to look for it. I have found the "normal.mod" file in (hd1,msdos6)/boot/grub/x86_64-efi/
But when I run the sequence:
set root=(hd1,msdos6)
insmod (hd1,msdos6)/boot/grub/x86_64-efi/normal.mod
The usual solution setting a prefix and then "insmod normal" does not find "normal.mod" file, so I use this instruction instead) After the "insmod (hd1,... [etc]", I receive the following error, and I am stuck now:
error: invalid arch-dependent ELF magic.
Gparted screenshots:
SSD, OSs and programs in the SDD. Win10 installed in largest partition, Ubuntu in 40MB partition
HDD1, this is where data is stored
HDD2, this hard drive is not really used for anything
I would like to recover both operating systems, and also make sure the data in HDD1 is not altered. Would really appreciate any help.