Owut: OpenWrt Upgrade Tool

Yup, and that's only for main snapshot, so we're in pretty good shape right now.

The lingering issue with the packagelist call (ABI versioning) is also present in the index.json files, I need to add another item to my list and see how I can resolve it...

3 Likes

Can confirm that moving from pre-APK main to 24.10-SNAPSHOT on my R4 worked smoothly. Thanks a ton!

However - maybe off-topic - how do we upgrade 23.05 to 24.10-SNAPSHOT without having access to owut yet?

auc -B 24.10-SNAPSHOT

fails with 'invalid argument'

1 Like

You need to add the -b "change branch" argument, too.

$ auc -B 24.10-SNAPSHOT -b 24.10
auc/0.3.2-1
Server:    https://sysupgrade.openwrt.org
Running:   23.05.5 r24106-10cc5fcd00 on x86/64 (generic)
Available: 24.10-SNAPSHOT r28046-7ef734deac
Requesting package lists...
 kmod-usb-storage: 5.15.167-1 -> 6.6.63-r1
...
1 Like

Thanks a lot - not very obvious from the help :slight_smile:

Worked for my mt3000 but failed on the redmi AX6s - in fairness that one failed auc even between minor stable releases before.

Yeah, I recall it took me a while to find the correct recipe the first time I tried crossing branch boundaries.

What's the failure you're seeing on the AX6s? ASU build failures or something in auc itself or something else?

Just wanted to say I used AUC to go from 23.05.5 to 24.10. Worked perfect for my installation. Then realized I didn't have a backup .bin file for my newly installed 24.10 and couldn't (yet) make one with the Firmware Selector...So I read the instructions on OWUT and generated one with "owut download --force" and then scp'ed it to my firmware backup folder (I did run the .bin file to check that it worked and it was perfect)...Everything worked great. I'm now on 24.10 and just waiting for everything to get switched on for that release. GREAT JOB efahl !! (My model was a GL.inet MT-6000).

1 Like

Good to hear success stories! Did you have to do any package adds/removes at all, or just the owut download to duplicate your installation?

And don't forget to do a
sysupgrade -b backup.tar.gz && scp backup.tar.gz backup-machine:
if you haven't already done that, too. Or alternatively from the backup host itself to get date-stamped config backups:

stamp=$(date +'%FT%H%M')
ssh router "sysupgrade -b -" > backup.$stamp.tar.gz

