OpenWrt Forum Archive

Topic: Need space to install package for USB storage

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

Hi,

I installed the Chaos Calmer 15.05.1 in a TL-MR3020, without problem.

but now I need to install packages to use a pen drive and install the rootfs:
https://wiki.openwrt.org/doc/howto/extroot

But I can't install the basic packages.

https://wiki.openwrt.org/doc/howto/usb.overview
https://wiki.openwrt.org/doc/howto/usb.essentials
https://wiki.openwrt.org/doc/howto/usb.storage

For example, I don't have space to install kmod-fs-ext4:

root@OpenWrt:/# opkg install kmod-fs-ext4
Installing kmod-fs-ext4 (3.18.23-1) to root...
Collected errors:
* verify_pkg_installable: Only have 176kb available on filesystem /overlay, pkg kmod-fs-ext4 needs 221
* opkg_install_cmd: Cannot install package kmod-fs-ext4.

What options I have to increase space and install the required packages?

Thank you,
Markos

Build system or Image Generator.

I would check if you have some unneeded packages installed and remove them. Once you have your usb working and can install packages there.

Max Hopper wrote:

Build system or Image Generator.

I don't understand that. Would you mind elaborating? At least a whole sentence might be helpful.

MagicSimon wrote:

At least a whole sentence might be helpful.

Use image builder to build your own image with all usb storage packages preinstalled or build whole firmware with it from scratch with buildroot.

Hi,

From what I saw generate an image using Image Generator is a much more complex step. Also I would need a machine with 64-bit system.

From what I saw during package installation attempts the system installed (Chaos Calmer 15.05.1) already has some packages, for example, I would not need to install kmod-usb-uhci or kmod-usb-ohci or even kmod-usb2. (https://wiki.openwrt.org/doc/howto/usb.essentials)

insmod usbcore
module is already loaded - usbcore
opkg install kmod-usb2
Package kmod-usb2 (3.18.23-1) installed in root is up to date.

root@OpenWrt:~# opkg install kmod-usb-uhci
Installing kmod-usb-uhci (3.18.23-1) to root...
Downloading http://downloads.openwrt.org/chaos_calm … r71xx.ipk.
Configuring kmod-usb-uhci.
root@OpenWrt:~# insmod usbcore
module is already loaded - usbcore
root@OpenWrt:~# opkg install kmod-usb2
Package kmod-usb2 (3.18.23-1) installed in root is up to date.
root@OpenWrt:~# insmod ehci-hcd
module is already loaded - ehci-hcd

Now I'm trying to figure out which packages are in the area where I can remove and which are in the area where I can not remove.

I'm would like to get a few bytes to install only the modules for storage (https://wiki.openwrt.org/doc/howto/usb.storage).

I think the command opkg list-installed show all packages installed and I don't know are removable or not.

Any tip?

Thanks,
Markos

markos wrote:

Also I would need a machine with 64-bit system.

This ain't true at all. From a hardware POV, all you need is a Linux desktop computer (32 or 64 bit) with at least 4 GB (the more the better) RAM and lots of disk space, i.e. 100 GB (the more the merrier). The CPU clock is also very important. The higher the clock, the faster your computer will compile. From a software POV, your computer will need to have a compiler (preferable GCC) and some required libraries.

Markos, if you have not figured it out yet, you can not simply delete packages that are part of the flashed image.  The only way to reduce the size is to make your own and eliminate packages you do not need.  The question then becomes what?

The TL-MR3020 is marginal spec wise for the current software (4mb/32mb) which as you have discovered takes almost the full 4mb.  There are a number of posts on this device, some of which ask the same question.  Even if you do figure this out, you will struggle with the same issue going forward if you want to do other things. 

There are a number of other devices out there that can be had for $20 - $30 delivered.  The TOH can be sorted by "Travel Router" to get you a list of what is available.  Check the supported columns and verify if it is in current, trunk or a user project (which may or may not be well supported)
https://wiki.openwrt.org/toh/views/toh_ … %5D=travel

You can get by with an 8mb/32mb device, but a 16/64 will offer you more flexibility going forward and not be much more money.

This is the least expensive GLI, which comes with OpenWrt installed and already configured for USB. 
http://www.gl-inet.com/product/gl-mt300n/

It's a trade off between Time (and skills) vs Money.  I do not know which you have more of.

Older OpenWrt versions have slightly more free space, which may (or may not) be enough for your packages.

@RangerZ: just to clarify. The problem is that the prebuild image takes basically up all the space of the TL-MR3020, right? So he is not able to at least install the usb und fs modules to make use of an usb storage device (and install some packages there)?

Only solution for that problem is the get a different device or build a smaller image on his own (i.e. with less packages included)?

Last question: Does the "removing packages with opkg is not freeing space" just referr to packages that are part of the image or to any package whether part of the image or later installed with opkg? Or worded differently: Do you (slowly) use up space if I install a package with `opkg install` and then later remove it again?

The discussion might have continued from here.