HoTo resize Overlay BPI R3 on sdcard

Dear all

I have now invested days for this solution, I hope I can save you some time. And I'm aware that I'm close to absolute noob, so it's fair to blame me.

For me the official guide did not work (

My setup: I have bought in the past multiple Kingston 256GB SDCards and I prefer to use them as main device. together with the BPI-R3 with case, 8 antennas and cooling fan and HA Skyconnect USB-Stick together with home assistant on docker.

Fast forward:

  1. Download the newest version of the SD-Image ( IMPORTANT: Use a recent download! Because its a Snapshot and no stable version, dependencies can be corrupt within hours!

  2. Extract the .img. Use e.g. 7ZIP.

  3. Write image with Win32-Imager or Balena Etcher onto SD-Drive
    4.Plug in the SD-Card and make sure, that the setup switches at the BPI-R3 are set to SD-Card (all 4 switches are down/0/off or however you want to name it).
    5.Start and connect via SSH/Putty ( -> WebUI/Luci is not yet installed/available

  4. username root

  5. set new password with

  6. Install the essential tools by entering
    opkg install block-mount kmod-fs-ext4 e2fsprogs parted

  7. Enter
    parted /dev/mmcblk0
    Here is the first glitch: BPI R3 connects MMC and SDCard via the same "Interface", so the SDCard will everywhere look like MMC. Furthermore you can never access both at the same time.

  8. It will ask you to fix the partition table to use the whole available space. choose

  9. enter the print command
    Seven partitions are shown. Number seven is the relevant and is named "production"

  10. Resize the partition
    resizepart 7
    ignore 2 warnings
    set a reasonable amount for the partition (I did set 100GB on my 256 GB SDCard)

  11. On this partition is a loop-device installed , now we have to create a proper partition table for that "virtual device".
    parted /dev/mmcblk0p66
    then enter
    Disk label type GPT
    and once more ignore 2 Warnings.

  12. create now a partition on this virtual drive
    Partition name 1
    File System Type f2fs
    Start 1
    End [enter here some number less then given in 11.; I entered 99GB]

  13. reboot
    then should the overlay show the full 99 GB of space.

  14. now you can setup OpenWRT as you want. Important would be
    opkg update && opkg install luci with that you activate the WebUI, which you can access via Browser by entering

In my case, I then installed Docker, DockerD and Dockerman. Don't wait too long, elswhere the dependencies will brake.

In my naive unterstanding the issue of all these troubles is the setup of Loop-Devices. To my knowledge, this is a non-defined partition table, which behaves very strange. with this procedure we create clear partition and partition tables to leave this grey zone with loop-devices.

Please feel free to correct me, if I explained something incorrect.


PeteKL , thank you for your post, it worked for me, but with exceptions.
I did every step up until step 12 .
Upon entering the command mkpart it would always error that there was not enough space, so the virtual file size was the original 94mb and if I entered any size other than that it would error out.
So I just rebooted, and it appears that /dev/mcblk0p66 is recreated by scripts on boot?
As the virtual block now was the correct size and the overlay showed 100g of space.
I think the only way that step 12 would work properly would be to unmount the virtual loop device prior to changing it's partition? the loop device is new to me and I haven't read any of the documents yet so I am not sure about all the details, of when where and how.
But again, performing steps 1 - 10 seemed to be enough to make the overlay larger.