I'm trying to install different linux distributions inside a single BTRFS filesystem, using a subvolume for each, in order to avoid wasting free space using different partitions.
I am using a laptop running UEFI, and I wanted to use the following partitioning scheme:
sda1: EFI boot, mounted on /boot/efi on all systems
sda3: BTRFS volume
sda3 would then be "partitioned" in the following subvolumes:
/data: subvolume for data
/snapshots: subvolume for snapshots
/os/DISTID: subvolume for distro DIST (one for distro)
Every distro would install its GRUB2, and I would load the GRUB I need in UEFI, so that every distro does not need to be aware of the others.
I was able to install Arch and Funtoo, but I wasn't able to set OpenSUSE to install to the /os/suse subvolume.
I tried the following:
- set the latter as default subvolume (as stated also here) and told OpenSUSE not to format the partition; the installation seemed to be successful, but it wasn't able to boot
- mounted the subvolume to /mnt in the installation live system and told OpenSUSE to ignore the fact; the installation failed when it tried to remount the partition for the actual installation
- installed OpenSUSE in a virtual machine resembling the laptop environment, then copied the whole system to the subvolume and made the needed adjustments to grub and its settings (the ones I had to do with Arch or Funtoo); grub was loaded, but the booted system went in kernel panic
The adjustments to GRUB I wrote about imply the following:
- chroot in the subvolume (using arch-chroot or the procedure for gentoo/funtoo installation)
- install grub in
/boot/efi, the EFI system partition (but keep GRUB's data in
grub-mkconfig -o /boot/grug/grub.cfgto update the bootloader
Has anyone any idea? Did I miss something?