From 69b7543243f0ab8fc75e36c6a8905870d16f039d Mon Sep 17 00:00:00 2001 From: Alexey Min Date: Fri, 8 Jan 2021 18:17:21 +0300 Subject: [PATCH] pmb.chroot.shutdown: be more user friendly when unmounting SD card (MR 2012) When unmounting SD card after `pmbootstrap install --sdcard=...` it takes a lot of time for kernel to sync filesystem cache before actual umounting happehs. This looks like pmbootstrap is stuck, so before doing unmount print a message to inform user of what's happening, in case `--sdcard` was used. --- pmb/install/_install.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmb/install/_install.py b/pmb/install/_install.py index bfbfba6f..d38200b1 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -484,6 +484,9 @@ def install_system_image(args, size_reserve, suffix, step, steps, configure_apk(args) copy_ssh_keys(args) embed_firmware(args, suffix) + if sdcard: + logging.info("Unmounting SD card (this may take a while " + "to sync, please wait)") pmb.chroot.shutdown(args, True) # Convert rootfs to sparse using img2simg