How to resize /overlay?

my device is netgear R8000, has a 128M flash memery, but openwrt seems not use it
fdisk info

root@OpenWrt:~# fdisk -l
Disk /dev/mtdblock0: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock1: 1.5 MiB, 1572864 bytes, 3072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock2: 36 MiB, 37748736 bytes, 73728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock3: 4 MiB, 4193792 bytes, 8191 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock4: 32 MiB, 33554432 bytes, 65536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock5: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock8: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock9: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock10: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock11: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock12: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock13: 79 MiB, 82837504 bytes, 161792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/ubiblock0_0: 3.63 MiB, 3809280 bytes, 7440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

block info

root@OpenWrt:~# block info
/dev/mtdblock4: UUID="1102403212" VERSION="1" TYPE="ubi"
/dev/ubiblock0_0: UUID="7f8a1661-418f4489-b12ee950-e554b540" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/ubi0_1: UUID="1524d2f4-de0a-481d-8fcd-5649070c1cf1" VERSION="w5r0" MOUNT="/overlay" TYPE="ubifs"

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 02400000 00020000 "firmware"
mtd3: 003fffe4 00020000 "linux"
mtd4: 02000000 00020000 "ubi"
mtd5: 00080000 00020000 "board_data"
mtd6: 00100000 00020000 "POT"
mtd7: 00700000 00020000 "POT"
mtd8: 00080000 00020000 "ML"
mtd9: 00080000 00020000 "ML"
mtd10: 00080000 00020000 "ML"
mtd11: 00080000 00020000 "ML"
mtd12: 00080000 00020000 "ML"
mtd13: 04f00000 00020000 "ML"

how to mount /dev/mtdblock13 to /overlay? I tried use fdisk to create a new partion on /dev/mtdblock13, it will said fdisk: failed to write disklabel: Operation not permitted

Many of those partitions contain stuff that's needed for the proper operation of the router, like e.g. some of them contain calibration data for the WiFi and WiFi won't work without it. Do not go messing around with the partitions unless you know for a fact that the partition doesn't contain anything important!

If you insist on messing around with them and you brick your router, that's on you. That said, you can modify the router's DTS-file to change the partition sizes and location, if you compile a custom image.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.