[SOLVED] How ro disable GRUB and install GRUB tools ?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
First create a separate GRUB partition, big enough to hold GRUB. Some of the following entries show how to load OS installer images from this same partition, for that you obviously need to make the partition large enough to hold those images as well.
Mount this partition on/mnt/boot and disable GRUB in all OSes and manually install self-compiled latest GRUB with:
grub-install --boot-directory=/mnt/boot /dev/sda
In all the OSes install GRUB tools but disable installing GRUB in bootsector, so you’ll have menu.lst and grub.cfg available for use. Also disable os-prober use by setting:
GRUB_DISABLE_OS_PROBER=true
in /etc/default/grub
Then write a grub.cfg (/mnt/boot/grub/grub.cfg).
Where I do not understand the texts in bold type (disable GRUB in all OSes;install GRUB tools)or better said I don't know how to do it.
I did search around before posting but the only possibly related finding was an article about EndeavourOs grub-tolls package which did not help me.
In the /etc/default/grub file in several of my installed distros I could not find one single reference to disabling GRUB itself.
Can some one tip me out of my ignorance ? Thanks in advance.
Distribution: Ubuntu based stuff for the most part
Posts: 1,177
Rep:
You should be looking at chain-loading syslinux from Grub. Link is a bit old but may help: https://unix.stackexchange.com/quest...linux-cfg-menu
I think the stuff you found is aimed at installing multi-boot Linux on a drive and sharing a /boot partition and grub config among them, so when you update one distro the changes are written to the shared /boot and grub files.
I assume you are booting live distros on the USB and not installing them into their own partitions on it.
Last edited by uteck; 12-21-2022 at 10:38 AM.
Reason: typos
If live booting ISOs from the flash drive then I wonder if it would be easier to use ventoy, which is capable of booting many different OSes for you from the drive where it is installed. https://www.ventoy.net/en/download.html
posted by uteck:
You should be looking at chain-loading syslinux from Grub. Link is a bit old but may help: https://unix.stackexchange.com/quest...linux-cfg-menu
I think the stuff you found is aimed at installing multi-boot Linux on a drive and sharing a /boot partition and grub config among them, so when you update one distro the changes are written to the shared /boot and grub files.
I assume you are booting live distros on the USB and not installing them into their own partitions on it.
Thanks uteck! I have been reading a lot about chainloading Syslinux, and yes I am trying to multiboot from a pen drive, which I have been able to do for a couple years, but now I am trying to include "more difficult" distros.
In all the many texts I searched there was no reference to those two expressions. English is not my native language and perhaps it is just a problem of understanding what would be obvious to native speakers.
posted by computersavvy
If live booting ISOs from the flash drive then I wonder if it would be easier to use ventoy, which is capable of booting many different OSes for you from the drive where it is installed. https://www.ventoy.net/en/download.html
Thanks computersavvy!
I am sure Ventoy is an efficient tool that would make it easier, but my interest is learning more and this kind of difficulty is great for motivating me to search and read.
Besides I am curious if anybody knows what those expressions mean, language is my field of work.
Last edited by fredmyra; 12-21-2022 at 06:03 PM.
Reason: typo
Only one bootloader is needed for a PC that contains only Linux distros or other OSes whose kernels are loadable by a Linux bootloader. If you put a self-built Grub on a filesystem the BIOS can read from, then none of the Linux distros need any bootloader installed.
On UEFI PCs, I use openSUSE Tumbleweed's Grub2-efi in its own /boot/grub2/ and the ESP filesystem. Other distros simply don't have a bootloader installed, or if they do, their fstabs exclude the ESP, which makes their bootloaders functionally sterile, leaving booting to be fully handled by TW's Grub and myself. Symlinks are used for booting all kernels and initrds in TW's /boot/grub2/custom.cfg, which I maintain with little effort due to use of the symlinks. By virtue of /etc/grub.d/06_custom, TW's Grub's auto-generated menu includes my custom.cfg entries at its top.
posted by mrmazda:
Only one bootloader is needed for a PC that contains only Linux distros or other OSes whose kernels are loadable by a Linux bootloader. If you put a self-built Grub on a filesystem the BIOS can read from, then none of the Linux distros need any bootloader installed.
On UEFI PCs, I use openSUSE Tumbleweed's Grub2-efi in its own /boot/grub2/ and the ESP filesystem. Other distros simply don't have a bootloader installed, or if they do, their fstabs exclude the ESP, which makes their bootloaders functionally sterile, leaving booting to be fully handled by TW's Grub and myself. Symlinks are used for booting all kernels and initrds in TW's /boot/grub2/custom.cfg, which I maintain with little effort due to use of the symlinks. By virtue of /etc/grub.d/06_custom, TW's Grub's auto-generated menu includes my custom.cfg entries at its top
This is valuable info, all new to me.
I am still a bit uncomfortable with symlinks and this will probably will be the right motivation to read more about it and trying it out.
If I understand it right I should place symlinks for kernel and initrd for each "secondary" distro in a custom.cfg file. No configfiles involved, right?
Will that also take care of distros booting under syslinux by default ?
I am still a bit uncomfortable with symlinks and this will probably will be the right motivation to read more about it and trying it out.
Some distros create the symlinks, e.g. Debians put them for both current and prior kernels in /, while openSUSE and Mageia put them in /boot/ only for current kernel/initrd. If you want them for prior kernels, before each new kernel addition, simply rename the old ones, e.g. vmlinuz -> vmlinuz-prv, giving you vmlinuz for current and vmlinuz-prv in /boot/, and no need for fussing over convoluted version string management in custom.cfg or anywhere else.
Quote:
If I understand it right I should place symlinks for kernel and initrd for each "secondary" distro in a custom.cfg file.
Only for distros you wish to boot, and for which you didn't install a bootloader, or whose bootloader you don't wish to need. Strictly speaking it's not necessary, as os-prober enabled on your main Grub can find and and have them included in your standalone grub[2].cfg, but only when you run its generator. It won't get automatically run of its own accord according to when the other distros add or remove kernels. Using symlinks and custom.cfg make this of no concern.
Quote:
No configfiles involved, right?
None needed, though for convenience you could keep one/some for chainloading to, such as if you keep installed multiple kernel types, or lots of old kernel versions for bisecting.
Quote:
Will that also take care of distros booting under syslinux by default ?
Kernels are kernels and initrds are initrds. AFAICT, they have no need to care what loads them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.