On 2024-02-26, eric <eri...@cox.net> wrote:
> On 2/26/24 04:57, gentoo-u...@krasauskas.dev wrote:
>> You could also write a script that keeps all the distros up to date
>> from within whichever one you're currently booted by mounting
>> subvolumes to /mnt or wherever, chrooting in and running the update.
>
> To avoid grub not being able to point to a newly updated kernel on one 
> of the OS's installed, I use a "custom.cfg" file in all my /boot/grub/ 
> directories for each OS where the "linix" and "initrd" point to the 
> symbolic links of the kernel and init files which point to the newly 
> updated files on most major distributions like ubuntu, arch, suse, and 
> debian. The name of the symbolic links stay the same over upgrades. It 
> works great when using UUID to identify the partition that has root and 
> I can always boot into any of the OS's installed no matter which one 
> hijacked the MBR.

Except I generally have multiple kernels installed for each of the
distros, and need to be able to choose which kernel to boot. There are
also various other boot options (e.g. "safe mode") offered by some
distros that I occasionally need to use.

> https://forums.linuxmint.com/viewtopic.php?t=315584

Interesting article, thanks.

After reading up more on UEFI, it looks like that would be even more
work and more mess. So, there seem to be two options:

 1) Stick to the dual-stage chainloading scheme I'm using now (though
    I'll probably switch from DOS to GTP disklabel). That way after
    selecting which parition (distro) to boot, I get all the boot
    options normally offered by that distro's install. Installing a
    distro involves letting it install to MBR and BIOS-boot,
    installing grub manually to the root partition, then restoring MBR
    and BIOS-boot.

 2) Use a single master grub to boot any distro.
 
    I think I'd need to write my own OS-prober. All of the distros I
    care about seem to now be using grub2 now. Instead of looking for
    kernels and initrd images and adding them to the master grub.cfg,
    I would probe for grub.cfg files, and for each one found
    incorporate the entire set of choices in that .cfg file as a
    submenu in the main grub.cfg menu.

    I think that in order to generate the distro's grub.cfg files, I
    still have to allow the distros to install grub to the MBR and
    BIOS-boot (or to a second disk that I don't care about), then
    restoring MRB/BIOS-boot.
    





Reply via email to