Re: [gentoo-user] How to set up drive with many Linux distros?
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. https://forums.linuxmint.com/viewtopic.php?t=315584
Re: [gentoo-user] How to set up drive with many Linux distros?
Since this is a fairly custom task, I would approach it with a custom solution. - GPT - systemd-boot - One /boot partition - One BTRFS-on-LUKS partition (formatted using the distro with the oldest kernel) - {@root,@home,@var,@srv,@opt}-{distro1,distro2,distro3} subvolumes - Potentially {@distro1,distro2,distro3}-{downloads,documents,pictures} subvolumes, if there's a usecase for that - Bootstrap all the distros manually. Arch and Gentoo do that by default, debian land has debootstrap, not too familiar with rhel universe, but at the end of the day everything's a file :) 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. You could also replace systemd-boot with efibootmgr to use UEFI boot directly, but I would advise doing that after the everything is working correctly as it's much easier to experiment using a good old bootloader edit function. BTRFS requires _some_ maintenance, but imho it's reasonable - run a deduplication and defrag job on a scheduling tool of your choice and you're good to go! $0.02
Re: [gentoo-user] How to set up drive with many Linux distros?
On 22/02/2024 19:17, Grant Edwards wrote: 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: File a bug! If that's true, it basically borks any sort of dual boot, unusual disk layout, whatever. Last time I installed SUSE, it trashed my boot totally because it didn't recognise my disk stack, failed to load necessary drivers, and worse trashed my gentoo boot too ... Cue one big rescue job to get the system up and working again. At least it was only the boot that was trashed. Cheers, Wol
[gentoo-user] How to set up drive with many Linux distros?
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