Sadly for some reason the keyboard doesnt work here, but I started into a RockyLinux 9.2 ISO and went to the troubleshooting/rescue mode. There I selected the “Continue” option:
As per some guides and what I saw here I did the follwogin:
The terminal said to run the follwing command to run from the local drive or something, so I did.
→ run chroot /mnt/sysroot
lsblk:
sda
sda1 512M
sda2 2T
sda is my drive on the Server → /dev/sda1 is my boot partition
→ Run comand
grub2-install /dev/sda1
Result:
grub2-install: warning: File system ext2 doesn’t support embedding. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.
grub2-install: error: will not proceed with blocklists.
I have no idea what this means, so I tried
grub2-mkconfig /dev/sda1
Long list of things Im too slow to screenshot for, but at the end it says “Done” and I cant see any error.
Reboot → Back to beginning.
I sill have lots of data on the Server without a Backup so If the solution is a reinstall I still need to get my data off. Can I install openSSH Server for that and backup my data via filezilla/sftp?
PS: I can only post one pciture as a new user, so only the picture in the beginning survived.
I wanted to expand my drive (sda2) but it wasnt possible because of mbr so I used gdisk to convert it to gtp. (NO errors) I restarted and the error was here.
(Sorry forgot to mention that before)
I expected grub to break - i read so much, but I expected for the repair to be easier.
And another update:
I was able to start into grub and have my keyboard work. But while troubleshooting it turns out that I dont have the kernel rpm file on the boot folder…
I also cant download it from ISO apparently because the file system mounts as read-only for some reason.
Currently running a check on the file system and trying to mount ot afterwards specficially with rw permission
( mount -o rw /dev/mapper/hk-root /mnt )
That was (from what I can tell) actually it: Whenever I tried to run the commands for grub2 they seemed to work (mostly) but didnt actualyl affect anything, because the partition was mounted but was read-only.
after a lot of back and forth and having to use lazy unmount (because unmounting didnt work for some reason) and remounting the boot aprtition (sda) with the above command explicitly as rw i was able to finally get the kernel rpm file.
I booted to emergency mode in RockyLinux and after a restart U ended up in grub again. So still a bit to repair but ill report back if I need more help.
Nevermind I still cant boot in normal mode, just in this weird emergency mode but I also cant seem to repair grub from this emergency mode since the grub2-install and grub2-mkconfig commands dont run because the “dev” directory is not mounted…
Except i cant really see a solution there and I have 0 idea what dracut is. But anyway, running the commands
dnf install kernel
dnf reinstall kernel
dont put the neccessary files in /boot directory. That one always just keeps the 2 fodlers grub2 and loader without adding the vmlinuz and initramfs files.
Once you convert a disk to gpt the bios then attempts to boot in UEFI mode as GPT and UEFI are co-dependent. Grub2-install does nothing now because there are no reserved tracks for it.
Here’s a link to a post on fedoraforum that I created documenting the steps to take to convert a msdos disk to GPT
Convert MSDOS Disk to GPT
which I performed on my original Rocky9 install a couple years ago. It should give you and idea of what needs to be done, the how may be more complicated.
Well Im stuck. I can make it boot to the system in emergency mode but not for real and manually recreating the boot partition which seems to be the problem does not work.
So im just gonna backup everything reinstall and reupload.the data…