Opened 4 years ago

Last modified 3 years ago

#17316 new enhancement

WNDR4300 - remove mtd11 (reserved partition)

Reported by: rsriram22 Owned by: developers
Priority: normal Milestone:
Component: kernel Version: Barrier Breaker 14.07
Keywords: mtd11 WNDR4300 NAND Cc:


Per wiki's Visual Representation for this router, there is a mtd11 partition that is reserved with 96MiB. Can this be removed and made available to ubiroot or rootfs_data partitions so that more NAND space can be used to install packages etc?

some one already tried that here -

Any particular reason why this should not be done?


Attachments (0)

Change History (8)

comment:1 Changed 3 years ago by anonymous

This is really important.
Would save me a lot of time compiling every release on my own.

comment:2 Changed 3 years ago by anonymous

Edit the Makefile to change it.

comment:3 Changed 3 years ago by christarento

Why this change could not be done directly by the openwrt team ?

comment:4 Changed 3 years ago by paulj

I received an WNDR4300 and ran into this issue setting it up. The majority of the flash, 96 MiB is left unused in a "reserved" partition. I used ImageBuilder to make an image with wndr4300_mtdlayout set to give the space to the "ubi" mtd as per that thread and it has worked

Would be great to update this in official repository.

comment:5 Changed 3 years ago by spencer

This change can also be applied in the Chaos Calmer builds. Any reason this change hasn't been merged?

comment:6 Changed 3 years ago by skyblaster

In 14.07, block-mount fails to mount a USB ext4 partition as /overlay. I'm guessing this is due to UBI since it works fine if mounted at /mnt/sda1.

As such, I too would love to see the extra NAND space usable by default. On a newly purchased unit, I can confirm that this jffs2 block contains a single /apps folder void of any files, so utilizing it shouldn't be a problem.

For completeness of the ticket I found the following patch which appears to be the same as the earlier forum post.


comment:7 Changed 3 years ago by skyblaster

After backing up the caldata_backup partition, I went ahead and built and loaded 14.07 using ImageBuilder and the mtdlayout modification above.
Here is the output of dmesg on boot:

[    0.590000] mtd: ar934x-nfc: skipping zero sized partition
[    0.600000] 11 cmdlinepart partitions found on MTD device ar934x-nfc
[    0.600000] Creating 11 MTD partitions on "ar934x-nfc":
[    0.610000] 0x000000000000-0x000000040000 : "u-boot"
[    0.620000] 0x000000040000-0x000000080000 : "u-boot-env"
[    0.620000] 0x000000080000-0x0000000c0000 : "caldata"
[    0.630000] 0x0000000c0000-0x000000140000 : "pot"
[    0.640000] 0x000000140000-0x000000340000 : "language"
[    0.640000] 0x000000340000-0x0000003c0000 : "config"
[    0.650000] 0x0000003c0000-0x0000006c0000 : "traffic_meter"
[    0.660000] 0x0000006c0000-0x0000008c0000 : "kernel"
[    0.660000] 0x0000008c0000-0x000007fc0000 : "ubi"
[    0.670000] 0x0000006c0000-0x000007fc0000 : "firmware"
[    1.820000] 0x000007fc0000-0x000008000000 : "caldata_backup"

I could be wrong, but to me it looks like the caldata_backup partition was overwritten and a new one was created at the end.

root@wndr3700:/etc/config# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00040000 00020000 "u-boot"
mtd1: 00040000 00020000 "u-boot-env"
mtd2: 00040000 00020000 "caldata"
mtd3: 00080000 00020000 "pot"
mtd4: 00200000 00020000 "language"
mtd5: 00080000 00020000 "config"
mtd6: 00300000 00020000 "traffic_meter"
mtd7: 00200000 00020000 "kernel"
mtd8: 07700000 00020000 "ubi"
mtd9: 07900000 00020000 "firmware"
mtd10: 00040000 00020000 "caldata_backup"

comment:8 Changed 3 years ago by mforkel

I built a firmware for Barrier Breaker with the above patch. The MTD partition table looks okay. But I noticed two problems:

  • The root partition does not use the additional space available in ubi. In fact, it is even a little smaller than in the standard firmware.
  • With the standard firmware, the contents of the caldata and caldata_backup partitions are idenntical. The contents of the caldata partition in the new firmware is identical to the its contents in the standard firmware. But the contents of the caldata_backup partition is all 0xFF

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.