LinuxQuestions.org
Review your favorite Linux distribution.
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 02-11-2021, 10:59 AM   #1
jan128
Member
 
Registered: Nov 2020
Posts: 201

Rep: Reputation: Disabled
Change correct grub in mutiboot system - all OS Linux


How do I identify / change correct grub file in mutiboot system - all OS Linux?

I do not want to mess with hardware UEFI settings, but like to change few things in my "primary" grub file.
Also I am NOT in a position to start deleting OS from my system and leave only TWO of them in my "primary HDD".
Obviously at present I have multiple grub in multiple OS - planning NOT to keep that setup in future.

Any "quick fix" temporary solution ?

Cheers
 
Old 02-11-2021, 08:06 PM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,342

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by jan128 View Post
How do I identify / change correct grub file in mutiboot system - all OS Linux?

I do not want to mess with hardware UEFI settings, but like to change few things in my "primary" grub file.
Also I am NOT in a position to start deleting OS from my system and leave only TWO of them in my "primary HDD".
Obviously at present I have multiple grub in multiple OS - planning NOT to keep that setup in future.

Any "quick fix" temporary solution ?

Cheers
In any multiboot system you want to decide which os will be your "primary" that you want to boot to by default. That will always be the one you want to do the final grub config on.

If your systems are efi boot then you want all the different OSes to use the same esp partition so that one grub can easily configure all for booting.

These are the basic criteria that you want to follow, and with every OS install or kernel update you may need to boot to the "primary" and update grub so it knows about the newer kernel on the other system

As long as everything shares /boot/efi and has a separate /boot things should not be too difficult.
 
Old 02-11-2021, 09:01 PM   #3
jan128
Member
 
Registered: Nov 2020
Posts: 201

Original Poster
Rep: Reputation: Disabled
I was going to respond but forgot how to access the grub menu file , not the /etc/default/ grub.

so if my primary OS has /dev/sda1 named "EFI System Partition" file mounted /boot/efi and /dev/sda2 OS file do I have to have similar setup (EFI - OS) for every other OS on SAME HDD? I hope not.

My OS mount point are UUID system assigned, so far I have not messed with their mount points.

But the OS on the other HDD should also have "EFI System Partition" file mounted as " /boot/efi"?
Somewhere I have read the "EFI System Partiton " does not have to be first on the drive .

Now as side point - the actual grub menu file , the one I forgot the name, gets updated very regularly when I do "sudo upgrade". Hence I am puzzled why you suggested to update it manually.

To my recollection the "grub configuration" update is not that simple when EFI is in the picture.
I had a discussion about that few months ago , not sure if here or elsewhere. It got pretty convoluted , including grub2.

I not want to change the subject - but in my view only time I should do "sudo update-grub" when I change /etc/default/grub.



Here is the file I was looking for

/boot/grub/grub.cfg

Maybe I should post mine here ? It is little long ...

Last edited by jan128; 02-11-2021 at 09:20 PM.
 
Old 02-11-2021, 09:07 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
But the OS on the other HDD should also have "EFI System Partition" file mounted as " /boot/efi"?
You do understand the EFI partition is one per computer, not one per hard drive or one per operating system?
 
Old 02-11-2021, 10:09 PM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
Quote:
but in my view only time I should do "sudo update-grub" when I change /etc/default/grub.
With mutlibooting, that all depends on how your setup to boot the other distros.
 
Old 02-12-2021, 05:21 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
so if my primary OS has /dev/sda1 named "EFI System Partition" file mounted /boot/efi and /dev/sda2 OS file do I have to have similar setup (EFI - OS) for every other OS on SAME HDD? I hope not.
That's the standard which most system installers will do. It isn't necessary if you know which OS is the primary and which OS therefore uses it's Grub to boot the other OS's. The installer for one of the major Linux distributions will install the EFI files to the EFI partition on the first drive even if it is told to put it on another drive. Having multiple EFI partitions on the same physical hard drive will almost always lead to major problems. It is possible to have an EFI partition on multiple drives and in some circumstances it is useful but, the standard is one EFI partition per computer. And the EFI partition does not need to be the first although it generally is.
 
Old 02-12-2021, 07:46 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
The EFI partition can be taken as firmware extension, user puts there all EFI executables she/he wishes to be present in EFI boot menu. Multiple EFI partitions is just a logical nonsense, and as yancek said, asking for trouble. There is one computer, one firmware, one ESP partition, and, preferably one boot loader. Having multiple Grub's and chainloading them also only adds unnecessary complexity. The task of booloader is really simple, take kernel image and execute it. The whole operation takes a fraction of a second. There is absolutely no need to install 100 MB of software to accomplish this. Call me purist if you wish, but my computer is no place to collect junk, and all that is not needed for my computer to function qualifies as junk, e.g. multiple bootloaders, etc.
 
1 members found this post helpful.
Old 02-12-2021, 10:52 AM   #8
jan128
Member
 
Registered: Nov 2020
Posts: 201

Original Poster
Rep: Reputation: Disabled
Just FYI
I looks as when "grub" configuration , is updated "automatically" the options in /etc/default/grub file are returned to original default. But if I use OS with options to show log while booting I previously optioned as such it does work.
In other words - newly installed OS will NOT have expected options in "grub" file - only original default.

Makes little sense, maybe needs more experimenting.
 
Old 02-12-2021, 12:38 PM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
Two find out what os is controlling grub, at the boot menu, press c for a grub> prompt,
Code:
grub> set
The line that has prefix in it will tell what partition is controlling grub
 
1 members found this post helpful.
Old 02-12-2021, 03:46 PM   #10
jan128
Member
 
Registered: Nov 2020
Posts: 201

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
Two find out what os is controlling grub, at the boot menu, press c for a grub> prompt,
Code:
grub> set
The line that has prefix in it will tell what partition is controlling grub
Thanks, your reply is by far most helpful in ti discussion.

It seems that rest of the troops cannot participate until they present their view why I should not be doing this.

SOLVED
 
Old 02-12-2021, 11:45 PM   #11
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
I have 4 UEFI PCs configured multiboot with 10 or more distros each. Each has only one ESP. I have only one Grub per PC, since all it takes is one. Each of the four Grub menus' heads was built originally from scratch or copied from one of the other PCs, lives in /etc/grub2/custom.cfg, and uses symlinks to each of the latest installed kernels and initrds for booting, which means it infrequently needs any modifications. Due to settings in /etc/grub.d/06_custom, contents of custom.cfg head the entries presented at boot. The subsequent menu entries that grub2-mkconfig generates for /boot/grub2/grub.cfg I infrequently try to or have need to even see; and are generally used when booting a previous kernel is desired. efibootmgr in each shows only 4 entries:
  • 0000-<OS hosting Grub>
  • 0001-UEFI OS
  • 0002-CD/DVD Drive
  • 0003-Hard Drive
 
  


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] mutiboot freeBSD with windows and linux xiongnu *BSD 16 06-22-2015 08:12 AM
How to create mutiboot PXE Server in Linux RHEL 6.0 bishwanath21 Linux - Newbie 2 11-22-2013 07:43 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
mutiboot problem with win server2003 chris_law Linux - Hardware 0 09-25-2003 11:32 PM

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

All times are GMT -5. The time now is 08:57 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