<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 4, 2014 at 1:10 PM, Austin S Hemmelgarn <span dir="ltr"><<a href="mailto:ahferroin7@gmail.com" target="_blank">ahferroin7@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">On 2014-08-04 13:56, Dallas Clement wrote:<br>
><br>
> On Mon, Aug 4, 2014 at 2:05 AM, Waldemar Brodkorb <<a href="mailto:wbx@openadk.org">wbx@openadk.org</a><br>
</div><div><div class="h5">> <mailto:<a href="mailto:wbx@openadk.org">wbx@openadk.org</a>>> wrote:<br>
><br>
> Hi Dallas,<br>
> Dallas Clement wrote,<br>
><br>
> > Hi All,<br>
> ><br>
> > I am trying to figure out a way to produce a uSD card image file<br>
> during my<br>
> > build process and do it as a non-root user. I am hoping to do<br>
> this from a post<br>
> > image script.<br>
> ><br>
> > I can create the image file with dd and partition it with parted<br>
> as a non-root<br>
> > user. However, I have not figured out how to format, and populate<br>
> the image<br>
> > file. Tools such as kpartx and losetup seem ideal for this<br>
> purpose except that<br>
> > they must be run as root.<br>
> ><br>
> > Does anyone know of a way to do this using qemu or fuse or related<br>
> tools?<br>
><br>
> You could use genext2fs to generate a filesystem as non-root.<br>
><br>
> Installing a bootloader as non-root would be tricky, but is<br>
> possible, too.<br>
><br>
> best regards<br>
> Waldemar<br>
><br>
><br>
> Wow! This is perfect. I searched all over for a tool like this.<br>
> Couldn't find anything. Thanks Waldemar! Do you know of a similar tool<br>
> to make / populate fat partitions. I need to work with both fat and ext2.<br>
<br>
</div></div>you can use any mkfs command as a non-root user, and for FAT you should<br>
be able to find a fuse driver for manipulating it (or there is always<br>
mtools).<br>
<br>
<br>
</blockquote></div><br>> Huh? genext2fs has been part of Buildroot since years, and is directly<br>> usable by asking Buildroot to generate an ext2/3/4 image in "Filesystem<br>> images".<br><br></div><div class="gmail_extra">
Ay yi yi. I guess it never caught my eye. How shameful. :/<br><br></div><div class="gmail_extra">Regarding mtools, will it allow me to partition an image file, format a partition as FAT, and copy files to it as non-root?<br>
</div></div>