From 8ecd57552ac9e18313ea8a4a8c37818853dd639d Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Mon, 6 May 2024 19:04:16 +0200 Subject: live: restore partprobe before building filesystem Otherwise mkfs silently fails because OS reports out-of-sync partition table. --- src/live/ogOperations.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index afb6c67..a43e756 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -348,6 +348,9 @@ class OgLiveOperations: cxt.write_disklabel() os.sync() + ret = subprocess.run(['partprobe', f'/dev/{diskname}']) + logging.info(f'first partprobe /dev/{diskname} reports {ret.returncode}') + for part in partlist: if part["filesystem"] == 'EMPTY': continue @@ -362,7 +365,7 @@ class OgLiveOperations: mkfs(fs, int(disk), partition) ret = subprocess.run(['partprobe', f'/dev/{diskname}']) - logging.info(f'partprobe /dev/{diskname} reports {ret.returncode}') + logging.info(f'second partprobe /dev/{diskname} reports {ret.returncode}') for part in partlist: if part["filesystem"] == 'EMPTY': -- cgit v1.2.3-18-g5258