- I have been working on building a Linux based OS for Raspberry-pi using buildroot.
- I am generating the required empty .img file using "dd" and "fdisk" utilities.
- I am creating two empty partitions as follows; partition1:vfat and partition2:ext4.
- Further I had to copy the bootloader files to partion1 and the root filesystem files generated by buildroot to partition2.
- I used to achieve the above using "kpartx" utility by mounting the image file and copying the files to the mounted partitions. But drawback of this is that it needs root privilege.
- I was wondering whether there was any other way to do this without the need for root privilege? Does anybody have any idea about this?