summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2024-02-22 11:03:13 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-02-22 11:33:50 +0100
commite3bb01f5f1727d3384c2826336ed06c5c82246d4 (patch)
tree4a2691e0c8a2e81c30993e473475d2a651b73884
parent26ca4c7950ca745a922442118dbb7d40397209ee (diff)
live: improve logging with setup command
Improve logging when setting up partition, provide more hints on progress. Fail in case partition layout is not supported.
-rw-r--r--src/live/ogOperations.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index c97975a..b72f7df 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -332,9 +332,14 @@ class OgLiveOperations:
cxt.create_disklabel('dos')
elif table_type == 'GPT':
cxt.create_disklabel('gpt')
+ else:
+ logging.info(f'Unsupported partition layout: {table_type}, only MSDOS and GPT are supported')
+ raise ValueError(f'Unsupported partition scheme {table_type}, only MSDOS and GPT are supported')
+
+ logging.info(f'Setting up partition layout to {table_type}')
for part in partlist:
- logging.debug(f'Adding partition: {part}')
+ logging.info(f'Creating partition {part["partition"]} with {part["code"]} of {int(part["size"])//1024} Mbytes')
if part["code"] == 'EMPTY':
continue
if ogRest.terminated:
@@ -358,8 +363,11 @@ class OgLiveOperations:
for part in partlist:
if part["filesystem"] == 'EMPTY':
continue
- partition = int(part["partition"])
+
fs = part["filesystem"].lower()
+ logging.info(f'Formatting partition {part["partition"]} with filesystem {part["filesystem"]}')
+
+ partition = int(part["partition"])
if fs == 'cache':
mkfs('ext4', int(disk), partition, label='CACHE')
init_cache()