Easy reinstall of Fedora (keeping home) isn't available with the default disk layout of Fedora 42 and older

Problem

If you wish to perform an easy reinstall (i.e. replacing the system, but keeping all home files) of Fedora 42 or older using the Fedora 43 or newer installer, you might see the following error when selecting the “Reinstall Fedora” option:

No suitable free space found for automatic partitioning for /boot (ext4): requested 2 GiB, largest free space 1 GiB

The installer only allows “Reinstall Fedora” to work under certain conditions, which are often not met on Fedora 42 and older installs due to a change in the default /boot partition size.

Note: The “Reinstall Fedora” option is only visible in the “webUI” version of the installer, which is used on live images.

Cause

Until Fedora 42, the default size of the /boot partition was 1 GiB (and long ago, it was even smaller). Beginning from Fedora 43, it has increased to 2 GiB. The installer requires these constraints to be met for performing a new default installation, including when the user requests to keep the home files (the “Reinstall Fedora” option). Since there’s usually no free space to grow/recreate the /boot partition with the increased size, the installer can’t automatically continue.

Related Issues

Fesco ticket: https://pagure.io/fesco/issue/3482

Installer crash related to btrfs subvolumes: 2406198 – WebUI: org.fedoraproject.Anaconda.Error: 'NoneType' object has no attribute 'path' - when btrfs subvolume gets recreated while having nested subvolumes

Workarounds

There are several ways to approach this:

a) Back up all your data (home files, etc) elsewhere, and perform a full new install of Fedora. This will give you the new 2 GiB /boot partition (which is strongly recommended, as firmware files grow bigger constantly), and it’s the recommended approach.

b) Use the Mount point assignment option to manually specify where to install. This way, you can work around the installer requirement for a 2 GiB /boot (meaning you can select your existing smaller partition), and you can also keep your home partition (or subvolume) intact, and mount it to the new system. However, this also requires advanced partitioning knowledge, and it’s possible to make a mistake and delete your user data by accident (which means you should back it up in all cases). There are also a few other obstacles, more on that below.

c) Upgrade instead of reinstall. Reinstalling the system is mostly used when there’s something broken in the current one, or when you simply want to start with a new, pristine system state. If your system is fully functional, you can consider whether you need to reinstall at all? The regular system upgrade is available and won’t have any additional requirements on your disk layout.

Option b) in detail: Using the Mount point assignment option

Back up your data, really.

Before you select Mount point assignment option, please note that we’ve discovered a bug in the installer that makes it crash at the end of the installation, if you try to reformat a btrfs subvolume that has nested subvolumes (which is the case for a default Fedora 43 desktop installation). Even though the crash appears to happen at the very end of the installation, some system setup steps are missed because of the crash, and you shouldn’t use the system affected by it. Therefore, we need to work around this crash first. If your system doesn’t use btrfs, because you have old or custom layout, you can skip the “storage editor” screens and go straight to “mount point assignment” steps.

In the Installation method screen, click on three dots in the upper right corner and select Launch storage editor:

In the storage editor, delete the var/lib/machines subvolume under the root subvolume:

Now click Return the installation. We’ve now avoided the installer crash and can reformat (recreate) the root subvolume, because it has no nested subvolumes at this moment. We can proceed to the Mount point assignment section.

In the Mount point assignment screen, select the correct devices for your / and /boot partitions. For /, it’s the root subvolume by default, and for /boot, it’s a physical disk partition (if you don’t know how to figure out its name, you probably shouldn’t be following this guide). Be sure to mark both to be reformatted. Then add a new /home mountpoint, and select your home partition (it’s the home subvolume by default), and make sure it’s not marked for reformatting.

With this setup (adjusted to your particular system), the installation should be performed correctly, and your home files should be kept intact. If you create the same user as in your previous installation, you should see all your files immediately after login.

2 Likes

You can discuss this issue here.