On 12/8/18 7:45 AM, mar77i via arch-general wrote:
For the kernel we run mkinitcpio. So there shouldn't be a real reason why we shouldn't run grub-mkconfig >/${main_grub_dir}/grub.cfg for grub. That being said, the path is /boot/grub.cfg for me, so I'm not sure how we'd get the installfile to figure out where to output its output.
As you have just pointed out, there is no way to possibly know where a user's grub.cfg is, or even whether they have one rather than using some external boot disk, or using the grub package exclusively to modify the grub.efi on some externally mounted system, or or or or.
One key difference is that the output of mkinitcpio are binary files, whereas grub.cfg is a text file, and maybe operators would like to modify that file after it's generated? So one could make a case that the install file should in fact keep its hands off grub.cfg entirely.
Well, yes. In fact, I consider the mere existence of the grub-mkconfig command to be a harsh sin. :p I would fork the grub package and roll my own if it were to erase my lovingly handwritten grub.cfg with some autogenerated nonsense that all too often doesn't even work. I'd also submit an annoyed bug report... ... It boggles my mind that a distribution that prides itself on: - DIY, - KISS, - understanding how things work, and - the avoidance of crutch-like tools meant to abstract into nonexistence the job of maintaining your system still discourages all these things with respect to the grub bootloader. I am in the gradual process of hopefully fixing all this via rewriting the wiki page for grub. My current progress towards this end can be seen at https://wiki.archlinux.org/index.php/User:Eschwartz/Grub#Configuration -- Eli Schwartz Bug Wrangler and Trusted User