Make sure a loop device exists before kpartx is called
Make sure a loop device exists before kpartx is called

If "kpartx -av" is called and there is no unused /dev/loop* device,
then kpartx fails. Calling "losetup -f" finds first unused device
and creates it if it doesn't exist.

Fixes bug #1195264

Change-Id: I5d59b519fd8e2a7380b71a788f9d3f2331b6567f

NaohiroTamura/diskimage-builder,JioCloud/diskimage-builder,rdo-management/diskimage-builder,citrix-openstack-build/diskimage-builder,openstack/diskimage-builder,CSC-IT-Center-for-Science/diskimage-builder,takahashinobuyuki/diskimage-builder,JioCloud/diskimage-builder,zioproto/diskimage-builder,CSC-IT-Center-for-Science/diskimage-builder,rdo-management/diskimage-builder,eantyshev/diskimage-builder,varunarya10/diskimage-builder,switch-ch/diskimage-builder,varunarya10/diskimage-builder,eantyshev/diskimage-builder,NaohiroTamura/diskimage-builder,switch-ch/diskimage-builder,zioproto/diskimage-builder,openstack/diskimage-builder,citrix-openstack-build/diskimage-builder,takahashinobuyuki/diskimage-builder