On 28/06/2020 16:25, Frantisek Rysanek wrote:
2) Add files into that container.  If possible, be able to resize
the
file holding the container, as well as resize the partitions defined
inside.

Mount the image in a VM, where you have some tool (partition magic?
PQ magic?) that can shrink Windows filesystems (FAT16/FAT32/NTFS).
Booted from a small "service" system disk.
How about PartEd live, it is a Linux liveCD (Debian based) that contains
a GUI for GNU parted and all the available Libre command line file
system tools, including built in knowledge of how to invoke them for
common tasks like the OP needs.  It doesn't however include qemu-img
or qemu-nbd to manipulate disk image files.  While these can be
installed to the liveCD RAM disk from Debian repositories, the
PartEd GUI doesn't know how to invoke them on-the-fly.

For XP disks, PartEd GUI knows about ntfsresize and some unspecified
tool for (V)FAT filesystems.

Most Linux-based tools can work directly with raw images, either
directly or via the "loop" device as configured with losetup
After that tool is finished, you should end up with some deallocated
space at the end of your raw image file. You can then use qemu-img to
shrink the image file - or so I understand.

See also my previous note, if this stuff with raw images and resizing
wouldn't be easier to solve with a more modern image format -
provided that you can get a hypervisor for Android that can work with
them.

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2860 Soborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded


Reply via email to