I tried to apply the steps for the BPI-R3 but since the SD-Card partition layout significantly differs, I struggle to success. I used the SDCARD.IMG.GZ from
https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mediatek%2Ffilogic&id=bananapi_bpi-r3
The partition layout is as follows:
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *255.9 GB disk3
1: Linux Filesystem 4.2 MB disk3s1
2: Linux Filesystem 524.3 KB disk3s2
3: Linux Filesystem 2.1 MB disk3s3
4: EFI 4.2 MB disk3s4
5: EFI 33.6 MB disk3s5
6: EFI 21.0 MB disk3s6
7: CAE9BE83-B15F-49CC-863F-081B744A2D93 109.1 MB disk3s7
After booting OpenWRT intro recovery from SD and installing cfdisk, expanding the partition mmcblk0p7 and rebooting from SD
opkg update && opkg install fdisk resize2fs cfdisk
cfdisk /dev/mmcblk0
Disk: /dev/mmcblk0
Size: 238.3 GiB, 255869321216 bytes, 499744768 sectors
Label: gpt, identifier: 5452574F-2211-4433-5566-778899AABB00
Device Start End Sectors Size Type
>> /dev/mmcblk0p1 34 8191 8158 4M Linux filesystem
/dev/mmcblk0p2 8192 9215 1024 512K Linux filesystem
/dev/mmcblk0p3 9216 13311 4096 2M Linux filesystem
/dev/mmcblk0p4 13312 21503 8192 4M EFI System
Free space 21504 24575 3072 1.5M
/dev/mmcblk0p5 24576 90111 65536 32M EFI System
/dev/mmcblk0p6 90112 131071 40960 20M EFI System
/dev/mmcblk0p7 131072 499744734 499613663 238.2G unknown
┌────────────────────────────────────────────────────────────────────────────┐
│Partition name: bl2 │
│Partition UUID: 5452574F-2211-4433-5566-778899AABB01 │
│Partition type: Linux filesystem (0FC63DAF-8483-4772-8E79-3D69D8477DE4) │
│ Attributes: RequiredPartition LegacyBIOSBootable │
└────────────────────────────────────────────────────────────────────────────┘
[ Delete ] [ Resize ] [ Quit ] [ Type ] [ Help ] [ Write ]
[ Dump ]
Device is currently in use, repartitioning is probably a bad idea.
Quit program without writing changes
I checked the storage and nothing seems to make any sense:
df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 5.0M 5.0M 0 100% /rom
tmpfs 997.9M 64.0K 997.8M 0% /tmp
/dev/mmcblk0p66 91.9M 60.3M 31.7M 66% /overlay
overlayfs:/overlay 91.9M 60.3M 31.7M 66% /
tmpfs 512.0K 0 512.0K 0% /dev
Though, p6 and p7 are said to be (source) virtual partitions of mmcblk0p5
I am curios as to how to expand the storage properly.
Is this something unique to BananaPis image or indeed common practiced? I tried various attempts over the weekend and nothing seems to make any sense to me. Thanks in advance for you help!
EDIT
I believe I am booting form the wrong device. When I check the SD-Card via lsblk the partition seems to have been expanded correctly:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 122.5M 0 disk
mtdblock1 31:1 0 2M 1 disk
mtdblock2 31:2 0 3M 0 disk
mtdblock3 31:3 0 512K 1 disk
mmcblk0 179:0 0 238.3G 0 disk
├─mmcblk0p1 179:1 0 4M 0 part
├─mmcblk0p2 179:2 0 512K 0 part
├─mmcblk0p3 179:3 0 2M 0 part
├─mmcblk0p4 179:4 0 4M 0 part
├─mmcblk0p5 179:5 0 32M 0 part
├─mmcblk0p6 179:6 0 20M 0 part
├─mmcblk0p7 179:7 0 238.2G 0 part
├─mmcblk0p65 259:0 0 4.8M 1 part /rom
└─mmcblk0p66 259:1 0 238.2G 0 part /overlay
ubiblock0_1 254:0 0 28M 0 disk
Best
Mike