Change correct grub in mutiboot system - all OS Linux
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.
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.
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.
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 ...
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.
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.
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.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.