Is update-grub the same as grub-mkconfig2 on Fedora?
update-grub is not in Fedora its in Debian, update-grub is built around grub2-mkconfig
No, update-grub and grub2-mkconfig are not the same command on Fedora, nor does update-grub exist in the Fedora ecosystem.
Just for the sake of Informational
The equivalent commands to update GRUB in Fedora are:
-
For BIOS systems:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg -
For UEFI systems:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
No, this is incorrect.
On Fedora UEFI systems, /boot/efi/EFI/fedora/grub.cfg is a small fixed file that redirects to the “real” GRUB config on the /boot partition.
If you overwrite /boot/efi/EFI/fedora/grub.cfg then you’ll cause problems. On recent Fedoras, grub2-mkconfig generally gives you an error though rather than going ahead and doing the damage.
Thank You @pg-tips I have removed that note I had, Jeff @computersavvy and I had a similar conversation a while back and I thought I had updated that information…![]()
Indeed it dose:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
[sudo] password for me:
Running `grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg' will overwrite the GRUB wrapper.
Please run `grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update grub.cfg.
GRUB configuration file was not updated.
Oh thanks! what about grubby?
grubby is preferred for routine changes because it is designed to work with Fedora’s BLS standard. Common grubby operations include:
-
Set default kernel:
sudo grubby --set-default /boot/vmlinuz-$(uname -r) -
Add kernel arguments to all kernels:
sudo grubby --args="parameter" --update-kernel=ALL -
View kernel info:
sudo grubby --info=ALL
that is so nice!.
todo
- Unlearn everything /etc/default/grub and grub2-mkconfig
- readup on grubby
- have The Internet to unlearn everything /etc/default/grub and grub2-mkconfig
The first might be possible (at 60+, why not) The latter is not impossible.
Caution with this approach.
Grubby modifies several files at once so use it with caution. It is intended to modify kernel command line options and does so very nicely.
Some of the files modified include /etc/default/grub, /etc/kernel/cmdline, files in /boot/loader/entries, and potentially others. I have not dug into the code to see if there are other files that may be affected when using grubby though I have personally seen the changes in all the ones I listed.
You will still need to be capable of using grub2-mkconfig for some changes.
Elaborate