[USB DEVICE PROBLEM] package installed on the usb device missing the LUCI page

Hello guys, my router(Xiaomi mini MT7620) is running out of space, so i want to install a usb device to storage the file and the software.

After i insert my usb stick, the mount point page shows it and mout it to /mnt/sda1
and then ,i change my /etc/opkg.conf file to:

dest root /
dest usb /mnt/sda1/optware     ----- here is where i want to install my ipk package 
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay

also the /etc/profile file to:

export LD_LIBRARY_PATH="/mnt/sda1/optware/usr/lib:/mnt/sda1/optware/lib"
export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/mnt/sda1/optware/usr/bin:/mnt/sda1/optware/usr/sbin

//This is the LD_LIBRARY_PATH and the PATH

and then i source the profle.

After this ,i try to install some package to the usb device via command "opkg install xxx.ipk -d usb" and it successed and i can see those packages on the "Software" page.

The only question is : THE PACKAGE'S LUCI PAGE IS MISSING!!
if i just install it on the flash(default option) , the luci page will show up after i refresh the broswer, but when i install it on the usb device ,it cant normally show up .
checking the /mnt/sda1/optware ,it DOES HAS luci folder and inside it with "controller" "model" "view" folder

How can i make the package's luci page which i installed on the usb device shows normally at the luci interface?

THANK YOU!

Not an expert on this but I think what you are experiencing may be the actual issue with your method. The best way is to use the USB as overlay and then you can install everything on the USB and it should work completely fine as it does for flash. In short you need to have a ExtRoot on your router.

4 Likes

Does that means the whole system is move to the USB?Or the /overlay partition?

The /rom area is what you flash to the router and /overlay is everything after flashing. So in that case it will be everything you did after flashing your router the last time and to answer your question yes only overlay will be copied to the usb.

After setting up the ExtRoot your router's overlay will increase with the size of your usb because you will be mounting your usb as /overlay and then everything will be going to usb as if it was actually the flash of the router but bigger.

Is everything clear now?

I thought about the method issue you mentioned, and I realized maybe cuz luci configuration can't not auto combine the config on the flash and the config on the USB ,so when I install package on the flash ,it works completely fine ,but when I install package on the USB ,I need to add the new package's luci configuration to the config file that om the flash .
After that luci will show new page for the new package .

   Summary:

By default, LUCI read configuration form the file that located on the flash ,and LUCI can't auto combine muti-config file .
So when I install package on the USB ,though it is installed and it can work fine .BUT I need to add the new package's luci configuration to the default luci config file to display the new luci page .

Am I correct?

I am not sure about that because no expert in that area but you should really consider using ExtRoot in your case. Then you can install whatever you want and it will work as it works in flash and you do not need to further do anything else to make it work.

As I understand the system has been designed to run from /rom and /overlay so it will be very difficult to run it from a different mount point.

1 Like