/dev/root files system has no available space after OpenWrt 22.03 install
-
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
.config
file and regenerate it from scratch.
After new build with fresh new.config
file, 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:
cd
git clone https://github.com/openwrt/openwrt.git source-owrt22
cd source-owrt22
make menuconfig
Make changes as follows:
Target: MediaTek Ralink MIPS
Sub Target: MT76x8 based boards
Target Profile: Onion Omega2+
Exit and save
make -j8Once complete transfer the image to the device:
scp bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-onion_omega2p-squashfs-sysupgrade.bin root@192.168.1.246:/tmpFrom the device:
cd /tmp
sysupgrade -n openwrt-ramips-mt76x8-onion_omega2p-squashfs-sysupgrade.binThis 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
overlayfs:/tmp/root
- 1.5M
Mine isoverlayfs:/root
- 59.8MWhat 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.
Here's mine.
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 -h
as soon as possible after system boont.
It seems like I could run it only after thejffs2
dmesg 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.bin
the 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 withpython3-light
package, 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
python3-light
package.
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.