[wellylug] modifying a boot img
David Antliff
dave.antliff at paradise.net.nz
Wed Jun 16 16:09:47 NZST 2004
On Wed, 16 Jun 2004, E.Chalaron wrote:
> I need to modify (or extract files) from an img to add a file to it.
Assuming by 'img' you mean a filesystem image, you can mount the image
using the loopback device (mount -o loop) and if you mount it read/write
(and the original file is also writable) you can delete and copy files to
the mounted filesystem as you wish. You need kernel support for mount -o
loop, as well as root privileges. When you're finished, make sure
you unmount the filesystem before you do anything with the 'img' otherwise
odd things can happen.
If it's something like cramfs (readonly filesystem) then you're going to
have to recreate the image - you can't modify it in this way AFAIK.
--
David.
More information about the wellylug
mailing list