From 0935339ce3b1d77073f4b3f940b856ecd6ac9de3 Mon Sep 17 00:00:00 2001 From: root Date: Jun 25 2019 08:26:54 +0000 Subject: Fix unmounting for LVM images After successfully-looking finish: /proc/mounts:/dev/mapper/fedora-root /tmp/root xfs rw,relatime,attr2,inode64,noquota 0 0 lrwxrwxrwx 1 root root 7 Jun 25 09:56 /dev/mapper/fedora-root -> ../dm-2 With debugging info: + sync + umount /dev/sdc3 /dev/sdc2 /dev/sdc1 umount: /dev/sdc3: not mounted. umount: /dev/sdc1: not mounted. + '[' fedora '!=' '' ']' + vgchange -a n fedora Logical volume fedora/root contains a filesystem in use. Can't deactivate volume group "fedora" with 1 open logical volume(s) + rmdir /tmp/root /tmp/boot /tmp/fw rmdir: failed to remove '/tmp/root': Device or resource busy rmdir: failed to remove '/tmp/fw': No such file or directory --- diff --git a/arm-image-installer b/arm-image-installer index c428a4c..173bdba 100755 --- a/arm-image-installer +++ b/arm-image-installer @@ -519,7 +519,7 @@ fi sync -umount $ROOTPART $BOOTPART $FIRMPART &> /dev/null +umount /tmp/root $BOOTPART $FIRMPART &> /dev/null if [ "$LVM_NAME" != "" ]; then vgchange -a n $LVM_NAME &> /dev/null fi