One of my systems is a dual boot, and after some tinkering, unfortunately, my grub configuration seems to have broken down. I now drop into the grub prompt, and looks like I need to fix my grub.
Are these instructions still correct? The time stamp on the page is from 2012:
Also: Is the workstation live fine for this process?
I could also just reinstall—which would fix it—but I thought I’d take this opportunity to learn a bit more about grub and rescuing it.
4.a. is obsoleted and not necessary for 4.b. Skip it. (Relevant only for LUKS)
4.b. is still correct to open an encrypted device. (Relevant only for LUKS)
5.a. also fine, although I never used mount with -o subvol=root I think (that’s for btrfs), but I can say for sure that the device you will have at /dev/mapper/x will behave equally to any non-encrypted device that would be /dev/sda3 or so. So if -o subvol=root makes sense for btrfs without encryption, it will do so here too.
That said, this part, 5.a. with -o subvol=root makes me wonder: I expect this command is btrfs-specific and was not necessary when we had ext fs, but btrfs became the Fedora default loooong after 2012. Reviewing again, I see there are references to F33 → there was updates after 2012.
I cannot say for sure, that’s now a guess, but I seriously doubt that 4.a. was relevant/necessary at the time of F33, but already obsoleted back then (guess!). So the sections COULD be a mix of different eras.
I have used chroot this way to get journals from (partially-)broken installations in modern Fedora variants (used that at least f42, likely f43). So my expectation is that it would work the same way with dnf. But I have not tested that.
I’d be careful and consider this experimental, but surely a good way to learn. Keep your backups ready though
Maybe someone else has more information before you approach the experiment
Unfortunately, the steps did not lead to a fixed grub. I fell back into the grub prompt after following them. So, in the interests of time, I’m reinstalling (i had my /home partition separated).
I’ll see if I can find time to do a VM or something where I similarly mess up the grub conf to verify if the steps fix it—but I’ll also perhaps e-mail devel to ask if someone with grub knowledge can please review the steps, since they are quite important.