Surround it with preformatted tags - three backticks on a line above, three below, or just use the </> button above…
like so
For this kind of output though, where it’s a PITA to type it, just post a picture from your phone - not ideal but better than you making a typo or having to type guids!
Bonus points if it’s in focus and your screen is not covered in fingermarks and dust.
Great — seeing etc, usr, and var confirms that you have successfully mounted your installed root filesystem.
The boot directory you see there is the mount point for your separate /boot partition, which is why it currently looks empty or incomplete.
Next, you need to mount your /boot and EFI partitions on top of this structure so that the full installed system becomes accessible from the live environment and we can proceed with the repair.
Great, that means the system layout is now in place.
Next, bind the virtual filesystems and chroot into your installed system so that GRUB can be regenerated from within it:
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /run /mnt/run
chroot /mnt
grub2-mkconfig -o /boot/grub2/grub.cfg
This rebuilds the GRUB configuration based on the currently detected system.
The grub.cfg file was created, but it contains invalid code that GRUB cannot interpret during boot.
This can also happen if fragments of old configurations or incorrect scripts are located in /etc/grub.d/ that grub2-mkconfig copied to the final file.
mount /dev/nvme0n1p3 /mnt
mount /dev/nvme0n1p2 /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot/efi
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /run /mnt/run
chroot /mnt
Here are two screenshots. I ran cat /etc/default/grub both before and after removing the grub file. It seems the grub file did not exist until I ran the grub2-mkconfig command.
There seems a definite error in the GRUB-CMDLINE-LINUX entry. There are 2 resume= entries with different UUIDs. A system can only resume from hibernation using one UUID and it must be the UUID of the physical swap space used for storing the RAM content at time of hibernation.
I believe the < and > characters in the second resume= entry in that file are what grub was complaining about. The structure of the first resume= entry appears correct, but of course only you can tell us which UUID is correct
Are you actually using hibernation? If not then both those entries should be removed. If so then remove the invalid entry there. You will need to repeat the command grub2-mkconfig -o /boot/grub2/grub.cfg after editing the /etc/default/grub file.
I am not sure the below is totally correct
If you are booting using uefi (and it appears you are) then you should also run sudo --bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars as that is also a separate file system and is required to fully activate the chroot environment.
Finally, when running as the user root it is not correct to use sudo for commands since the root user already has full permissions on the system.
To confirm if you are actually running as the root user you can use echo $USER or echo $UID. If the first returns root or the second returns 0 then you are acting as root and should never use sudo.
After recreating the /boot/grub2/grub.cfg file were you able to boot normally?
I had successfully set up hibernation in “Fedora Linux (6.15. ….)”. Hibernation failed after updating to version 6.16, and I haven’t gotten around to trying to fix it. The computer was running OK until updating to 6.18.8, where I started having grub troubles. (Hibernation is important to me.)