I was clearing space on my router and managed to remove some important Luci files and need some help replacing them/reparing Luci

I was clearing space on my router and managed to remove some important Luci files (massive oversight, I still don't know how) and need some help replacing them/reparing Luci

Heres what it displays when I attempt to load into Luci

module 'luci.ucodebridge' not found:
no field package.preload['luci.ucodebridge']
no file './luci/ucodebridge.lua'
no file '/usr/share/lua/luci/ucodebridge.lua'
no file '/usr/share/lua/luci/ucodebridge/init.lua'
no file '/usr/lib/lua/luci/ucodebridge.lua'
no file '/usr/lib/lua/luci/ucodebridge/init.lua'
no file './luci/ucodebridge.so'
no file '/usr/lib/lua/luci/ucodebridge.so'
no file '/usr/lib/lua/loadall.so'
no file './luci.so'
no file '/usr/lib/lua/luci.so'
no file '/usr/lib/lua/loadall.so'

In [anonymous function](), file [C]
In [anonymous function](), file /usr/share/ucode/luci/runtime.uc, line 133, byte 10:
  called from function [arrow function] (/usr/share/ucode/luci/runtime.uc:141:63)
  called from function render ([C])
  called from function [anonymous function] (/usr/share/ucode/luci/runtime.uc:141:64)
  called from function run_action (/usr/share/ucode/luci/dispatcher.uc:778:34)
  called from function [anonymous function] (/usr/share/ucode/luci/dispatcher.uc:998:48)
  called from anonymous function (/www/cgi-bin/luci:39:12)

 `            die(ex);`
  Near here --------^

Ideally, I would not have to reset my device. Thank you for any help

Were you removing packages or deleting files?
If you know what you removed you might be able to recover them from /rom/
The fastest method is to reset.

By the way, you don’t save any space (in fact the opposite) deleting files that are in the base image.

1 Like

Were you removing packages or deleting files?
If you know what you removed you might be able to recover them from /rom/
The fastest method is to reset.

I was deleting files, I'll look into /rom, thanks. May I ask how to snoop around in rom for the deleted files? I'm just not sure where to even look, /rom/rom only contains a note file

By the way, you don’t save any space (in fact the opposite) deleting files that are in the base image.

Good to know, thank you. I made some space doing something, so at one point I was doing something right... lol

Nvm. I just did a reset, thanks

What type of device are you on?
I think /rom/ containing the base files is a squashfs only type thing.
I just checked my x64 device and I have the same note (I had never noticed before).

I can restore deleted files by removing the corresponding file from the overlay file system.This shows files deleted from the squashfs image:

find /overlay/upper -perm 000

When you see the files you want to “undelete” (example):

rm /overlay/upper/usr/lib/lua/luci/ucodebridge.so

And the file should reappear at /usr/lib/lua/luci/ucodebridge.so

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.