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: Fri, 23 Feb 2024 16:04:16 -0000 (UTC)	[thread overview]
Message-ID: <uraflv$878$1@ciao.gmane.io> (raw)
In-Reply-To: 2797401.BEx9A2HvPv@rogueboard

On 2024-02-23, Michael <confabulate@kintzios.com> wrote:

> The problem starts if/when kernel images are overwritten by
> successive Linux OS distros.  This is likely when derivatives of the
> same main distros e.g.  Ubuntu all create a directory called
> /EFI/ubuntu/ in the ESP and drop their kernels & initrd images in
> there potentially overwriting other distro's files.

Yes, that's the problem that I've read about when trying to multi-boot
with UEFI.  I usually have 3-4 different Ubuntu installations and 3-4
different RedHat installations. Ubuntu in particular causes a log of
complaints about overwriting ESP files belonging to other Ubuntus.

> When using a distro's installer menu on a legacy BIOS MoBo you can
> select a partition (PBR) to install GRUB,

You used to be able to.  I can no longer find the option to do that in
Ubuntu or RedHat. I've been told that Suse still allows it.

> but GRUB will complain and suggest you could use blocklists but it
> is unreliable.  Last time I received an error like this, I installed
> grub in a PBR manually with the '--force' option, without using the
> installer GUI.  After that, whenever I updated GRUB it complained
> again about blocklists, but it worked fine.

Using --force will work fine as long as the grub 1.5 files don't get
moved afterwards. That's why I lock them in place. Locking them will
cause future upgrades to Grub for that distro to fail, but that
doens't happen very often.  When it does, you unlock them, updated
grub, re-install using --force, and lock them again.

>> I'd welcome pointers to where those advanced options are in the RH
>> and Ubunutu installers -- I've searched everywhere I can think
>> of. Various things Google has found lead me to believe that they no
>> longer support installing grub in a partition.
>
> Try using '--force' to make GRUB install its image in some distro's
> boot/root partition PBR instead of the disk MBR, but you'll probably
> have to perform this outside the installer script.  I've done this
> with VMs.

Yes, in my OP describing what I'm doing now it explains that's what I
do. Then I lock the Grub files that are located using the blocklists
created by the --force option.

>> I guess I'll stick with my current setup.
>> 
>> Or perhaps I'll switch from a DOS disklabel to a GPT disklabel.
>> Instead of backing up and restoring the MBR and the gap, I would
>> backup and restore the MBR and the BIOS boot partition. And I could
>> use UUIDs and partition labels.
>
> These days I use disks with GPT even on MoBos with legacy BIOS.

Same here -- except for this one machine.  I think I'll switch it over
soon.

> Instead of backing up and restoring the MBR/BIOS Boot Partition you
> could just reinstall grub and run grub-mkconfig, as long as the
> latter involves fewer key-presses.  ;-)

I don't use grub-mkconfig for the "main" grub. It has a fixed grub.cfg
file that does nothing but chainload the user-selected partition.

Currently, backing up MBR+gap only happens once when I install/setup
the main grub.  Restoring BMR+gap is one command (which is actually in
a shell script) that's run after any new distro is installed.

MBR+Bios-boot-partition would work pretty much the same way.

--
Grant







  reply	other threads:[~2024-02-23 16:04 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 [this message]
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     ` [gentoo-user] " Grant Edwards
2024-02-26 18:12       ` 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='uraflv$878$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