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):
Upgrade to 7.16.2
Then upgrade to 7.18.2
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
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.
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?
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”?
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-spaceincreased 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
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:
Upgrade RouterOS packages to 7.16.2.
Go to System → RouterBOARD → Upgrade and upgrade the RouterBOARD firmware.
Reboot the router again, so both the RouterOS packages and firmware are on the same version.
Upload the next RouterOS package and repeat the process for 7.18.2.
Repeat the same process to upgrade to 7.21.
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!
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.