LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How ro disable GRUB and install GRUB tools ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-ro-disable-grub-and-install-grub-tools-4175720041/)

fredmyra 12-21-2022 09:09 AM

How ro disable GRUB and install GRUB tools ?
 
I am making yet another multiboot usb using GRUB, this time I want to start some isos which are set to start from syslinux and I checked Grubs manual at https://www.gnu.org/software/grub/ma...-manual-config:
Quote:

6.4 Multi-boot manual config

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.

uteck 12-21-2022 10:38 AM

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.

computersavvy 12-21-2022 11:05 AM

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

fredmyra 12-21-2022 05:55 PM

Quote:

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.

fredmyra 12-21-2022 06:03 PM

Quote:

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.

mrmazda 12-23-2022 01:17 AM

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.

fredmyra 12-24-2022 06:39 AM

Quote:

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 ?

Thanks a lot for your support. Much appreciated!

mrmazda 12-24-2022 09:18 AM

Quote:

Originally Posted by fredmyra (Post 6399980)
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.

fredmyra 12-28-2022 05:28 PM

@ mrmazda:
Again, valuable information.
Thanks for taking your time to clarify it all for me.


All times are GMT -5. The time now is 10:56 AM.