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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BD837158041 for ; Mon, 26 Feb 2024 18:07:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 057992BC022; Mon, 26 Feb 2024 18:01:16 +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 A36632BC019 for ; Mon, 26 Feb 2024 18:01:15 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1refHt-0005kN-PR for gentoo-user@lists.gentoo.org; Mon, 26 Feb 2024 19:01:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: How to set up drive with many Linux distros? Date: Mon, 26 Feb 2024 18:01:05 -0000 (UTC) Message-ID: References: <980e5d0cacc6e8f17836a4b8b8ab45524e02170a.camel@krasauskas.dev> <6d739ab9-b9f5-4646-a832-82b9b847c5ae@cox.net> 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: 42e68b81-f0ff-4035-93a4-1102c79e3eb9 X-Archives-Hash: 02b1598dafe65c6e1b5a556749760911 On 2024-02-26, eric 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.