[BPI-R3] Change or add partion to /overlay

the 104MiB default come from the NAND version? As there is only 128mb Nand and 32mb NOR. or is that separate from the emmC image/config?

I think 768MiB would help a lot as current Snapshot builds only have around 30mb Free space. Especially since most OPKG packages tell WAY to low values for Storage they need.

I haven’t seen any mention of it, but is it possible to boot from m.2/NVME or can it only be used for additional storage?

You cannot directly boot from it,but you can have rootfs from it. Uboot does not yet support pcie controller. If this is supported,kernel can be loaded from there too

Is the nvme support in uboot working better now? I saw https://u-boot.readthedocs.io/en/latest/develop/driver-model/nvme.html

Uboot still misses pcie driver for mt798x as i’ve wrote above

Extend software free space, about 100MB to eMMC 8GB.

Completed environment:
・Boot from SPI-Nand
・eMMC 8GB or nvme for “/overlay” area.
・If expand using this method, there is no problem even if restart the BPI-R3.

Extroot configuration => https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

Note: Change the target device, in to the eMMC.

It now allocate eMMC(8GB) to the “/overlay” area.

Can also allocate nvme instead of eMMC.

Extend%20software%20space BPI-R3%20eMMC_overlay

This sounds very interesting!

Do you made any performance tests? I’m interested if this make a difference than using eMMC as main storage and extending it’s partition :slight_smile:


There is a benchmark for nvme with “hdparm”, but no benchmark for SPI-Nand.
nvme benchmark [KP230 Gen3.0 × 4]

root@BPI-R3:~# hdparm -t --direct /dev/nvme0n1

/dev/nvme0n1: Timing O_DIRECT disk reads: 1908 MB in 3.00 seconds = 635.47 MB/sec

Can get a benchmark by booting with an SD card and running “hdparm” on SPI-Nand, but since are already using to, it may be a little impossible.

But, I’ve used it with both SPI-Nand and eMMC and can’t feel any difference.
I don’t think there will be any problems in practice.
However, SPI-Nand is probably slower than eMMC in terms of Bus speed specifications.


Does this work for BPI-R3 and an external USB drive?

Doesn’t seem to work for me… I currently boot from eMMC. Wanting to expand /overlay for more packages, etc.

With this method described by yohru you have to boot from SPI-Nand and then follow the extroot configuration but with eMMC as device.

@yohru thanks for informations, i also think in real world the performance difference is not necessary. i think i’ll try that too :slight_smile:

I have only tested it with eMMC and mvne, but it should work.

Is a ext4 formatted USB memory are visible with “lsusb -t”?
Is it recognized by “block info” and “blcok detect”?
Are the following packages installed?


opkg install kmod-usb-storage
opkg install kmod-usb-storage-uas
opkg install kmod-fs-ext4
opkg install usbutils
opkg install block-mount
opkg install e2fsprogs

It might be convenient

opkg install fdisk cfdisk gdisk

Reference => https://openwrt.org/docs/guide-user/storage/usb-drives

I think my problem maybe due to ubifs? The extroot url page says ubifs will not work.

/dev/ubiblock0_2p1: UUID="4f09ab5b-b1aa15a5-513f1f34-03fe5cc2" VERSION="4.0" TYPE="squashfs"
/dev/ubi0_4: UUID="4feacfee-25d5-464a-92e5-863f58762cd1" VERSION="w5r0" TYPE="ubifs"
/dev/mmcblk0p65: UUID="4f09ab5b-b1aa15a5-513f1f34-03fe5cc2" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mmcblk0p66: UUID="c14525c5-0449-4584-9813-0cc908c2b5d4" LABEL="rootfs_data" VERSION="1.16" MOUNT="/overlay" TYPE="f2fs"
/dev/sda1: UUID="7360cada-50ce-4e9f-9396-618a37ce81e3" LABEL="extroot" VERSION="1.0" TYPE="ext4"

Depending on the startup method(SPI-Nand / eMMC), whether Extroot is possible or not may be different…?
It might be better to extend eMMC using the method described in this thread using “parted”.

I’m still unconfirmed yet.
However, I am writing this as a it may be helpful.

Expanding storage (optional)

MBR => cfdisk
GPT => cgdisk

Thanks for this Google Wifi writeup.

When using this command:

resize2fs /dev/loop0

Gives, this error:

root@OpenWrt:/# resize2fs /dev/loop0
resize2fs 1.47.0 (5-Feb-2023)
resize2fs: Invalid argument while trying to open /dev/loop0
Couldn't find valid filesystem superblock.

Should the command arguments be modified for BPi-R3?



PS: Using Current stable release - OpenWrt 23.05.0 on BPi-R3, Want to use docker to run Home assistant on the device, but I am running out of space when installing docker. BPi-R3 is booting from emmmc and I have already used cfdisk to repartition the free space of 7.1gb and it shows up in the software pane of open-Wrt.

Since OpenWrt is now 23.05, I actually tried it.
I tried changing various settings, but it didn’t work.
It seems to be difficult to boot from eMMC and assign /overlay to the free space on the eMMC.

I decided to boot with SPI-Nand as usual and assign /overlay to the entire eMMC.

There is no problem if you use HA with the default entity retention of 10 days, but if you want to retain entities for more over 10 days ago, recommend to assign to NVMe SSD.
If something happens to the eMMC, it cannot be easily replaced.

Thanks for the pointers, I think I am going to first test out the setup on eMMC and then buy and install a M.2 NVMe SSD after I figure out best setup for cooling the SSD. Now for me the next step is to boot from NAND and use resize.f2fs /dev/mmcblk0p66 command to extend the overlay to entire 8GB eMMC. Since I am still new to using Linux CLI commands, I am not sure how to partially extend the overlay using resize.f2fs command or I would have only extended the overlay to 2GB to match the RAM.

Since only pcie2.0 x2 lanes available, you do not need a fast and hot ssd.

I use a Kingston NV2 on a pcie3 x4 lane system, and it does not use a lot of power and it does not get hot.

So this NV2 would already be more then fast enough for the PBI-R3 and would not get hot at all.

1 Like

Ok, I was able to increase my storage space by following the instructions in this post https://forum.banana-pi.org/t/bpi-r3-how-to-flash-openwrt-snapshot-on-emmc/14055. Now I have more than enough space (1.46GB to be exact) to install packages.

why only 1.46 GB? from 8GB emmc there should be more free space