CCR2004 upgrade failed “free XXX kB disk space for a (null)upgrade” – working upgrade path to 7.21

Hi all,

I want to share a working upgrade path for CCR2004 routers that fail upgrading from older RouterOS 7 versions with this error:

upgrade failed, free XXX kB disk space for a (null)upgrade
(example: free 297 kB)

Important: This is not a normal “delete files / remove packages” issue.

If you start from RouterOS older than 7.16.2, the upgrade to newer versions (7.20 / 7.21 etc.) can fail because the router cannot stage/unpack the newer RouterOS image in the current NAND layout.

Working upgrade path (confirmed on CCR2004):

  1. Upgrade to 7.16.2

  2. Then upgrade to 7.18.2

  3. Then upgrade to 7.21

After passing through 7.16.2 → 7.18.2, upgrading to 7.21 works normally.

So if you are on something like 7.12.x / 7.13 / 7.14 / 7.15, don’t try to jump directly to 7.21, use this path instead.

Hope this helps others who hit the same issue while upgrading CCR2004.

Request / question to MikroTik developers

This issue is very confusing for users, because the router only shows the “disk space / (null)upgrade” error, but does not explain the real reason or the required upgrade path.

Could MikroTik please improve this by adding:

1) Ability to upgrade directly to a specific RouterOS version from the Package Manager / update system

(e.g. select version 7.16.2 / 7.18.2 / 7.21 instead of only “stable/testing/…”)

2) Include the NAND resize / migration script automatically in all newer RouterOS builds

Before unpacking the RouterOS upgrade package:

  • check the current NAND partition/layout size

  • if it’s too small, run the resize/migration step automatically

  • show a clear message that a NAND layout upgrade/migration is needed

3) Built-in upgrade scheduler (with optional RouterBOARD firmware upgrade)

Please add a built-in scheduling option like:

  • “install updates daily at 01:00

  • optionally include /system/routerboard/upgrade + reboot
    So admins don’t need to create a manual scheduler script each time just to do safe automatic upgrades during a maintenance window.


Hope this helps others!

Doesn't work for me

went back to 7.13.4 -> 7.16.2 -> 7.18.2 ->(tried) 7.21, fails with

log: ""upgrade failed, free 165 kB of kernel disk space""

Hmm. Officially the change to increase the reserved space for the kernel is in 7.18. The only thing I can imagine is that maybe an extra reboot would be needed?

Netinstall?

Following up, no ammount of reboots(keeping the same version), nor going back to 7.18 -> 7.18.1 -> 7.18.2 -> 7.{19,20,21} worked for me

Those will have to be removed from production (to allow for a netinstall)

I was stuck on 7.16.2, receiving an error like yours.

Try doing /system/routerboard/upgrade prior to upgrading to 7.18.2. It worked for me.

Just upgraded to 7.21.1 with no problems.

Thanks RcRaCk2k!

I am also seeing the same behaviour where no amount of reboots/different versions/automatic vs local upgrades is allowing me to get past 7.18.2. I keep seeing “upgrade failed, free 177 kB of kernel disk space”

We are now in the process of upgrading a fleet of 2004s from the last 6.49 to 7.21/7.22. They’re all in production and scattered around, some in hard to reach sites.
The process involves:

  • applying a few safeguards in order to preserve minimal connectivity
  • uploading a new configuration script (upgrading to 7.x will break connectivity)
  • do the actual update (in various steps, see below)
  • reset-configuration and run-after-reset=script.rsc

The first went straight 6.49 → 7.12.1 → 7.22.

The second had the issue in question, but we managed to upgrade it through 6.49 → 7.12.1 → 7.16.2 → 7.18.2 → 7.20.8 → 7.22 as suggested here. Which is itself a pain, but workable.

The third, is stuck to 7.18.2, and no matter what, won’t take any other version. We tried partitioning as someone suggests, we of course upgraded the bootloader on each update. No luck.

One, we can replace and netinstall. Dozens it’s a pain, a lot of work in the street at night, and a cost (and a risk of downtime).

