OpenWrt Forum Archive

Topic: Can't install Nano after upgrade

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I've upgraded a Buffalo WHR-HP-G300N from 15.05. to 15.01.1. Despite the "keep settings" was checked, nano wasn't kept (it was the only additional software, as the space is quite sparse for installations here). I intended to add the package later on, but it won't install, saying there's not enough space:

The UI (under System/Software) says at the top: Free space: 9% (36.00 KB)

If I try to install it in the shell, I get the following output:

Installing nano (2.4.1-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/nano_2.4.1-1_ar71xx.ipk.
Installing libncurses (5.9-2) to root...
Collected errors:
 * verify_pkg_installable: Only have 36kb available on filesystem /overlay, pkg libncurses needs 117
 * opkg_install_cmd: Cannot install package nano.

Have the relevant packages grown since 15.05, or could there be some leftovers from previous installations I can clear manually to free up space for this?

Unfortunately that didn't help (or wasn't related). I tried working with "vi" then... Something has definitely changed in this regard since last update, because I also can't modify dnsmasq.conf. df -h shows this:

Filesystem                Size      Used Available Use% Mounted on
rootfs                  384.0K    348.0K     36.0K  91% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.0M      1.1M     12.9M   8% /tmp
/dev/mtdblock5          384.0K    348.0K     36.0K  91% /overlay
overlayfs:/overlay      384.0K    348.0K     36.0K  91% /
tmpfs                   512.0K         0    512.0K   0% /dev

Whereas before (in December at least) I had this:

Filesystem                Size      Used Available Use% Mounted on
rootfs                  448.0K    396.0K     52.0K  88% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.0M    504.0K     13.5M   4% /tmp
/dev/mtdblock5          448.0K    396.0K     52.0K  88% /overlay
overlayfs:/overlay      448.0K    396.0K     52.0K  88% /
tmpfs                   512.0K         0    512.0K   0% /dev

Back then I was able to edit /etc/dnsmasq.conf directly. Now it reports "read-only file system", so I tried editing /overlay/upper/etc/dnsmasq.conf, but I wasn't able to save it ("no space left on device"). What could be wrong here?

Two more specific questions:

- Why can't I save the modified /overlay/upper/etc/dnsmasq.conf file even if the modified one is smaller in size than the original (e.g. when I delete a few lines from it)? It would still say that there's no space left on the device.

- Is there any way to resize partitions so that /overlay gets more space (say from /tmp which has plenty)?

valhalla123 wrote:

- Why can't I save the modified /overlay/upper/etc/dnsmasq.conf file even if the modified one is smaller in size than the original (e.g. when I delete a few lines from it)? It would still say that there's no space left on the device.

- Is there any way to resize partitions so that /overlay gets more space (say from /tmp which has plenty)?

Flash memory is handled typically in blocks of 64 kB (or something). You get the error message because the "overlay" file system does not have enough space for operating. It needs a few erase blocks to operate.

There is no way to resize partitions for your needs. "tmp" is in RAM, not flash.

I think that your best option is no navigate directly into /overlay/upper (that is the overlay that you see as / ) and then find something to delete. Some settings files from /overlay/upper/etc, or installed libraries from /overlay/upper/lib, or...) and then reboot the device.

Other option is to delete all installed packages and settings with "firstboot" and to revert into the clean flashed firmware.

(If you have space constraint, you should either compile the firmware with packages included or use the image generator to include the packages in the image to be flashed. The packages included in the firmware are compressed, so they take less space than if they are installed with opkg later.)

(Last edited by hnyman on 2 May 2016, 10:49)

Thanks, I'll give it a shot. On a related note - if a router has 8 GB flash, then there will be enough space for the custom blacklist in /overlay?

valhalla123 wrote:

On a related note - if a router has 8 GB flash, then there will be enough space for the custom blacklist in /overlay?

Any response to the unrelated (and cleverly rhetorical) question is completely uninformed.

Actually, it's neither rhetorical nor unrelated. A few days ago when I was searching the forum (and the net in general) for clues about my issue, I encountered somewhere that 4 GB units have overlay space problems. And as I'm also contemplating migrating one 8 GB router to OpenWRT, I would prefer to hear it in advance whether those units are better off in these matters (I know it lacks in NVRAM space with dd-wrt, though).

4MB works for custom images, though I'd suggest a unit with at least 8MB flash and 32MB ram for use with openwrt.

valhalla123 wrote:

... I encountered somewhere that 4 GB units have overlay space problems.

Remarkable. Winbond has yet to ship her stacked 512MB chip and is contemplating 1 and 2GB MTDs.

Megabytes! I meant megabytes, yeah. big_smile Finger muscle memory or something, as I've been examining some tablets and "GB" has been practically in my fingernails.

The discussion might have continued from here.