LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-30-2021, 08:48 AM   #1
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Rep: Reputation: 15
The way to set the /boot/grub/grub.cfg partition


How do we set which of the /boot/grub/grub.cfg partition which will run grub menu ?

Last edited by BudiKusasi; 10-30-2021 at 09:30 AM.
 
Old 10-30-2021, 09:12 AM   #2
ct7567
LQ Newbie
 
Registered: Oct 2020
Distribution: Arch
Posts: 26

Rep: Reputation: Disabled
can you explain more? you mean you have several linuxes and you want to use a grub from a specific one?
 
Old 11-01-2021, 10:50 AM   #3
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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

From your Debian based MX:
Code:
sudo mount /dev/sda1 /boot/efi
sudo apt-get install --reinstall grub-efi
sudo grub-install
sudo update-grub

Last edited by Brains; 11-01-2021 at 10:55 AM.
 
Old 11-02-2021, 11:52 PM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,809
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
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.
 
Old 11-03-2021, 05:56 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] MariaDB-10.2 unable to set max_connections and wait_timeout through etc/my.cnf taru.tarak Linux - Newbie 2 10-09-2021 01:08 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Why is mysql automatically logging me in without .my.cnf or my.cnf sections? alunduil Linux - Server 11 05-19-2010 11:52 AM
mySQL my.cnf (moving default datadir) not working! madfitz Linux - Newbie 4 02-09-2006 07:15 PM
my.cnf doodah Linux - General 2 05-31-2001 09:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration