I’ve been playing around with a scenario (using Grok to help me), and I’m stuck. I wanted to see if I could take a system installed with a btrfs partition that has two subvolumes, @/ and @/home, and install OpenMandriva on @/ without touching @/home.
This is a scenario I usually perform on ext4, but with separate partitions: blow away the partition containing /, keep /home, and distro hop without having to restore from a backup. I’ve done this before with Calameres, but I wanted to see if I could do it with btrfs (this is one of the things that keeps me from switching to btrfs).
So I installed Arch Linux using the archinstall installer in a VM and specified btrfs with subvolumes. The idea was to get that working and then try to install OpenMandriva on top of it by blowing away the @ subvolume and recreating it, without touching @home.
Unfortunately, Calameres doesn’t show the subvolumes at all so they can be dealt with separately. It’s either keep the partition or don’t. And if I tell it to keep the partition, the installer blows up with this error:
Here’s the underlying error message:
[PYTHON JOB]: Found gettext "en_US.UTF-8" in
"/usr/share/locale/en_US.UTF-8"
chcon: failed to get security context of '/': Operation not supported
.. Running QList("mount", "-t", "btrfs", "-o",
"defaults,noatime,compress=zstd:1,autodefrag", "/dev/vda2",
"/tmp/calamares-root-d5woo902/")
.. Running QList("udevadm", "settle")
.. Running QList("sync")
ERROR: Could not create subvolume: File exists
17:12:56 [1]: virtual JobResult Calamares::Python::Job::exec()
ERROR: Error while running: CalledProcessError: Command '['btrfs',
'subvolume', 'create', '/tmp/calamares-root-d5woo902/@']' returned
non-zero exit status 1.
At:
/usr/lib64/python3.11/subprocess.py(413): check_call
/usr/lib64/calamares/modules/mount/main.py(292): mount_partition
/usr/lib64/calamares/modules/mount/main.py(385): run
I’m curious: is this a Calameres limitation, or can its configuration be tweaked?
