I have get it works, partially.
From an OpenSUSE installation (
btrfs used by default), I have:
- created a subvolume (
btrfs subvol create /debian),
deboostrap --arch=amd64 stable /debian http://deb.debian.org/debian/,
- in a
chroot /debian, install
btrfs-tools, then a kernel, and set a password !
- back in the OpenSUSE root shell modify
/boot/grub2/grub.cfg, add one entry.
Typically, I have dupplicated an OpenSUSE entry, change the name (
Debian), and add on the
rootflags=subvol=@/debian. I also use the Debian kernel and initrd files (
initrd= lines). Note, GRUB search the default root FS, then both files are in
Reboot... And I have a Debian boot entry which start Debian from the debian subvolume. It doesn't mount anything by default, but
mount -o subvol=@/home /dev/sda2 /home for example can mount the OpenSUSE
/home subvolume and make it available on Debian too. Of course, editing the
/etc/fstab would make things permanent. (And using UUID is better).
This installation is not completely satisfactory. Updating the kernel on Suse will erase the GRUB Debian entry. And updating the kernel on Debian will not update the GRUB configuration. (the GRUB os-prober only scans the partitions, not the subvolumes).
But, my setting proves we can have multiple Linux installations on the same partition with
Note OpenSUSE names the root subvolume
@. We can see it with
btrfs list /. I don't know if other distributions use other conventions. The very first line of
btrfs subvol show /debian gives you the name to use with