Talk: Installer crashes when btrfs subvolume gets reformatted while having nested subvolumes

This is a discussion topic for the following Common Issue:

You can discuss the problem and its solutions here, but please note that debugging and technical feedback should primarily go to the issue trackers (e.g. Bugzilla) linked in the Common Issue, because that’s the place that developers watch, not here.

If there are any updates/changes/amendments for the Common Issue description, which you believe should be performed, please post it here.

Please see the Common Issue for solution/workarounds:

The solution for https://discussion.fedoraproject.org/t/installer-crashes-when-btrfs-subvolume-gets-reformatted-while-having-nested-subvolumes/170252 calls for deleting subvolume var/lib/machines using the anaconda gui.

This fails for me on hardware using LUKS with:

ERROR: Could not statfs: No such file or directory Command ‘[‘btrfs’, ‘subvolume’, ‘delete’, ‘root/var/lib/machines’]’ returned non-zero exit status 1.

No log files in /tmp are updated during the delete.

sudo btrfs subvolume list /
[sudo] password for :
ID 256 gen 509335 top level 5 path home
ID 265 gen 509334 top level 5 path root
ID 266 gen 509317 top level 265 path var/lib/machines

(Deleting var/lib/machines worked for me in a VM w/o using LUKS.)

It proposes to reinstall the system …

This error occurs towards the end of the installation. While it might seem “harmless”, because the installed system boots and appears to works, important finalization steps were skipped because of the crash, and it’s not recommended to continue using this system. A new installation should be performed.

The suggested workaround is to delete var/lib/machines, see Installer crashes when btrfs subvolume gets reformatted while having nested subvolumes .

Have also a look on that … it is linked to your initial link you posted.

You might resize your boot partition to 2GB? It is new since F43. Also other settings from “ancient” installations could not be compatible anymore. As an example if you have data on a second disk/partition you can not reuse because of the MBR instead of GPT on the disk. Did you check that?

I think the error message clearly identifies the failing command.

Can you try to replicate your existing layout in a VM and see it if you can reproduce the failure?

Which installation image are you running?

Fedora-Workstation-Live-43-1.6.x86_64.iso

Requires some thinking. Will try.

org.fedoraproject.Anaconda.Modules.Storage calls “btrfs subvol get-default”. I found a difference between a fresh install of Fedora 42 (VM, no LUKS)

test@fedora:~$ sudo btrfs subvolume get-default /
ID 5 (FS_TREE)

and my system (Fedora 43, hw, LUKS) which over the years went through several new /usr keep /home cycles

sudo btrfs subvolume get-default /
ID 265 gen 509774 top level 5 path root

After changing the default subvolume

sudo btrfs subvolume set-default 5 /

and a reboot, I was able to delete subvolume var/lib/machines in Anaconda.

1 Like

Do you have a idea what was the full install of Fedora (the version of initial install)? Seams like some btrfs changes since release. Could it be that you used btrfs for the /boot partition which is still ext4 now?
You might used the pre-release when we changed by default to btrfs aprox F33?

Ok, good that it works for you now. The guide is written for default installs, and it seems you made some changes over the years. We can’t cover everything people might do, so I think the current description is OK in that regard.

For a reinstall, in the storage editor, after having deleted the var/lib/machines subvolume, if one assigns mount points for the root subvolume and the EFI partition, the storage editor reports “Storage requirements not met. You must create a new file system on the root device.”

In this context, you must not create a new file system on the root device. The message means there is a root subvolume (the device), which is not empty. The easiest and safest way forward is to “Proceed with installation” and then “Reinstall Fedora”.

Deleting and recreating the root subvolume in the storage editor removes the “Reinstall Fedora” method and requires additional steps further down the installation.

Could you report a bug against anaconda-webui in RH Bugzilla and ask them to improve this error message when btrfs subvolumes are used instead of regular partitions? It could even be a general message, just better phrased, e.g. “you must create a new file system or an empty subvolume”.

2 Likes