live: restore partprobe before building filesystem

Otherwise mkfs silently fails because OS reports out-of-sync partition table.
master
OpenGnSys Support Team 2024-05-06 19:04:16 +02:00
parent 2dd5105995
commit 8ecd57552a
1 changed files with 4 additions and 1 deletions

View File

@ -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':