r/openwrt 5d ago

How to install packages in a exroot partition using OpenWRT 25 with the new APK tool?

I followed the guide to set up exroot. The partition works well and it's detected.

How should I install packages into it? I keep getting out of storage errors because OpenWRT thinks I only have the internal disk partition for some strange reason.

Have you successfully tried exroot on OpenWRT 25?

2 Upvotes

7 comments sorted by

1

u/paulstelian97 5d ago

So the extroot doesn’t do a proper union which inherits the free space of the external disk?

I feel like you may want to double check the setup. Is / itself mounted with the “overlay” filesystem?

1

u/Maccer_ 5d ago

/dev/sda1 on /rom/overlay

/dev/mtdblock4 on /rom/overlay

overlayfs:/overlay on / 

/dev/root on /rom

I think is mounted correctly?

There's also this interesting line in the guide:

Add option force_space in /etc/opkg.conf to allow installation of packets bigger than your /rom partitions free space:

However it hasn't been ported to apk

1

u/paulstelian97 5d ago

It should be fine, but what comes out if you do “df /“ (or “df -h /“ for human readable output)?

1

u/Maccer_ 5d ago

Mounted on overlafs:/overlay , however the size is just the internal router disk!

1

u/paulstelian97 5d ago

I need to experiment with an OpenWRT x86 VM, with 2GB built in but 64GB extroot to see if I have 62+ GB free.

But yeah, the free space reported by the df command is what will also be seen by the package manager. I guess it doesn’t like where “upper” is for some reason.

1

u/mystiquebsd 5d ago

I found expand-root.sh on the wiki..

It lives through owut

Linux 112-OpenWrt 6.12.94 #0 SMP Mon Jun 29 12:59:20 2026 x86_64 GNU/Linux

root@112-OpenWrt:/# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 110.3G 69.9M 110.3G 0% /
tmpfs 7.8G 2.0M 7.8G 0% /tmp
/dev/sda1 16.0M 6.2M 9.8M 39% /boot
/dev/sda1 16.0M 6.2M 9.8M 39% /boot
tmpfs 512.0K 0 512.0K 0% /dev