Anyone has a definitive recipe for remotely upgrading CCR2004 that are stuck in “upgrade failed, free 289 kB of kernel disk space”?

Just had this issue with RB450Gx4

My Path was

6.47.x (i want to say 6)
7.12.1
7.22 (failed)
7.16.2
7.22 (failed)
7.18.2 (overnight - caused hotspot issue)
7.22 (failed)
7.20.8
7.22 (complete)

over 18/3/26-19/3/26

my error stated "21kb of kernel space" after 7.16.2 and "21kB disk space" for 7.12.1.

In saying that - no noted error when going 7.18.2 - 7.22 - although it failed.

Hope this helps someone.

Thanks Man :slight_smile: you help me alot to upgrade first production of ccr 2004

I found this thread after being unable to upgrade my CCR2004 beyond 7.12.1, after starting today with version 7.5. I was able to upgrade to 7.22.2 successfully through several version hops and wanted to share my notes here in case it helps someone else.

CCR2004-1G-12S+2XS upgrade path to 7.22.2 — observations

Hardware: CCR2004-1G-12S+2XS
Starting version: 7.5
Final version: 7.22.2

Automatic upgrade behavior (7.12.1 → 7.22.2)

From 7.5, the built-in check-for-updates offered only 7.12.1, not 7.22.2 directly — the staged hop behavior others have noted. 7.12.1 installed without issue via the
normal update mechanism. From 7.12.1, check-for-updates then offered 7.22.2. Both the CLI /system package update install and the WebFig Download button failed at this
step with:

upgrade failed, free 421 kB disk space for a (null)upgrade

Manual .npk SCP method

Switched to downloading specific version .npk files from download.mikrotik.com on a separate machine and SCP'ing them directly to the router's file storage, then
rebooting.

Version Result Notes
7.16.2 Success free-hdd-space increased from ~90 MB to 92 MB after this hop — consistent with the kernel partition being reorganized
7.18.2 Failed .npk was consumed (disappeared from file storage after reboot); log showed installed system-7.18.2 but /system resource still reported 7.16.2;
free space dropped to 86.4 MB — partial write, no rollback message
7.20.8 Success Skipped 7.18.2 entirely
7.22.2 Success

Summary

Working path: 7.5 → 7.12.1 (auto) → 7.16.2 (SCP) → 7.20.8 (SCP) → 7.22.2 (SCP)

Failed hop: 7.16.2 → 7.18.2 — matches reports of some units being unable to pass through 7.18.2 regardless of method.

Thanks RcRaCk2k for sharing this. I followed these instructions on a CCR2004, and they worked for me.

My router was running RouterOS 7.7, and it would not upgrade directly to 7.21.5. I followed the upgrade path mentioned here:

7.16.2 → 7.18.2 → 7.21 → 7.21.5

The only additional step I took, which I think is important, was to upgrade the RouterBOARD firmware after upgrading each RouterOS version, and then reboot again.

For example:

  1. Upgrade RouterOS packages to 7.16.2.

  2. Go to System → RouterBOARD → Upgrade and upgrade the RouterBOARD firmware.

  3. Reboot the router again, so both the RouterOS packages and firmware are on the same version.

  4. Upload the next RouterOS package and repeat the process for 7.18.2.

  5. Repeat the same process to upgrade to 7.21.

  6. Then upgrade to 7.21.5.

I downloaded each RouterOS package directly from the MikroTik website, uploaded it to the router under Files, and rebooted to perform the upgrade.

After following this process, the router is now successfully running the latest 7.21.5 long-term release.

Thanks again, RcRaCk2k. This saved me a lot of trouble!

Yes, this is very good advice. :slightly_smiling_face:

It is not entirely clear (to me) the relationship between Routerboard firmware and RouterOS version, in theory - unless the routerboard firmware is much older than OS - it should make not a difference, in practice it does in many if not most cases.

Hence Rule #9:
The twelve Rules of Mikrotik Club