Skip to content

Commit 05d4ce5

Browse files
committed
[MultiBootManager] sync before unmount startup partition, fix uuid for mmc device
1 parent 2d8051b commit 05d4ce5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/python/Screens/MultiBootManager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,8 @@ def closeStartUpCallback(answer):
874874
mtdRootFs = BoxInfo.getItem("mtdrootfs")
875875
mtdKernel = BoxInfo.getItem("mtdkernel")
876876
device = self.UBISlotManagerDevice
877-
uuidRootFS = fileReadLine(f"/dev/uuid/{device}2", default=None, source=MODULE_NAME)
877+
PART_SUFFIX = "p" if "mmcblk" in device else ""
878+
uuidRootFS = fileReadLine(f"/dev/uuid/{device}{PART_SUFFIX}2", default=None, source=MODULE_NAME)
878879
diskSize = self.partitionSizeGB(f"/dev/{device}")
879880

880881
machinebuild = BoxInfo.getItem("machinebuild")
@@ -890,6 +891,7 @@ def closeStartUpCallback(answer):
890891
startupContent = f"kernel=/dev/{mtdKernel} root=UUID={uuidRootFS} rootsubdir=linuxrootfs{i} rootfstype=ext4\n"
891892
with open(f"{MOUNTPOINT}/STARTUP_{i}", "w") as fd:
892893
fd.write(startupContent)
894+
Console().ePopen(["/bin/sync"])
893895
Console().ePopen(["/bin/umount", "/bin/umount", f"{MOUNTPOINT}"])
894896
self.session.openWithCallback(closeStartUpCallback, MessageBox, _("%d slots have been created on the device.\n") % count, type=MessageBox.TYPE_INFO, close_on_any_key=True, timeout=10)
895897

0 commit comments

Comments
 (0)