Anaconda installer always replace /etc/default/grub config files

Hi!I tried my custom Fedora image.When I test install on the vm.Anaconda always replace /etc/default/grub config files.Even if I tried edited kickstart,99-grub-mkconfig.install and so on other about grub2 files.Anaconda always replace default’s /etc/default/grub config files.What should I need edit which files?

That file comes from an RPM.

$ rpm -qf /etc/default/grub
grub2-tools-2.12-32.fc42.aarch64

Maybe you are making your changes too soon?

Actually, although the file os owned by grub2-tools, it is not provided by grub2-tools. It is a ghost file.

Try run

rpm -ql grub2-tools |grep /etc/default
rpm -ql --noghost grub2-tools |grep /etc/default

and see the difference.

The file /etc/default/grub is created by anaconda during initial installation and nothing else creates or re-creates it.

The original question was: how to tweak anaconda to create the file in the wanted way?

Nothing Output.

PS /home/march7thfedora/test> rpm -ql grub2-tools |grep /etc/default           
/etc/default/grub
PS /home/march7thfedora/test> rpm -ql --noghost grub2-tools |grep /etc/default
PS /home/march7thfedora/test> 


How does the anaconda installer create the /etc/default/grub file?A command? or anything else?

Simply open the file, write the lines and close the file. The details are at https://github.com/rhinstaller/anaconda/blob/main/pyanaconda/modules/storage/bootloader/grub2.py#L243

defaults.write("GRUB_TERMINAL_OUTPUT=\"%s\"\n" % self.terminal_type)

Can you directly change "%s"\n" to gfxterm?