@ -237,11 +237,14 @@ mount_disk_image() {
mount_image ${disk_image} "${rootpart}"
mount_image ${disk_image} "${rootpart}"
mount_partition "${rootfs_dev_mapper}" $mountpoint
mount_partition "${rootfs_dev_mapper}" $mountpoint
local boot_dev="${loop_device}p16 "
local boot_dev="${loop_device}p13 "
if flock -x ${loop_device} \
if flock -x ${loop_device} \
[ -b ${boot_dev} -a -e $mountpoint/boot ]; then
[ -b ${boot_dev} -a -e $mountpoint/boot ]; then
# Only mount if assumed boot_dev is XBOOTLDR type
if sgdisk -i13 "${loop_device}" | grep -i BC13C2FF-59E6-4262-A352-B275FD6F7172 ; then
flock -x ${loop_device} mount "${boot_dev}" $mountpoint/boot
flock -x ${loop_device} mount "${boot_dev}" $mountpoint/boot
fi
fi
fi
# Having one partition mounted should avoid udev-triggered partition
# Having one partition mounted should avoid udev-triggered partition
# rescans on that device, so we no longer need to flock.
# rescans on that device, so we no longer need to flock.