[Buildroot] manipulating raw disk images as non-root user
thomas.petazzoni at free-electrons.com
Sat Aug 2 16:54:56 UTC 2014
Dear Dallas Clement,
On Sat, 2 Aug 2014 11:45:58 -0500, Dallas Clement wrote:
> I am trying to figure out a way to produce a uSD card image file during my
> build process and do it as a non-root user. I am hoping to do this from a
> post image script.
> I can create the image file with dd and partition it with parted as a
> non-root user. However, I have not figured out how to format, and populate
> the image file. Tools such as kpartx and losetup seem ideal for this
> purpose except that they must be run as root.
> Does anyone know of a way to do this using qemu or fuse or related tools?
You could have a look at genimage that is available as a package in
Buildroot. Yann E. Morin also had developed some patches for Buildroot
to make that possible, but they were not merged due, I believe, to a
too high complexity. I'm sure he will be available to give you pointers
to these patches.
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
More information about the buildroot