I didn't add any packages was just trying to get a .bin file with all my packages already installed and it worked perfect for that...
Oh OK...I did not know I needed to run that will do that now
sysupgrade -b backup.tar.gz && scp backup.tar.gz backup-machine:
Honestly most all of the builds I've had success with during this changeover...
I now have five different builds (OPKG Stable, Snapshot 24.10, APK 28146, Pesa1234's APK 28320, and stock...This has been a good learning experience trying all the different methods...But I'm going to take the advice of you more experienced people and stick with OPKG 24.10 for now.

1 Like

I actually declared victory too early. WiFi was completely broken afterwards (the interfaces would remain disabled no matter what), bad enough that nopt even a downgrade to stable helped. Ended up completely nuking one to put a standard stable image and rebuild the dumb ap from the ground.

Will investigate the still broken brother a bit more, I suspect there is something wrong with encryption as it seems that wifi comes up without any...

Edit: Ok the other one is weirder still: it now has a third radio (technically probably a fourth as well) in config/wireless which definitely did not exist before (just looked in the backup)...

I've gone from pre-apk Snapshot to 24.10-Snapshot. No issues so far, thank you @efahl !

Target         mediatek/filogic
Profile        glinet_gl-mt6000
Package-arch   aarch64_cortex-a53
Version-from   SNAPSHOT r27913-a2aabc9a7a (kernel 6.6.58)
Version-to     24.10-SNAPSHOT r28155-17bdccb4a5 (kernel 6.6.63) DOWNGRADE
1 Like

When I've had this happen on other platforms, it was due to missing kmods for the wireless chips. Check the manifest against the defaults to see if something like kmod-mt7915-firmware is missing. You should probably start a new thread so that you get better exposure with people who know your specific device better can see it.

I completely spaced out on this, don't get old. :joy: You can make owut do all of this automagically:

  1. owut has a command line option --pre-install <script-name> that allows you to inject actions between the download and install steps when you do upgrade (also happens first thing if you just do owut install).

  2. There should be examples in /etc/owut.d/pre-install.sh. Take a look at the bottom "Example 3", it looks like exactly what you're doing manually. You can change the value of remote= to match your backup server, and change the if false to if true.

  3. Run it manually to make sure it's working as expected.

  4. Make it automatic by editing /etc/config/attendedsysupgrade and uncomment the line option pre_install '/etc/owut.d/pre-install.sh'.

  5. Next time you run an owut upgrade or owut install, the script will be run immediately prior to the sysupgrade (if the script fails to run, then owut bails out and does not do the sysupgrade).

Another obvious extension would be to also add something like this to archive the img file, too.

scp /tmp/firmware.bin "${remote}/firmware-${router}-${stamp}.bin" || exit 1

EDIT: I just added that final thing to the examples, https://github.com/efahl/owut/blob/main/files/pre-install.sh

Hi there,

I've been using this to make an a/b root update script of my own, and have got it to obtain an image. However, the rootfs is missing the init executable and all other core system utilities. What packages if any would I need list in the JSON blob to make a fully bootable system?

Here it my current list of packages:

    "packages": [
        "auc",
        "base-files",
        "kmod-nf-conntrack6",
        "libgcc1",
        "kmod-lib-lzo",
        "kmod-mt76-core",
        "ubox",
        "kernel",
        "kmod-e1000e",
        "kmod-nft-core",
        "libucode20230711",
        "kmod-button-hotplug",
        "kmod-nls-base",
        "fwtool",
        "jsonfilter",
        "kmod-mdio",
        "liblucihttp-ucode",
        "libubox20230523",
        "hostapd-common",
        "kmod-igb",
        "kmod-igc",
        "kmod-bnx2",
        "kmod-i2c-algo-bit",
        "libattr",
        "libuv1",
        "kmod-mt7921-firmware",
        "kmod-mdio-devres",
        "wireless-regdb",
        "urngd",
        "kmod-slhc",
        "kmod-cfg80211",
        "ppp-mod-pppoe"
    ]

Thanks

A quick scan makes me think busybox is missing? Maybe start with the default_packages list from your version and device (it's in the profiles.json, for example https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/profiles.json) and trim out what you think shouldn't be needed.

busybox should be pulled-in by base-files as its dependency

Isn't that only true for new builds as of about a week ago? @0x0000ff's mention of auc made me think he's using 23.05, where I still see this (23.05.5 x86/64):

$ opkg depends base-files
base-files depends on:
        libc
        netifd
        jsonfilter
        usign
        openwrt-keyring
        fstools
        fwtool

$ opkg whatdepends busybox
Root set:
  busybox
What depends on root set
$

Where on my couple-day-old apk-based snapshot:

$ apk info --depends base-files
base-files-1639~c857145e03 depends on:
busybox
fstools
fwtool
jsonfilter
libc
netifd
openwrt-keyring
procd
procd-seccomp
usign

$ apk info --rdepends busybox
busybox-1.36.1-r2 is required by:
base-files-1639~c857145e03

Indeed, 23.05 included busybox via the DEFAULT_PACKAGES list in target.mk

My profound apologies for my previous post, but the list of packages from the profiles.json file do include the needed ones. My script gets the files and it boots correctly.

1 Like

I had 2 success stories going from a pre-APK SNAPSHOT to 24.10-SNAPSHOT on a Mi 4A 100M Intl and a Redmi AC2100. And used the image builder on 2 RT3200s.

However, I'm trying to do the same by going from 24.10-SNAPSHOT to 24.10-rc1 without success on any device, also the Fimrware Selector is throwing errors, too? On the Image Builder I see that it can't find the kmods.

Thoughts @efahl ?? Is there something wrong with the ASU server for 24.10-rc1?

Indeed, -rc1 is broken due to a missing kmods feed in /etc/opkg/distfeeds.conf, -rc2 will be tagged soon with the fix, but until the fix filters through the builds, the imagebuilders (and hence ASU) won't be usable to create a new image.

If you already have an rc1 install running, it can be repaired by adding a line to that file. Figure out the target/subtarget for your platform (the other lines in the file have it) and add this:

src/gz openwrt_kmods https://downloads.openwrt.org/releases/24.10.0-rc1/targets/x86/64/kmods/6.6.63-1-fdf628e4ac1bbb67c9c54e22238868e0

Fix: https://github.com/openwrt/openwrt/pull/17151/files
Discussion: https://github.com/openwrt/openwrt/issues/17146

2 Likes