Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
From the OS you want to have control over grub.cfg, you must reinstall grub efi and reconfigure grub. Then when you boot to the grub menu it will also be the first selection.
Ensure your EFI system partition is mounted, typically in /boot/efi.
In the example below, /dev/sda1 is the system partition, if you have nvme drive it will be something like /dev/nvme0n1p1
If UEFI multi-booting, once you have the distro's Grub you wish to have in control of booting, confirmed by running efibootmgr, adjust the fstabs of the other distros to not mount any ESP partition. Thus configured, the other distros can be expected to not disturb your intended boot process. Of course, for this to work completely satisfactorily, you'll need to include the other distros in the controlling grub.cfg either via os-prober, or via either a /boot/grub[2]/custom.cfg or /etc/grub.d/.*CUSTOM.
Posts 3 and 4 give good information but the initial post was too cryptic and uninformative. A detailed answer to the question in post 2 would have been helpful in getting a more complete answer to the question, clarifying that the systems are UEFI would have been a first major step.
Quote:
How do we set which of the /boot/grub/grub.cfg partition which will run grub menu ?
Explaining the above would be useful as would ALWAYS indicating which of the 500+ Linux distibutions you might be using. They are most certainly not all identical. As pointed out above, IF you have decided and know which OS you want to handle Grub, it's a simple task as explained above on an EFI machine. It's a similar process for a Legacy install and this is something ALL Linux users to need to know where most computers sold currently are UEFI but some are Legacy/CSM. In a case where a windows OS is thrown in there are additional complications.
On Legacy Linux/CSM systems where you are using the MBR rather than EFI, user are told in scenarios such as this that the last Linux install will take over the boot for the particular machine. This is true but ONLY TRUE if the default device for bootloader installation is not changed. On dual/multi booting cases, it often is (or should be but the user isn't familiar with the process and by the time s/he finds out, a world of trouble lies ahead.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.