If you cat /boot/grub2/grub.cfg
, you get the big block of text telling you DO NOT MANUALLY EDIT THIS FILE
, indicating that you should instead edit files in /etc/default/
instead and then run grub2-mkconfig
to update the /boot/grub2/grub.cfg
file.
My question is this: why is it emphasized so strongly that one should not edit the grub.cfg file by hand?
My understanding is that changes made will not be persistent across updates and such. This seems annoying, but it doesn't seem to be that big a deal. Am I missing something?
head /boot/grub/grub.cfg
, if you wich to edit grub stuff : edit files inside /etc/grub.d/ – Yunus Feb 05 '16 at 21:30/boot/grub/menu.lst
of GRUB Legacy tried to maintain any manually edited kernel options and other customizations. I think the GRUB authors and distro maintainers realized that this was a fragile hack that would soon break if GRUB configuration syntax grew any more complex... and with GRUB 2, it did. So the new scheme was developed to allow heavier customization without impairing auto-updates. The problem is in teaching the new way to all the people used to the old way. – telcoM May 04 '18 at 12:54