Openwrt Storage Space

0 views
Skip to first unread message

Katina Piccirilli

unread,
Aug 5, 2024, 12:06:09 PM8/5/24
to digeforfa
Ijust installed OpenWrt on a LibreRouter v1. Most of the storage space is assigned to /tmp. Very little is assigned to /overlay and this means that I cannot install the software I want. How can I modify the partition scheme in order to have more space for software? I think 1 MB more would be enough.

However, as @eginnc noted, you may be able to achieve your goals by including the additional packages in the image (using the image builder). Likewise, you can remove packages you're not using via the same image builder process...


No space left on device Issue: When trying to install a package, you get the error message No space left on device Root cause: Too little space available on your device's flash. (happens easily on devices with only 4MB flash or 8MB flash) How do I...


And of course, you could opt for extroot since your device does have USB ports... personally, I'd opt for that if you can't fit everything per the above -- it is the option with essentially zero risk (messing with the partition table could be problematic if you accidentally wipe out the ART data (factory calibration) and/or you may always need to build customized images based on some modified code to leverage a different partition layout.


Open question: When did this change in /overlay's structure happen? LEDE-17 is OpenWrt-CC's successor and I have no systems runnig OpenWrt at hand. So If you need this on OpenWrt-BB or -CC, have a look inside /overlay first.


Comparing my script results to yeti's revealed differences.It's because he referred to /overlay/usr/lib/opkg/info while I thought that the /overlay prefix is unnecessary. Well, I don't fully understand why, but /usr/lib/opkg/info gives also the system packages, while /overlay/usr/lib/opkg/info gives only the user's packages.


This answer is an improved version of Zvika's answer. Since the source-code is substantially different, I believe it is better to add it as an additional answer, instead of an edit of the original one.


These were the "big" files in my LEDE install. I needed some extra space on my router so I could format, partition, and mount some USB storage space. Adjust +500k to a file size that better suits you.


Put DIP switches to 0100 (eMMC) and packages storage should nowbe 1Gb, which is more than plenty. Probably best to run firstinstallfirst to factory reset everything, then install autopart and uvolto have the system create a separate LVM partition in the remaining6Gb of space, this can be formatted as f2fs and used as long termstorage e.g. sensor readings. Configuring it as a samba share isuseful.


I'm trying to use my OpenWRT, with a 2TB Hard disk attached, automatically sync my Google Drive files to it. When I try to do it, I get several errors of files that couldn't be copied with error message "No space left on the device".


My guess is that the internal storage of the device only has 120 MiB, and in some way, rclone is caching first the files into internal storage and then transferring (I tried some commands as shown below). I don't know if there is a way to fix this.


OpenWrt has a package available for CloudShark that allows for capturingand uploading to www.cloudshark.org or a local CloudShark appliancethrough the web based user interface. This makes it easy to generatenetwork captures to troubleshoot issues.


Once OpenWrt is installed on your device you can install the CloudSharkpackages right from the web interface. Click on the Software buttonunder the System drop down menu.


If you are using a hosted account using www.cloudshark.org afterinstallation just login to your CloudShark account and browse toPreferences -> API Tokens to find your API Token. Then on theCloudShark page on your OpenWrt device paste this API Token into theCloudShark API token field under Options.


First create an API token to usefor your OpenWrt device. You can use this API token to assign thecaptures you upload to a specific user and optionally tags that youwould like the uploaded captures to have.


If you have setup HTTPSaccess on your CloudShark appliance and are using self-signedcertificates please see the Configuration File section to see how todisable certificate validation against the installed CA certificatebundle.


To perform a capture select an interface and click Start Capture.Once you are done capturing click Stop Capture. Your capture filewill be automatically uploaded to www.cloudshark.org and a link to yourcapture will appear under Capture links.


You can also configure your capture to stop after a specific number ofseconds, packets or bytes have been received. Specifying any of these as0 will capture indefinitely until the Stop Capture button isclicked. The size of capture files may be limited by the amount ofavailable memory or disk space. See the section on Capture File Sizefor more information.


If your wireless driver supports putting an interface in monitor modeyou can use it to capture 802.11 management packets. The CloudSharkWireless Networks analysis toolcan then be used to view a statistical report of the wireless networksthat were broadcasting during the capture.


The token and url settings are for uploading your captures to yourown CloudShark appliance. See the Appliance Configuration sectionfor more information on these options.


The ca and ca_verify options control how the device validatescertificates when uploading captures over https. To change thecertificates to validate against, upload a new certificate and changethe ca option to the location of the new certificate. To turn ofcertificate validation completely change the ca_verify option to 0.


As a capture is running a temporary capture file is create in the/tmp/ directory and once the capture is done this capture file isuploaded to CloudShark and deleted. The dir option can be used tochange the directory that these temporary captures are stored.


Many of the embedded devices that will be running OpenWrt have a smallamount of storage space. Because a temporary capture file is stored onthe device itself this will limit the size of the capture that may beperformed. The network capture will stop automatically when the deviceruns low on disk space. The capture is then uploaded to CloudShark andthe temporary capture file is deleted.


The CloudShark package for OpenWrt also supports saving its temporarycapture files to a USB storage device to allow for larger captures. Toperform this first you will need to configure your OpenWrt device forUSBstorage.Once this is complete you can specify a new directory to save temporarycapture files to by following the instructions in the ConfigurationFile section.


Note that you may run into issues when performing very large capturesdue to the limited memory on many OpenWrt devices. In this case theCloudShark package may run out of memory when trying to upload thecapture to a CloudShark appliance. If you are running into issues whileperforming large captures consider adding a swap partition to your USBstorage device. The OpenWrt wiki includes anexampleof adding a Linux swap partition using a USB drive.


The storage is pre-loaded with the OpenWrt embedded Linux distro, so getting started is as easy as plugging in a Micro USB cable for power and taking a few minutes to go through the browser-based setup wizard.


A common theme we heard from our users of previous Omega iterations was that they felt constrained by storage space. The gigabytes of storage on the Omega2 Pro will allow you to build rich, modern applications, with plenty of space to hold libraries, assets, media, and more.


The Omega2 runs an Onion-customized version of the OpenWRT Linux operating system. Since there is a full Linux OS running on the Omega, users are not limited in their choice of programming language. Supported programming languages include:


An on-board battery management chip makes the Omega2 Pro compatible with LiPo batteries: they can be used as the main power source, and will be charged when the Omega is connected to USB power. Use a battery to make your project portable, or to act as a back-up power supply.


I tried to recycle an old TP-LINK TL-MR3020 by installing andconfiguring OpenWrt on it. This turned out to be a bit challengingbecause it has only 4M disk space and 32M RAM. Even the OpenWrt sitedoes not recommend it anymore( -link/tl-mr3020). To extend the disk spaceI used a USB disk, but this is challenging too, because the standardOpenWrt image for TP-LINK TL-MR3020 does not contain the drivers forreading it, so a custom image has to be built, which contains thesedrivers.


Then try it again and the router will start flashing the new image toits storage and will reboot. If everything goes well you should beable to ping to 192.168.0.254, which is the default IP of theflashed image. You can also open withoutpassword and access the greenish interface of the router. (If it asksfor a password, then try username 'admin' and password 'admin'.)


You will notice that the native storage is very limited and you cannotharness the full power of OpenWrt with so little storage. Plugging aUSB stick to the router doesn't work because the necessary driversare missing. If we follow the instructions on this page we have tobuild a new image upgrade that contains these drivers and install it.If we had more disk space (for example 8MiB) we could have installedthe needed drivers from the internet, like this:


If the image build was successful, you will find onbin/targets/ar71xx/generic/ the images lede-*-factory.bin andlede-*-sysupgrade.bin. Let's copy the sysupgrade image to the routerand upgrade the system:


On a linux system, we can partition the USB stick (for example usingfdisk) to have a swap partition of 512MiB, and the rest of it anext4 partition. We can plug this USB on the router and continue theconfiguration like this:

3a8082e126
Reply all
Reply to author
Forward
0 new messages