From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 68391158041 for ; Thu, 22 Feb 2024 19:18:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2AC4E2A67; Thu, 22 Feb 2024 19:18:01 +0000 (UTC) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 76249E2A5F for ; Thu, 22 Feb 2024 19:18:01 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rdEZz-0008P9-HX for gentoo-user@lists.gentoo.org; Thu, 22 Feb 2024 20:17:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] How to set up drive with many Linux distros? Date: Thu, 22 Feb 2024 19:17:52 -0000 (UTC) Message-ID: User-Agent: slrn/1.0.3 (Linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d60a8b46-326f-4bdc-b200-92c2805c215a X-Archives-Hash: 6f5f7cd5b20a04a7e8b586a44a5bcead For many years, I've used a hard drive on which I have 8-10 Linux distros installed -- each in a separate (single) partition. There is also a single swap partition (used by all of the different Linux installations). There is also a small partition devoted only to the "master" instance of Grub that lives in the MBR and the space between the MBR and the first partition (the drive uses a DOS disklabel). That master instance of Grub has a menu which contains entries which "chainload" each of the other partitions. For many years, this worked great. All of the various distro installers offered the option of installing the bootloader in the MBR (e.g. /dev/sda) or in a partition (e.g /dev/sdaN). I would tell the installer to install the bootloader in the root partition, and everything "just worked". However, the choice to install bootloaders in partitions instead of the MBR has been removed from most (all?) of the common installers. This forces me to jump through hoops when installing a new Linux distro: 1. Back up the MBR and gap between the MBR and the first partition. 2. Let the installer install it's bootloader (seems it's always grub these days) in the MBR. 3. Boot into the newly installed Linux. 4. Manually install grub in the root partition (e.g. /dev/sdaN) using the --force option to tell grub to use blocklists to find it's files. 5. Find those grub files and lock them so they can't be moved. 6. Restore the MBR/gap backup from step 1. It seems like there should be a better way to do this. One might hope that UEFI offers a solution to this problem. Google has found me others asking the same question but no real answers. Is there an easier way to do this? -- Grant