fdisk -lu image.file
- Calculate offset to partition as sector_size*Start
losetup -o size_from_above /dev/loop0 image.file
e2fsck -f /dev/loop0
mount /dev/loop0 /mnt
dd if=/dev/zero of=/mnt/deleteme
rm /mnt/deleteme
umount /mnt
losetup -d /dev/loop0
xz -v image.file