/dev/root files system has no available space after OpenWrt 22.03 install
I built OpenWrt 22.03 and flashed into Omega2S+ using
But after installing, I found that I could not install any additional packages due to low disck space.
I checked with
ducommand and the result was like this.
root@OpenWrt:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 13.3M 13.3M 0 100% /rom tmpfs 28.1M 68.0K 28.0M 0% /tmp /dev/mtdblock6 512.0K 232.0K 280.0K 45% /overlay overlayfs:/overlay 512.0K 232.0K 280.0K 45% / tmpfs 512.0K 0 512.0K 0% /dev root@OpenWrt:~#
I also tried
sysupgrade -p image.binto reset partition table.
But not successful.
How can I solve this issue?
Is there anything I missed for
@DumTux Here is my df -h on OpenWrt 18
the edited part is an SDCARD so ignore that. As you can see my use % is more than yours. So the two issues I would look at is a) is your file system read only; b) where is opkg trying to install packages.
You can look in /proc/mounts for the r/w status of the mounted file systems or use the mount command
Check /etc/opkg.conf to check where it is trying to install packages. Also you try opkg -V3 or -V4 package-to-install this will spit out a load of debug info that will help you understand what it is trying to do.
It would be useful to understand how you are concluding that you are out of space, is it an error message? What commands are you using when you receive this error?
When I was trying the build image with 2022/10 updates, there was ~10MB left space under
But after I pull and rebase the recent updates from OpenWrt GitHub source, the left space for
/became 280K just afterinstallation.
Though the usage percentage of
/is 45%, smaller than yours, your
/is 20M, mine is 512K.
@DumTux Ok sorry I misunderstood. Check in make menuconfig in target images -> squashfs for the block size, it should be 256
Not at all.
Any talk is worthful to clarify the problem.
I'll try it soon and will post the result here.
After some tryings, I decided to delete the
.configfile and regenerate it from scratch.
After new build with fresh new
.configfile, I set the target as Omega2+ and the result is like this.
root@OpenWrt:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 12.3M 12.3M 0 100% /rom tmpfs 28.1M 64.0K 28.1M 0% /tmp /dev/mtdblock6 1.5M 232.0K 1.3M 15% /overlay overlayfs:/overlay 1.5M 232.0K 1.3M 15% / tmpfs 512.0K 0 512.0K 0% /dev root@OpenWrt:~#
This got better.
As the root filesystem has 1.3M free space.
But where's all the 64MB flash memory of Omega2+?
Before, there was 6~10MB of free space, so I didn't even care about the total memory.
@DumTux I took a new Omega2+, plugged it into a expansion dock and connected it to my wifi.
This is how I built the firmware from scratch:
git clone https://github.com/openwrt/openwrt.git source-owrt22
Make changes as follows:
Target: MediaTek Ralink MIPS
Sub Target: MT76x8 based boards
Target Profile: Onion Omega2+
Exit and save
Once complete transfer the image to the device:
scp bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-onion_omega2p-squashfs-sysupgrade.bin firstname.lastname@example.org:/tmp
From the device:
sysupgrade -n openwrt-ramips-mt76x8-onion_omega2p-squashfs-sysupgrade.bin
This is the resulting file system:
Are you doing anythign different to these steps?
That's quite interesting.
I am working on the v22.03 branch of the repository.
I also did similar things like you.
Nothing touched on the partitions section.
I padded some Python related packages and kernel modules for drivers.
Thus, my image size is 12MB, which is quite bigger than the default size 3.3MB like yours.
However, I don't think this package selections will affect to the
/overlay filesystem size.
Your root filesystem is
What configuration can make this difference in config?
@DumTux What u-boot version is installed? I'd like to see the output of dmesg, preferably as an attachment (use .bin extension) or a link to a pastebin or drobox etc
Check your /etc/mtab , here is mine, I suspect your overlayfs line is not the same:
/dev/root /rom squashfs ro,relatime 0 0 proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0 cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0 tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0 /dev/mtdblock6 /overlay jffs2 rw,noatime 0 0 overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0 tmpfs /dev tmpfs rw,nosuid,noexec,noatime,size=512k,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,noatime,mode=600,ptmxmode=000 0 0 debugfs /sys/kernel/debug debugfs rw,noatime 0 0 none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,noatime,mode=700 0 0
@crispyoz thanks for following up.
It is certainly different as you're saying.
root@OpenWrt:~# cat /etc/mtab /dev/root /rom squashfs ro,relatime 0 0 proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0 cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0 tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0 tmpfs /tmp/root tmpfs rw,noatime,mode=755 0 0 tmpfs /dev tmpfs rw,nosuid,noexec,noatime,size=512k,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,noatime,mode=600,ptmxmode=000 0 0 debugfs /sys/kernel/debug debugfs rw,noatime 0 0 none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,noatime,mode=700 0 0 /dev/mtdblock6 /overlay jffs2 rw,noatime 0 0 overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0 root@OpenWrt:~#
@DumTux I found some funky stuff with the jffs2 file system on OpenWrt 22 that I don't have any issues with OpenWrt 21. I'm looking into it to see if I can find the root cause, keeping in mind that OpenWrt 22 is not currently supported by Onion.
Your file system is actually the same as mine except the sizes vary and the version I posted is prior to the jffs2 file system check completing.
Try running sysupgrade with -p option which causes sysupgrade not to preserve the partition table. Run df -h after boot then wait until you see the jffs2 message in the console:
jffs2: notice: (1513) jffs2_build_xattr_subsystem
Then run df -h again and post both results.
I tried to run
df -has soon as possible after system boont.
It seems like I could run it only after the
jffs2dmesg is logged out.
root@OpenWrt:/# dmesg | grep jffs2 [ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2 [ 0.308642] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 6.891343] jffs2: notice: (435) jffs2_build_xattr_subsystem: complete building xattr subsystem, 6 of xdatum (0 unchecked, 1 orphan) and 7 of xref (1 dead, 0 orphan) found. [ 6.909096] mount_root: switching to jffs2 overlay root@OpenWrt:/# df -h Filesystem Size Used Available Use% Mounted on /dev/root 13.3M 13.3M 0 100% /rom tmpfs 28.1M 64.0K 28.1M 0% /tmp /dev/mtdblock6 384.0K 220.0K 164.0K 57% /overlay overlayfs:/overlay 384.0K 220.0K 164.0K 57% / tmpfs 512.0K 0 512.0K 0% /dev root@OpenWrt:/#
Here's update again.
I decided to clean everything and configured via menuconfig again.
And after that,
sysupgrade - p sysupgrade.binthe result became quite different.
root@OpenWrt:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 10.5M 10.5M 0 100% /rom tmpfs 28.1M 60.0K 28.1M 0% /tmp /dev/mtdblock6 3.3M 288.0K 3.0M 9% /overlay overlayfs:/overlay 3.3M 288.0K 3.0M 9% / tmpfs 512.0K 0 512.0K 0% /dev root@OpenWrt:~#
I think this is quite back to the original state before I started this post.
As there was 3MB available overlay space, I didn't realize any space limitation then.
3MB is usable and enough for my application.
But I am still curious why I was facing different result for every build.
I carefully configured to not touch anything I don't know accidently.
All I did was just selecting the target as Omega2+, and selecting some Python packages.
@crispyoz disk information shows 59MB available on overlay space.
Mine was 384K or 512K, and now 3MB.
This post is deleted!
@DumTux since jffs2 is a compressed file system, the capacity may vary depending on what is installed. Since python packages are large it is not uncommon for python to fill up your device. I'd be interested to see your file system after you followed my process step by step. We should have the same result.
Yes, the result was almost same as yours.
I think I found why it was like so.
It was because I was installing Python3 full version.
After I carefully pick packages with
python3-lightpackage, the image size dramatically decreased below 10MB. And the overlay space became more than 8MB.
The problem is, until OpenWrt 22.03 of 2022/9, the total image size with full Python3 installation was 10~13MB. But after pulling 2022/10 updates at this time of writing, the image size with full Python3 installation became 13~16MB, which resulted almost no space left on flash memory after upgrading.
Anyhow, I now can use my Python applications (mainly async websocket and API servers) with
Thank you for all your support.
@DumTux Yes python can be huge, python light is a better option. You can always add an SD Card to add capacity.