From e5f937f629189197ec63610cb3d45cd0b60de2e9 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Mon, 22 Jan 2024 11:06:00 +0100 Subject: [PATCH] Allow reusing existing "empty" filesystems for / We currently require that filesystem for / must be newly formatted by Anaconda, with the new storage workflow the filesystems created in Cockpit doesn't need to be reformatted so the check needs to be adjusted to check if the filesystem selected for / is empty and force the reformatting only when it contains some preexisting data. --- pyanaconda/modules/storage/checker/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyanaconda/modules/storage/checker/utils.py b/pyanaconda/modules/storage/checker/utils.py index fe0d1ed22391..7d88000c0048 100644 --- a/pyanaconda/modules/storage/checker/utils.py +++ b/pyanaconda/modules/storage/checker/utils.py @@ -53,7 +53,8 @@ def verify_root(storage, constraints, report_error, report_warning): "which is required for installation of %s" " to continue.") % (get_product_name(),)) - if root and root.format.exists and root.format.mountable and root.format.mountpoint == "/": + if root and root.format.exists and root.format.mountable and root.format.mountpoint == "/" \ + and not root.format.is_empty: report_error(_("You must create a new file system on the root device.")) if storage.root_device and constraints[STORAGE_ROOT_DEVICE_TYPES]: