How to make an imagebuild from my current configuration?

I have no problems using the imagebuilder for my GL-MT1300, but I want to add al the (config) files and packages so that my build is exactly like my current config.

I do edit the images.json file, and did add the packages I installed, like nano and openssh-sftp-server for example, next I added the files directory to the jeson file.

It compiles fine, without errors, but I miss some files, because the firmware I compiled is missing settings.

What directory’s I need to add to make this work? offcourse /etc, but what more do I need to add?

Do you mean the static files in /etc/ you want to add?

When using imagebuilder, you can specific a “file” path to include all your static files.

Hi @alzhao I know how to add the files path in the json file, also how to add more packages in the build that I wand. (like nano luci-app-mwan3 openssh-sftp-server etc.) So that is not the issue.

The issue is that I’m trying to find out what files I need to add/copy from my running system to make a build that is the same as my running system.

The need voor this is because the router is in my other house, and if someone there is hitting the resetbutton for more then 10 seconds, the default it falls back to, is then my own build and no configuration is needed after that.

thanks for your reply :wink:

Actually the correct way to do this is: just compare the two firmware and find out the differences, when they are running.

You should check the old firmware’s overlay to understand what is your modifications after firmware boot

Generally you should check more details on /overlay/upper/etc/config

You should focus on checking the details of each file to see if it is necessary to have them in your firmware.

Generally you should focus on
/etc/config/network: network, vlan, wan, lan, etc.
/etc/config/wireless: wifi ssid and key
/etc/config/firewall: ports, nat rules
/etc/config/dhcp: dhch and dns
/etc/config/glconfig: gl specific settings, e.g. login password and cloud
/etc/shadow: root password

For others, they are just for specific applications. You need to check each application to see if you want to hardcore settings.

1 Like

Almost done.

Only Luci won’t start if I put it in the build (in the json file) I have to manual install it from the plugin page.

So it’s not installed from the build as it seems.

(and I missed some dns settings, but they probably in the dhcp files)

When you install luci, record down the packages and compile in your firmware.

Then check what is the real problems if it fails to start and fix it.

Thanks, it was only package luci-mod-rpc what was needed.