How to upgrade to a larger "kernel partition" on WRT1900ACv1

I have 19.07.2 on an WRT1900ACv1(mamba) and want to go to the latest release, (currently 21.02.3).

(I think) I have discovered that the kernels in the days of the 19.x.x series releases were 3mb in size, but the 21.x.x kernels are 4mb in size. And because of this, I can not simply use sysupgrade's .bin files to update to 21.

According to :
mtd4 contains the primary kernel and mtd5
mtd5 contains the primary rootfs, rootfs1
mtd6 contains the alternate kernel and mtd7
mtd7 contains the alternate rootfs, rootfs2

According to fw_printenv, I was booted into the alternate kernel and rootfs all this time. And I installed the luci advanced reboot plugin, which confirmed the same.

So. I downloaded the factory img file from to my 1900ac, and wrote it to mtd4:

root@AP0:~# wget ''
Downloading ''
Connecting to
Writing to 'openwrt-21.02.3-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-factory.img'
openwrt-21.02.3-mveb 100% |*******************************|  8192k  0:00:00 ETA
Download completed (8388608 bytes)
root@AP0:~# mtd unlock /dev/mtd4
Unlocking /dev/mtd4 ...
root@AP0:~# mtd erase /dev/mtd4
Unlocking /dev/mtd4 ...
Erasing /dev/mtd4 ...
root@AP0:~# ls
root@AP0:~# mtd write openwrt-21.02.3-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-factory.img /dev/mtd4
Unlocking /dev/mtd4 ...

Writing from openwrt-21.02.3-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-factory.img to /dev/mtd4 ...     
root@AP0:~# mtd verify openwrt-21.02.3-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-factory.img /dev/mtd4
Verifying /dev/mtd4 against openwrt-21.02.3-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-factory.img ...
5925246cb97565502afcefbca64cf455 - /dev/mtd4
5925246cb97565502afcefbca64cf455 - openwrt-21.02.3-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-factory.img

Then I refreshed the advanced reboot plugin's page and it recognized version 21 was on the primary partition and I clicked the button to boot into it........
after ten minutes it seems to not have recovered.

I followed the power button procedure to get uboot(?) to switch back to the alternate firmware and that worked. I was able to get the AP back online running 19.x.x. But what was wrong with using mtd the way I did?

Should I have downloaded the kernel and wrote that to mtd 4 and then the factory image to mtd5?

Should I manually reconfigure some part of uboot to tell tit he kernel in mtd4 is now 4mb?

Trick is:
use OpenWRT Luci web GUI to upgrade
do not keep settings
flash the factory image, not the sysupgrade.

1 Like

Like Pico already said,

So, here at the bottom of http://ap0/cgi-bin/luci/admin/system/flash where it says:

Upload a sysupgrade-compatible image here to replace the running firmware

click it and select the factory .img file ( ) instead of sysupgrade bin file ( )?

  1. Do I understand you correctly?

  2. Am I mistaken to think that a factory.img file is not a sysupgrade-compatible image?

  3. and then uncheck keep settings and check force?


  1. Should I have to force?
  2. Does it prompt to force because the format of the image being uploaded 4mb(kern)+36mb(fs) doesn't match what's currently running 3mb+37mb? or some other reason?

Sorry for all the questions. I just really want to understand this process better and create some helpful documentation for the next user in my shoes (or myself in 3 years)

The original work thread.. You have it correct, there is a new config update which tells the sysupgrade where things are at; commit.

1 Like

well, I used the sysupgrade button to install the factory.img file and it seems to have worked.

As expected, I lost all my settings, and had to connect with wired ethernet to set up the device since openwrt has all radios off by default.... grumble... But after some fiddeling, my settings are keyed back in and the AP is up. thank you @Pico and @hnyman

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