There is a SECRET. GRUB2 is a piece of garbage, and there is a good chance that at some point GRUB2 is going out into the weeds. The SECRET is to be PROACTIVE and NOT REACTIVE. By "PROACTIVE" I mean you should EXPECT that at some point GRUB2 *will* go out into the weeds and you need to prepare NOW for that day.
But far to often people are "REACTIVE" -- they never expect that their GRUB2 will somehow get mangled and then they have to jump through a lot of hoops just to get their machines back up and running.
There is a great little utility called Grub Customizer
(yum Install grub-customizer
) in it there is a "rescue" of sorts but all it really does is to get your machine back up and running but, then it may create a few problems all of its own. But the actual "rescue" is actually quite simple:
How to restore this backup
* make sure you have root permissions (`gksu nautilus` or `sudo -s` on command line) otherwise you won't be able to copy the files
* to fix an unbootable configuration, just copy:
* '/etc/grub.d/backup/boot_grub' to '/boot/grub2'
* to reset the whole configuration (if it cannot be fixed by using grub customizer), also copy these files:
* '/etc/grub.d/backup/etc_grub_d' to '/etc/grub.d'
* '/etc/grub.d/backup/default_grub' to '/etc/default/grub'
You need to BACKUP *3*
Use file browser and/or the CLI and first create some sort of backup file directory (I created mine in /home/dcat/computers/grub_backup
). Now go to /boot/grub2
and copy the entire directory to your backup file. Do the same for /etc/default/grub
, and for /etc/grub.d
Now you ready should GRUB2 go out into the weeds -- simply erase all 3 files and directories and copy your backup files in their respective places, run the command grub2-mkconfig -o /boot/grub2/grub.cfg
then re-boot the machine.
As an aside the directory that most frequently gets mangled is /etc/grub.d
followed by /boot/grub2
which contains the all powerful grub.cfg
By being a bit Proactive you will be ready for the day that Grub2 suddenly decides to take a walk.