public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: How to set up drive with many Linux distros?
Date: Mon, 26 Feb 2024 18:01:05 -0000 (UTC)	[thread overview]
Message-ID: <urijl1$khi$1@ciao.gmane.io> (raw)
In-Reply-To: 6d739ab9-b9f5-4646-a832-82b9b847c5ae@cox.net

On 2024-02-26, eric <eriic1@cox.net> wrote:
> On 2/26/24 04:57, gentoo-user@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	other threads:[~2024-02-26 18:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 19:17 [gentoo-user] How to set up drive with many Linux distros? Grant Edwards
2024-02-22 21:25 ` Wol
2024-02-22 21:45   ` [gentoo-user] " Grant Edwards
2024-02-22 22:58     ` Wol
2024-02-23  0:28       ` Grant Edwards
2024-02-23  6:16         ` Wojciech Kuzyszyn
2024-02-23 15:49           ` Grant Edwards
2024-02-23 12:06         ` Michael
2024-02-23 16:04           ` Grant Edwards
2024-02-23 17:05         ` Wols Lists
2024-02-23 18:58           ` Grant Edwards
2024-02-23 19:11             ` Mark Knecht
2024-02-23 19:51               ` Grant Edwards
2024-02-23 20:03                 ` Mark Knecht
2024-02-23 21:14                   ` Grant Edwards
2024-02-26 11:57 ` [gentoo-user] " gentoo-user
2024-02-26 17:10   ` eric
2024-02-26 18:01     ` Grant Edwards [this message]
2024-02-26 18:12       ` [gentoo-user] " eric
2024-02-26 20:51         ` Grant Edwards
2024-02-26 21:44           ` Wol
2024-02-26 23:44             ` Grant Edwards
2024-02-27  0:12               ` Mark Knecht
2024-02-27 11:40                 ` Peter Humphrey
2024-03-08 23:24 ` Grant Edwards
2024-03-10 12:58   ` Michael
2024-03-10 18:35     ` Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='urijl1$khi$1@ciao.gmane.io' \
    --to=grant.b.edwards@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox