Meraki MR52 remove stock partitions

Hello everyone, recently I bought a couple MR52's and successfully installed OpenWRT. The last thing I would like to do is remove the stock partitions but the instructions seem a bit lacking IMO. To avoid bricking my AP's I was hoping to get some clarification from those who have done this.

According to the instructions (https://openwrt.org/toh/meraki/mr52) it says that you can delete UBI volumes on ubi0 (mtd11), diagnostic1 , part.old , storage and part.safe. To do this i'm guessing you just need to run the following commands:

ubirmvol /dev/ubi0 -N $i diagnostic1
ubirmvol /dev/ubi0 -N $i part.old
ubirmvol /dev/ubi0 -N $i storage
ubirmvol /dev/ubi0 -N $i part.safe

Is that correct?

I did find some instructions that are specific to the Meraki MR18 (Cisco Meraki MR18 remove stock partitions to get more free space for packages). It talks about recreating some partitions. Same goes for the MR33 (https://openwrt.org/toh/meraki/mr33). Do any of the partition for the MR52 need to be recreated manually after deleting?

Guess my last question is, do you just re-flash the firmware when done?

Below is a list of the current partitions. There are two others (rootfs and rootfs_data but not sure if those can be removed as well.

UBI version:                    1
Count of UBI devices:           2
UBI control device major/minor: 10:126
Present UBI devices:            ubi0, ubi1

ubi0
Volumes count:                           6
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     566 (71868416 bytes, 68.5 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  20
Current maximum erase counter value:     2052
Minimum input/output unit size:          2048 bytes
Character device major/minor:            246:0
Present volumes:                         0, 1, 2, 3, 4, 5

Volume ID:   0 (on ubi0)
Type:        static
Alignment:   1
Size:        114 LEBs (14475264 bytes, 13.8 MiB)
Data bytes:  14442496 bytes (13.7 MiB)
State:       OK
Name:        diagnostic1
Character device major/minor: 246:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        static
Alignment:   1
Size:        120 LEBs (15237120 bytes, 14.5 MiB)
Data bytes:  15167488 bytes (14.4 MiB)
State:       OK
Name:        part.safe
Character device major/minor: 246:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        static
Alignment:   1
Size:        120 LEBs (15237120 bytes, 14.5 MiB)
Data bytes:  15171584 bytes (14.4 MiB)
State:       OK
Name:        part.old
Character device major/minor: 246:3
-----------------------------------
Volume ID:   3 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        67 LEBs (8507392 bytes, 8.1 MiB)
State:       OK
Name:        storage
Character device major/minor: 246:4
-----------------------------------
Volume ID:   4 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        34 LEBs (4317184 bytes, 4.1 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 246:5
-----------------------------------
Volume ID:   5 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        87 LEBs (11046912 bytes, 10.5 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 246:6

===================================

Did you complete the initial install and want to remove them afterwards or are you installing at the moment?

During the install you can do step 6 which shows the command to remove the partitions:

for i in diagnostic1 part.old storage part.safe ; do
ubirmvol /dev/ubi0 -N $i
done

That will loop through the 4 partitions diagnostics1 ... part.safe and remove them.

After that you can do step 7 which is to run a sysupgrade that will flash the firmware to the device. I've flashed multiple MR52's and never had any issues. I guess sysupgrade is smart enough to use / expand the extra space that is available after step 6.

I have no experience with removing the partitions after the initial install (step 7) has been completed so don't know if that is possible.

Hey, thanks for responding! I've already completed all steps to flash OpenWRT on the MR52 skipping steps 6 since it was optional and I wasn't sure what to do.

I did see command listed in step 6 of the instructions. To be honest I didn't realize that was an actual command. I thought for i in diagnostic1 part.old storage part.safe ; do was an incomplete sentence lol.

I did search this topic and I did find a post where someone asked if its to late to remove the stock partition after flashing. I can't find the tread ATM but if I remember correctly @sumo responded saying it's never to late. Will see if I can find that tread again. Edit: Found the tread. Its regarding the MR42 but I assume it's the same for MR52 OpenWrt on Meraki MR42 - #118 by sumo

Thanks again for taking the time to answer my questions!

Do you have working uart and are you able to interrupt the startup to get into uboot? If so you could just interrupt uboot and tftp boot the initramfs again and continue at step 6 I guess.

You may be able to do it from the current installed system but I don't know if those partitions that you want to remove get locked / protected?

I bit the bullet and just ran the command. Re-flashed the firmware. The available space went from 8MiB to 55MiB. Yay!

Unrelated to this I'm now having the DNS problems outlined in this thread: Cisco Meraki MR52 no DNS after upgrade to 23.05.3 - #92 by sparticle. I had this working just fine yesterday after manually entering the MAC's. Looks like when I set the interfaces from DHCP to static it broke but I didn't realize it. Re-flashing the firmware removed my addons so when I went to add them back it was failing to update the list. Slowly making my way through this... Hopefully....

Great news. Yes there is a known issue / bug in the 23.05 releases with the MR52 not being able to read the mac address resulting in getting a random mac address each reboot. This bug has been fixed and should not be present any more in the upcoming 24.10 release.

I was using the latest snapshot and every was fine but for whatever reason when I ran internet speed test I was not getting full speed. Down grading the 23.5.0 was better but still not full speed. 23.5.5 however I was able to get full download speeds :confused: