[LuCi] Firmware and config simultaneous upload

Hello
Is it possible to have simultaneous upload of firmware and tar.gz with configuration?

1 Like

The image builder allows for the inclusion of configuration files.

Not in Luci.

However, this is possible from the command line:

sysupgrade -f /tmp/config.tar.gz /tmp/firmware.bin
1 Like

Aren't these baked in the rom? That's not my intent.

I know about that. I thought this is place for feature requests.

Just curious - what's your use case for sysupgrading a device with OpenWrt already installed, but using a different configuration than existing on the device?

1 Like

We have a bunch of AP that are used about once per year for FOS conference. I upgrade one, usually reconfigure as template. Download template config from it and upload it to every other. I don't have http server on the place I'm doing that. So I have to make image with openssh sftp server on it so I can easily upload config tar.

3 Likes

Just FYI - OpenWrt is capable of Secure Copy Protocol. I'm not sure why you need to host the file via HTTP, nor why you need to install OpenSSH.

Workaround for cases where OpenWrt developers require reconfiguring the device from scratch on the new version. I think this would have helped in the past during the ar71xx -> ath79 switch, given a second device that was reconfigured from scratch manually.

1 Like

That is not true. Especially for default image for AeroHive AP121

Then something is wrong with the image. It's included in a default package.

Are you running an official OpenWrt image from https://downloads.openwrt.org ?

Because if not, we likewise can't help with a Feature Request.

Yes. that the place

What's the output of:

ubus call system board

?

{
	"kernel": "5.15.167",
	"hostname": "ap-voc-z",
	"system": "Atheros AR9344 rev 2",
	"model": "Aerohive HiveAP 121",
	"board_name": "aerohive,hiveap-121",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.5",
		"revision": "r24106-10cc5fcd00",
		"target": "ath79/nand",
		"description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
	}
}

But that's from image build with firmware selector. Don't know if its maters and dont have the time to test

root@OpenWrt:~# ubus call system board | grep 'release' -A 3
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.5",
                "revision": "r24106-10cc5fcd00",
root@OpenWrt:~# scp /etc/config/network user@192.168.1.xx:/home/user/file.txt

Host '192.168.1.xxx' is not in the trusted hosts file.
(ssh-ed25519 fingerprint SHA256:
...

Odd, scp works here. Installed by default. No need to host the file on a web server or install other software to perform the transfer.

scp client - probably. It is more natural to me to scp from pc to openwrt. That is not working

I had a feeling you were gonna say that:

user@machine:~$ touch test.txt
user@machine:~$ scp test.txt root@192.168.1.xx:/etc/config/test.txt
root@192.168.1.xx's password: 

That works here too, you may want to check your PC.

Just FYI, this is the commonly posted CLI method to upload a sysupgrade file to OpenWrt from the local machine.

# opkg list-installed ?

1 Like

I downloaded from: https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/openwrt-23.05.5-x86-64-generic-squashfs-combined-efi.img.gz

root@OpenWrt:~# opkg list-installed
base-files - 1559-r24012-d8dd03c46f
bnx2-firmware - 20230804-1
busybox - 1.36.1-1
ca-bundle - 20230311-1
cgi-io - 2022-08-10-901b0f04-21
dnsmasq - 2.90-2
dropbear - 2022.82-6
e2fsprogs - 1.47.0-2
firewall4 - 2023-09-01-598d9fbb-1
fstools - 2023-02-28-bfe882d5-1
fwtool - 2019-11-12-8f7fe925-1
getrandom - 2022-08-13-4c7b720b-2
grub2 - 2.06-5
grub2-bios-setup - 2.06-5
grub2-efi - 2.06-5
jansson4 - 2.14-3
jshn - 2023-05-23-75a3b870-1
jsonfilter - 2024-01-23-594cfa86-1
kernel - 5.15.162-1-59d1431675acc6823a33c7eb2323daeb
kmod-amazon-ena - 5.15.162-1
kmod-amd-xgbe - 5.15.162-1
kmod-bnx2 - 5.15.162-1
kmod-button-hotplug - 5.15.162-3
kmod-crypto-acompress - 5.15.162-1
kmod-crypto-crc32c - 5.15.162-1
kmod-crypto-hash - 5.15.162-1
kmod-e1000 - 5.15.162-1
kmod-e1000e - 5.15.162-1
kmod-forcedeth - 5.15.162-1
kmod-fs-vfat - 5.15.162-1
kmod-hwmon-core - 5.15.162-1
kmod-i2c-algo-bit - 5.15.162-1
kmod-i2c-core - 5.15.162-1
kmod-igb - 5.15.162-1
kmod-igc - 5.15.162-1
kmod-input-core - 5.15.162-1
kmod-ixgbe - 5.15.162-1
kmod-lib-crc-ccitt - 5.15.162-1
kmod-lib-crc32c - 5.15.162-1
kmod-lib-lzo - 5.15.162-1
kmod-libphy - 5.15.162-1
kmod-mdio - 5.15.162-1
kmod-mdio-devres - 5.15.162-1
kmod-mii - 5.15.162-1
kmod-nf-conntrack - 5.15.162-1
kmod-nf-conntrack6 - 5.15.162-1
kmod-nf-flow - 5.15.162-1
kmod-nf-log - 5.15.162-1
kmod-nf-log6 - 5.15.162-1
kmod-nf-nat - 5.15.162-1
kmod-nf-reject - 5.15.162-1
kmod-nf-reject6 - 5.15.162-1
kmod-nfnetlink - 5.15.162-1
kmod-nft-core - 5.15.162-1
kmod-nft-fib - 5.15.162-1
kmod-nft-nat - 5.15.162-1
kmod-nft-offload - 5.15.162-1
kmod-nls-base - 5.15.162-1
kmod-nls-cp437 - 5.15.162-1
kmod-nls-iso8859-1 - 5.15.162-1
kmod-nls-utf8 - 5.15.162-1
kmod-phy-realtek - 5.15.162-1
kmod-ppp - 5.15.162-1
kmod-pppoe - 5.15.162-1
kmod-pppox - 5.15.162-1
kmod-pps - 5.15.162-1
kmod-ptp - 5.15.162-1
kmod-r8169 - 5.15.162-1
kmod-slhc - 5.15.162-1
kmod-tg3 - 5.15.162-1
libblkid1 - 2.39-2
libblobmsg-json20230523 - 2023-05-23-75a3b870-1
libc - 1.2.4-4
libcomerr0 - 1.47.0-2
libext2fs2 - 1.47.0-2
libf2fs6 - 1.16.0-1
libgcc1 - 12.3.0-4
libiwinfo-data - 2023-07-01-ca79f641-1
libiwinfo20230701 - 2023-07-01-ca79f641-1
libjson-c5 - 0.16-3
libjson-script20230523 - 2023-05-23-75a3b870-1
liblucihttp-ucode - 2023-03-15-9b5b683f-1
liblucihttp0 - 2023-03-15-9b5b683f-1
libmbedtls12 - 2.28.8-1
libmnl0 - 1.0.5-1
libnftnl11 - 1.2.6-1
libnl-tiny1 - 2023-07-27-bc92a280-1
libpthread - 1.2.4-4
librt - 1.2.4-4
libsmartcols1 - 2.39-2
libss2 - 1.47.0-2
libubox20230523 - 2023-05-23-75a3b870-1
libubus20230605 - 2023-06-05-f787c97b-1
libuci20130104 - 2023-08-10-5781664d-1
libuclient20201210 - 2023-04-13-007d9454-1
libucode20230711 - 2024-07-11-1a8a0bcf-1
libustream-mbedtls20201210 - 2023-02-25-498f6e26-1
libuuid1 - 2.39-2
logd - 2022-08-13-4c7b720b-2
luci - git-23.051.66410-a505bb1
luci-app-firewall - git-24.067.01746-69867db
luci-app-opkg - git-24.148.43905-2891ca4
luci-base - git-24.086.45142-09d5a38
luci-light - git-23.024.33244-34dee82
luci-mod-admin-full - git-19.253.48496-3f93650
luci-mod-network - git-24.111.76511-ff6b275
luci-mod-status - git-24.141.29354-5cfe7a7
luci-mod-system - git-24.067.01860-7a82b2f
luci-proto-ipv6 - git-24.086.45108-51aee90
luci-proto-ppp - git-24.135.44542-f1ec9c2
luci-ssl - git-23.035.26083-7550ad6
luci-theme-bootstrap - git-24.086.46634-1ffe078
mkf2fs - 1.16.0-1
mtd - 26
netifd - 2024-01-04-c18cc79d-2
nftables-json - 1.0.8-1
odhcp6c - 2023-05-12-bcd28363-20
odhcpd-ipv6only - 2023-10-24-d8118f6e-1
openwrt-keyring - 2022-03-25-62471e69-2
opkg - 2022-02-24-d038e5b6-2
partx-utils - 2.39-2
ppp - 2.4.9.git-2021-01-04-4
ppp-mod-pppoe - 2.4.9.git-2021-01-04-4
procd - 2023-06-25-2db83655-2
procd-seccomp - 2023-06-25-2db83655-2
procd-ujail - 2023-06-25-2db83655-2
px5g-mbedtls - 10
r8169-firmware - 20230804-1
rpcd - 2023-07-01-c07ab2f9-1
rpcd-mod-file - 2023-07-01-c07ab2f9-1
rpcd-mod-iwinfo - 2023-07-01-c07ab2f9-1
rpcd-mod-luci - 20240305-1
rpcd-mod-rrdns - 20170710
rpcd-mod-ucode - 2023-07-01-c07ab2f9-1
ubox - 2022-08-13-4c7b720b-2
ubus - 2023-06-05-f787c97b-1
ubusd - 2023-06-05-f787c97b-1
uci - 2023-08-10-5781664d-1
uclient-fetch - 2023-04-13-007d9454-1
ucode - 2024-07-11-1a8a0bcf-1
ucode-mod-fs - 2024-07-11-1a8a0bcf-1
ucode-mod-html - 1
ucode-mod-math - 2024-07-11-1a8a0bcf-1
ucode-mod-ubus - 2024-07-11-1a8a0bcf-1
ucode-mod-uci - 2024-07-11-1a8a0bcf-1
uhttpd - 2023-06-25-34a8a74d-2
uhttpd-mod-ubus - 2023-06-25-34a8a74d-2
urandom-seed - 3
urngd - 2023-11-01-44365eb1-1
usign - 2020-05-23-f1f65026-1
root@OpenWrt:~# which scp
/usr/bin/scp
root@OpenWrt:~# ls -l /usr/bin/scp
lrwxrwxrwx    1 root     root            18 Jul 15 22:14 /usr/bin/scp -> /usr/sbin/dropbear

dropbear - 2022.82-6

As is proud tradition since 2019 you are hijacking and offtopiking my treads.

I made a feature request.

And now you are indirectly accusing me that I lie that there is no scp server functionality on hardware you don't have.

Would you be so kind to disappear from my treads as I've already asked you once.