How to install from a local .swu file via shell command?

Hi all,

I’ve got a .swu file that I can install on my ElkOS PC via the web page interface, but for reasons of convenience I’d like to be able to scp the file to my ElkOS PC and then ssh in to the ElkOS PC and run swupdate from the command line, instead.

That seems like it ought to be straightforward, but when I try it I get the errors shown below. Is there some other invocation I should use instead?

Thanks,
Jeremy


root@elk-test:/tmp# cd /tmp
root@elk-test:/tmp# ls -l test-firmware.swu
-rw------- 1 root root 620167680 Dec 17 05:20 test-firmware.swu
root@elk-test:/tmp# swupdate -v -i test-firmware.swu
Swupdate v2021.04.0

Licensed under GPLv2. See source distribution for detailed copyright notices.

[INFO ] : SWUPDATE running : [print_registered_handlers] : Registered handlers:
[INFO ] : SWUPDATE running : [print_registered_handlers] : dummy
[INFO ] : SWUPDATE running : [print_registered_handlers] : archive
[INFO ] : SWUPDATE running : [print_registered_handlers] : tar
[INFO ] : SWUPDATE running : [print_registered_handlers] : uboot
[INFO ] : SWUPDATE running : [print_registered_handlers] : bootloader
[INFO ] : SWUPDATE running : [print_registered_handlers] : lua
[INFO ] : SWUPDATE running : [print_registered_handlers] : raw
[INFO ] : SWUPDATE running : [print_registered_handlers] : rawfile
[INFO ] : SWUPDATE running : [print_registered_handlers] : rawcopy
[INFO ] : SWUPDATE running : [print_registered_handlers] : shellscript
[INFO ] : SWUPDATE running : [print_registered_handlers] : preinstall
[INFO ] : SWUPDATE running : [print_registered_handlers] : postinstall
[TRACE] : SWUPDATE running : [listener_create] : got no socket at /tmp/swupdateprog from systemd
[TRACE][TRACE] : SWUPDATE running : [network_initializer] : Main loop daemon
[TRACE] : SWUPDATE running : [listener_create] : got no socket at /tmp/sockinstctrl from systemd
: SWUPDATE running : [listener_create] : creating socket at /tmp/swupdateprog
[TRACE] : SWUPDATE running : [listener_create] : creating socket at /tmp/sockinstctrl
[TRACE] : SWUPDATE running : [network_thread] : Incoming network request: processing…
[INFO ] : SWUPDATE started : Software Update started !
[TRACE] : SWUPDATE running : [network_initializer] : Software update started
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : Found file
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : filename sw-description
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : size 1323
[TRACE] : SWUPDATE running : [get_common_fields] : Version 0.2.0
[ERROR] : SWUPDATE failed [0] ERROR : Found nothing to install
[ERROR] : SWUPDATE failed [0] ERROR : no parser available to parse sw-description!
[ERROR] : SWUPDATE failed [0] ERROR : Compatible SW not found
[ERROR] : SWUPDATE failed [1] Image invalid or corrupted. Not installing …
[TRACE] : SWUPDATE running : [network_initializer] : Main thread sleep again !
[INFO ] : No SWUPDATE running : Waiting for requests…
[INFO ] : SWUPDATE running : [endupdate] : Swupdate failed !

After a bit more futzing around, I came up with the following command invocation which appears to do the trick:

swupdate -v -i /tmp/test-firmware.swu -P “mount /dev/sda1 /boot” -p “umount /boot && reboot” -e “stable,sda3”

Hi @jaf,
yes you found the right way to invoke it - a way simpler option would have been to place the .swu file on a USB pendrive and just plug it into the system.