How to install to different named btrfs subvols?

I think @dalto one day told how to do but I forgot because it was so unintuitive form me.

Let’s say I have a Linux installed with systemd-boot and btfs subvolumes.

Now I want to additionally install EndeavourOS on this disc. What I can do is change btrfs subvolume names in /etc/calamares/modules/mount.conf.

However, when installing and choosing Manual partioning I have no chance to add the btrfs subvolumes with their designated mount points.

Any help appreciated.

Those subvolumes are applied to whatever btrfs partition you mount at /.

I know that isn’t particularly intuitive but that is how it works.

As a side note, I have never tried installing into an existing btrfs volume. I would try that in a VM first to make sure it doesn’t do anything unexpected.

This I tried but got a error. I will try again and carefully check. Probably I made a stupid mistake.

Yes, I am currently trying this in a VM because I am a cautious person. :grin:

1 Like

To make sure I understand correctly.

Before running the installer

  • I create the subvols
  • I specify those subvols in /etc/calamares/modules/mount.conf
  • Do I also have to mount things before running the installer??? (This is what I hadn’t done)

This will cause it to fail. The installer creates the subvols.

It creates the subvols specified in mount.conf

Ok, without creating the subvols it doesn’t work either. No matter if I previously run cryptsetup open /dev/vda eos or not.

I am not sure if it is possible to install into an existing encrypted volume.

Hm, that would be a pity. Perhaps I should ask the calamares people at https://github.com/calamares/calamares/issues

In general, shouldn’t it be possible to have more than one system which

  • resides in the same btrfs fs (having different subvolumes)
  • and sharing the /efi partition

?

It is possible. I made a post about how I did this a few years ago.

However, that doesn’t mean the installer itself supports it. There was a very recent change to Calamares to allow it to not unmount/close devices before starting the installer. However, that isn’t in EOS yet.

How could one find this post here?

So, this means it will be possible when the Calamares changes are in EOS?

I linked it. :slight_smile: Just click on the word “post” above.

Perhaps, it would need testing.

Thanks, I hadn’t seen that post was a bit bluish :slight_smile:

1 Like

I don’t know if I actually mentioned how I did it but essentially I installed each distro after the first into a VM and then used btrfs send/receive to send the subvols to real install. Then I chrooted in and rebuilt the initrams.

Thanks for this.

This is the information I was searching for in the post you linked… :grin:

There is a hack you can do to get around Calamares closing the LUKS device.

Essentially, just use “live-” in front of the mapping name when you open the device. For example:

sudo cryptsetup open /dev/[btrfs_partition] live-root

Then proceed with the Calamares installation.

1 Like

Thanks a lot @BluishHumility . Just tested. This workaround works great. :grinning:

2 Likes