Hello everyone
So I'm new to OpenWRT and not intelligent enough to make sense of the image builder (spent around 8 hours got nowhere).
So I have a collection of dumb AP's and have a record of breaking things so factory resets can happen fairly frequently, I'm wondering if I do away with DHCP, the firewall, ipv6 and anything else I don't need along with installing Luci and then do an attended system upgrade will the new firmware then have these things disabled or enabled when I do a factory reset?
Yea, as long as you want a dumb AP this works but…
DHCP for ipv4 package is actually called: dnsmasq
Ipv6…that is doable but ipv6 as a function can only be done if you build from source but the setting ipv6=on/off hangs by the tread so it is probably easier to live with it in the background. What you can do is to remove the ipv6 packages that handles ipv6 dhcp server leases and turn off ipv6 in the interfaces. Remove WAN6 zone and in the the network config under device turn off ipv6.
But your big problem is the firewall because that is a dependable to luci. So you can remove the firewall but then you have to include luci-base and pick the luci packages you want to have.
The thing with reset is that you only reset to the original firmware you installed. So if you make a mistake in the imagebuilder a reset will not save you. A serial connection will.
These packages can be removed on a installed system at first so you can start by simply turn the actual services off and see if it works for you before building a firmware without these packages.
I have the access point working without DHCP firewall, ipv6 etc
I'm more curious if as I originally asked would a attended system upgrade (new firmware act as a pseudo image build) So remain in that state after a factory reset.
Just to get a summary of what you are trying to or have accomplish(ed):
1 You did succeed creating an image with the "online" imagebuilder for your DUMP AP(brand/model)? Please post the "custom package selection" and or scripts you added.
2 Doing a upgrade of a customized (image builder) based OpenWrt router may require a updated version of the customized image...
2a Which can be build yourself by using the imagebuilder?
2b Or by the "online" image builder?
2c By using the L.ASU with someone else its imagebuilder?
2d By using the L.ASU with own image building server?
3 Pseudo image build please clarify? A factory reset would just if you used squashfs image bring it back to the config state you defined at point 1.
If you might include a script at point 1 with uci commands
for config options it may be restored by factory reset?
Hey Walter
Sorry I only understood half of that.
So I have a tplink eap265hd running on eap245v3 firmware, I've loaded image builder onto a Ubuntu VM and tried to compile firmware with no luck.
I'm currently using a up-to-date firmware from the Luci attended system upgrade package with dumb ap settings, disabled Dnsmasq, firewall, ochpcd.
I'm still very much a novice when it comes to networking so whilst trying to learn I tend to lock myself out alot so the reset button is a close friend.
I'd like to be able to reset my device and not have to disable these settings and install packages everytime.
That's the jist of it I'm struggling with one device and I have alot more on the way so finding an solution that I can use easily is what I'm after.
What is this online image builder you speak of? Would an idiot have better luck than the installed version?
Ok so the online image builder is more my speed now I just need to work out what packages I want and what script to use for my IP settings.
Thankyou walter
Can anyone tell me if my package selection looks ok?
ath10k-firmware-qca99x0-ct base-files busybox ca-bundle -dnsmasq dropbear -firewall fstools -ip6tables -iptables kmod-ath10k-ct kmod-ath9k kmod-gpio-button-hotplug -kmod-ipt-offload libc libgcc libustream-wolfssl logd uhttpd uhttpd-mod-ubus luci-mod-admin-full luci-theme-bootstrap -luci-app-firewall luci-app-opkg -luci-proto-ppp libiwinfo-lua -luci-proto-ipv6 rpcd-mod-rrdns mtd netifd -odhcp6c -odhcpd-ipv6only opkg -ppp -ppp-mod-pppoe procd swconfig uboot-envtools ucert uci uclient-fetch urandom-seed urngd wpad-basic-wolfssl
I'm hoping this list works for an idiot like myself
You probably already found an online image builder?
Because of your post I didn't even knew about 'asu' although I use it from aparcar.org so in the end we all learn something.
Could you please edit/wrap your "package customisation" text styling between a set of Grave accent
` so its more readable and don't break up the - dashes within package names.
So far I would start from the defaults and you probably don't need any ipv6 odhcpcd ppp/pppoe uhttpd stuff (don't know your exact needs).
If you start with defaults which I would suggest again for once, use the luci webinterface to setup your custom ip/adapter/vlan/wifi/ssid settings and look in the TOP RIGHT corner of the luci webinterface BEFORE you apply your changes/settings. Because you will see all the "uci commands
" that are needed to put in "your script" for your image. Copy paste them in plaintext file and you may have a great change it will automatically setup your custom online imagebuilder image with your settings by default and survive a factory reset but do use Squashfs!
I didn't break anything I thought the - before a package indicated an exclusion.
Thanks for the code edit tip.
I've only compiled the image so far as I'm waiting for a good day to do it when my wife doesn't need the WiFi for work.
Many thanks Bowen.
Rather than doing the - for exclusion can I just remove it from the text then?
So it would look like this:
ath10k-firmware-qca99x0-ct base-files busybox ca-bundle dropbear fstools kmod-ath10k-ct kmod-ath9k kmod-gpio-button-hotplug libc libgcc libustream-wolfssl logd uhttpd uhttpd-mod-ubus luci-mod-admin-full luci-theme-bootstrap luci-app-opkg libiwinfo-lua rpcd-mod-rrdns mtd netifd -odhcp6c opkg procd swconfig uboot-envtools ucert uci uclient-fetch urandom-seed urngd wpad-basic-wolfssl
Ok so tomorrow according to tracking one of my Comfast ew72 outdoor AP's arrive. so I'll use it as a guinea pig and test the process out, all going well that should give me some practice for the expensive version of the Tp-Link 245v3 (yes I know I paid extra for a 265 which I then flashed away what was the price difference).
Anyway thanks for everyone's help I'll report back tomorrow after the test.
If you have all the "uci commands
" in a text file, apply them manually yourself using ssh on a clean image and see if it has the desired effect on your config.
Maybe you have to split the uci parts in multiple sets of commands and commits with some sleep time before it may finally put everything to its place. Than you may wrap a shebang at the beginning of text file and then you have a script.
#!/bin/sh
/bin/sleep 5 #wait 5 seconds
#some commands may need absolute/global filesystem path
#/usr/bin/exampleprogram argument
#/usr/sbin/exampleprogram argument
uci command a
uci command b
uci commit
/bin/sleep 5 #wait 5 seconds
uci command x
uci command y
exit 0
Test that script on a clean image with ssh/scp, than finally include the tested/working script in the asu image builder recipe. However I'm not sure if you just copy the uci commands from your script in that asu webpage or also the actual beginning and ending shebang/exit0 syntax. See other users with more experiance: Custom script to run on first boot using linux builder - #15 by u251
So if anyone is interested with the answer to my original question it's YES after a factory reset any packages installed via Luci-attended-sysupgrade persist with a reset. I smoked a load of jazz cabbage yesterday and messed up my router late at night, so this morning i did a factory reset only to find my packages persisted. I'm still going to image build and strip it down properly but the Luci package does work in the same way as a image build.
1 Like
So with no great surprise to my wife, my 1st image build bricked the device and it seems the pins are labeled slightly different to the eap245 I'll get a multimeter out later and test unless someone can help me out
Ok so I'll open a new thread I guess might be a better source for others
What are the sleep times supposed to do in a setup script?
My biggest setup script for my devices have about 900 lines of UCI code, but I have no delays in it.
Maybe for more manual hardcoded hacking with sed
, echo
, cat
config file replace and restarting services manually. With uci
a interface may only comes up after the commit message and some delay. Maybe in or between that period you have other wishes certificate/authentication before other parts of the uci config may succeed?
A commit only writes your changes from the ram to the actual config file.
To load it in a interface or something else you need to run a restart or reload operation.
But the whole idea with !# script is that they run the code as if you did it yourself but without delay so every command must be done before it moves on or it gives a error message.
You can even make commands in the script like opkg update
and on next line opkg install <something>
and the script will nicely wait while the device is downloading the package list and then it will install ”something”.
Well since you recently saved your brick, try to avoid a new one and just build a default image with the online image builder having the default packages but only the following test commands in the script to see if/how the script may work. As in if it needs extra shebang/exit0 stuff.
echo "just a simple echo test" > /etc/echotest.txt
mkdir /etc/blablabla
touch /etc/blablabla/testfile
date > /etc/blablabla/datescript.txt
date >> /etc/echotest.txt #puts date at the last line in file
Than step by step try to add your new default config with uci commands
(verified before in a clean image using ssh) in this custom script.
You might also try to remove all packages you don't like from the current default image and see if that still boots, than later adjust the package list for the online image builder.
Thanks Walter I was planning on saving the UCI commands but as I was setting up I enabled one of the WiFi controllers and that saved everything..... I just went with the generic build as you said and just followed the dumb ap guide.
Next I seem to have bricked the Comfast I got also