[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add files to an existing img partition.

From: Jakob Bohm
Subject: Re: How to add files to an existing img partition.
Date: Mon, 13 Jul 2020 02:21:01 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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

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


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

[Prev in Thread] Current Thread [Next in Thread]