<div dir="ltr"><div><div><div><div>Hello,<br><br>Thanks for your replies. I did not know the infrastructure ('loopfiles','minargs') you suggested exists in toybox.<br><br></div>The use case we use this command for is for firmware updates. A new image is downloaded and copied byte-per-byte (including partition table) onto the medium using dd. Afterwards, this ioctl is used to make the kernel reload the partition table. The normal boot process then continues.<br>
<br></div>You are right that this ioctl does not work when any partition on the device is in use, but this situation does not occur in our use case.<br><br></div>The solution of the 'real' partprobe is to call BLKPG on all paritions, this allows limited resizing while other partitions are in use. While this is a good solution, there are still many cases where the partitions cannot be resized online (eg overlap with other, mounter, partition). It would also make the program a lot more complex as it has to parse several types of partition table.<br>
<br></div>Sincerely,<br>Bertold Van den Bergh<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 26, 2014 at 1:15 AM, Rob Landley <span dir="ltr"><<a href="mailto:rob@landley.net" target="_blank">rob@landley.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 05/23/14 06:53, Bertold Van den Bergh wrote:<br>
> Hello,<br>
><br>
> I have attached a patch adding a program that allows re-reading the<br>
> partition table. This is often used on embedded systems booting from<br>
> SD/USB devices that need to resize partitions on first boot.<br>
<br>
</div>Hmmm, this command is installed on my old ubuntu 10.04 netbook, running<br>
"dpkg-query -S $(which partprobe)" says it's part of the gnu parted<br>
package. Busybox does not have this command.<br>
<br>
We already call BLKRRPART in "fdisk" and "eject". I'd be tempted to add<br>
it to mdev instead of making it a standalone command, but the standalone<br>
command already exists...<br>
<br>
Could you give me an example use case? (You resize the partitions<br>
without calling fdisk which would already call this ioctl...?)<br>
<br>
Thanks,<br>
<br>
Rob<br>
</blockquote></div><br></div>