IMO multiple Linux installs with several instances of grub, fighting over who controls the boot, sooner or later gives trouble.
One approach to avoid this is to designate one install as the one in control, and uninstall grub from the others. When installing the non-controlling ones, persuade the installer not to install a boot loader at all. With the old ubiquity installer one could give it the -b switch, and with calamares just not tell it about an EFI partition; it complains but continues. This approach gives problems if one wants to use btrfs to hedge bets on a big change to the controlling install, usually a release upgrade, by having before and after installs runnable at the same time; now there's two installs vying for control of the boot, and when you drop one of them it might be the one in control at that moment.
Another approach, which I adopted after a debacle (about precise, 12.04), is to install grub independently of any install. Before I moved to btrfs I had a small partition just for grub, and with btrfs a grub subvolume. One has to give up the grub configuration machinery and manually maintain grub.cfg, but IME that's far simpler and gives far, far less trouble; the grub update system breaks easily. (At one point I had several *buntus, a gentoo, and a Centos, with some of the *buntus having several releases, all in a 200 GB drive.) To boot an ubuntu install one just needs, for example, the stanza
Use of /boot/vmlinuz and /boot/initrd.img, symlinks to the latest kernel maintained by APT, means it will work indefinitely, and the use of the label makes it readable and thus less error-prone (using labels in /etc/fstab has a similar benefit). Several installs can have grub and their own /boot/grub, but if they don't mount the ESP they can't mess with it. (Release upgrades don't like this, but it's easy to fix what they break.) I've gone for years without booting needing attention, very different to what happened before.
However, I suspect a better approach is to use VMs for multiple installs. Maybe I'll investigate it one day. I imagine that would use a lot more storage compared to having multiple installs in one btrfs. I don't know how that would cope with the before and after release upgrade scenario; can one easily move an install into a VM?
One approach to avoid this is to designate one install as the one in control, and uninstall grub from the others. When installing the non-controlling ones, persuade the installer not to install a boot loader at all. With the old ubiquity installer one could give it the -b switch, and with calamares just not tell it about an EFI partition; it complains but continues. This approach gives problems if one wants to use btrfs to hedge bets on a big change to the controlling install, usually a release upgrade, by having before and after installs runnable at the same time; now there's two installs vying for control of the boot, and when you drop one of them it might be the one in control at that moment.
Another approach, which I adopted after a debacle (about precise, 12.04), is to install grub independently of any install. Before I moved to btrfs I had a small partition just for grub, and with btrfs a grub subvolume. One has to give up the grub configuration machinery and manually maintain grub.cfg, but IME that's far simpler and gives far, far less trouble; the grub update system breaks easily. (At one point I had several *buntus, a gentoo, and a Centos, with some of the *buntus having several releases, all in a 200 GB drive.) To boot an ubuntu install one just needs, for example, the stanza
Code:
menuentry 'Kubuntu' { search --no-floppy --set=root --label "mainn" linux /@r/boot/vmlinuz root=LABEL=mainn ro rootflags=subvol=@r initrd /@r/boot/initrd.img }
However, I suspect a better approach is to use VMs for multiple installs. Maybe I'll investigate it one day. I imagine that would use a lot more storage compared to having multiple installs in one btrfs. I don't know how that would cope with the before and after release upgrade scenario; can one easily move an install into a VM?
Comment