6

I am setting up my system. The features of it are:

  • GPT partition table (not sure how important this is)
  • Triple boot - Gentoo, Debian and Mint.
  • Custom kernel (kernel git repo) shared amounst distros.

Now I am wanting to write my own lines for grub and not have the distros place their own lines in grub. I also don't really want one distro to have the role of creating the grub.conf file.

As everybody is advocating the scripts, there is no one mentioning about hand crafting one. I am fairly sure editing it by hand is safe, so long as I make sure no script touches it.

Another solution that I might be forced into is to configure every distro the same way (no kernels in menu, keep the custom config synced between distros), or just use one distro to manage the boot.

How should I implement this?

3

If you install it on your own (see here and, for example, here), no distribution's scripts will mess with it.

On the other hand, I found it convenient to let Debian manage my grub.cfg and add other OSes (if they're not found by os-prober) to /etc/grub.d/'s custom file.

  • 2
    Thanks, really helpful. I guess I needed to RTF[ine]M. My answer comes in "...those who feel that it would be easier to write grub.cfg directly are encouraged to do so, and to disable any system provided by their distribution to automatically run grub-mkconfig." – Portablejim Nov 18 '11 at 9:03
0

I use Arch linux and I chose to have one small hand-written /boot/grub/grub.cfg , removing executable bits on grub2 auxiliary scripts just in case.

But AFAIK other distros such as Ubuntu run grub2 config generation scripts automatically e.g. after kernel updates. So if you want to install grub2 using one of the distros' package manager, maybe you should read Gentoo and Debian documentation and see if they support manual config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.