Turris Omnia sysupgrade issues

Is syupgrade broken for Turris Omnia in master? And if I force the sysupgrade, the upgrade does not actually happen.

sysupgrade -n /tmp/openwrt-mvebu-cortexa9-cznic_turris-omnia-sysupgrade.img.gz
Unable to determine upgrade device
Image check 'platform_check_image' failed.

This happened when using the matching medkit from the master build. I went back and used a medkit from 18.06-snapshot and sysupgraded to the master build just fine.

Appears to be from target/linux/mvebu/base-files/lib/upgrade/sdcard.sh -- platform-specific code.

platform_do_upgrade_sdcard() {
        local board=$(board_name)
        local diskdev partdev diff

        export_bootdevice && export_partdevice diskdev 0 || {
                echo "Unable to determine upgrade device"
        return 1
        }

Running OpenWrt from a SSD partition I came across the same issue with

{"kernel":"5.4.43","hostname":"OpenWrt","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"cznic,turris-omnia","release":{"distribution":"OpenWrt","version":"SNAPSHOT","revision":"r13518-c37487a63d","target":"mvebu/cortexa9","description":"OpenWrt SNAPSHOT r13518-c37487a63d"}}

From my personal experience:

The reason for "Unable to determine upgrade device" often is within the function export_bootdevice() within /lib/upgrade/common.sh. This function parses the argument to root= in /proc/cmdline, and tries to guess the device OpenWrt is currently running from.

In your case (SSD), I guess you can boot OpenWrt with root=/dev/sda2, before trying sysupgrade. This syntax usually works.

Alternatively, if you want to debug the function, here's a working example from my Omnia (OpenWrt on eMMC):

# cat /proc/cmdline 
earlyprintk console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=auto rootwait
# . /lib/upgrade/common.sh 
# export_bootdevice
# echo $?
0
# echo $BOOTDEV_MAJOR $BOOTDEV_MINOR
179 0
2 Likes

Thank you for the input. My boot script though utilises root=PARTUUID= and boot_targets 'scsi0'; setenv distro_bootpart '4', that is with u-boot 2019.07

cat /proc/cmdline

earlyprintk rootwait console=ttyS0,115200 rootfstype=ext4 root=PARTUUID=4d4ced8f-b95c-1142-9287-529911b660c6 rootflags=commit=5 rw cfg80211.freg=**

For that

export_bootdevice
echo $?

always returns

1

which I am not sure what it represents for sysupgrade but for sure it is not the partition number registered in the kernel.

echo $BOOTDEV_MAJOR $BOOTDEV_MINOR just comes up empty.

$? = 1 means the function failed.

Thank you for the explanation which in turn might also explain why sysupgrade does not work at all

But then how to get this sorted, seems sysupgrade is missing something? Querying the kernel for that device

brw------- 1 root root 8, 4 Jun 10 18:44 sda4

Run this:
(. /lib/upgrade/common.sh; set -x; export_bootdevice) and provide the output here.

1 Like
+ export_bootdevice
+ local cmdline bootdisk rootpart uuid blockdev uevent line class
+ local MAJOR MINOR DEVNAME DEVTYPE
+ read cmdline
+ rootpart='PARTUUID=4d4ced8f-b95c-1142-9287-529911b660c6 rootflags=commit=5 rw cfg80211.freg=**'
+ rootpart='PARTUUID=4d4ced8f-b95c-1142-9287-529911b660c6'
+ '[' -e  ]
+ return 1

The /lib/upgrade/common.sh script does not support this notation. It appears to expect UUIDs ending with 02 - probably an x86 / MBR artifact.

You could try a change like this and repeat the test:

diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index c375b70742..e718d0412b 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -154,7 +154,7 @@ export_bootdevice() {
                                        fi
                                done
                        ;;
-                       PARTUUID=????????-????-????-????-??????????02)
+                       PARTUUID=????????-????-????-????-????????????)
                                uuid="${rootpart#PARTUUID=}"
                                uuid="${uuid%02}00"
                                for disk in $(find /dev -type b); do

1 Like
still returns error 1
+ export_bootdevice
+ local cmdline bootdisk rootpart uuid blockdev uevent line class
+ local MAJOR MINOR DEVNAME DEVTYPE
+ read cmdline
+ rootpart='PARTUUID=4d4ced8f-b95c-1142-9287-529911b660c6 rootflags=commit=5 rw cfg80211.fr                                          eg=**'
+ rootpart='PARTUUID=4d4ced8f-b95c-1142-9287-529911b660c6'
+ uuid=4d4ced8f-b95c-1142-9287-529911b660c6
+ uuid=4d4ced8f-b95c-1142-9287-529911b660c600
+ find /dev -type b
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/loop3' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda6' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/mmcblk0' 'bs=1' 'skip=568' 'count=16'
+ set -- c6 af 8c f7 56 5f 6f 4a 9157-e4228923fb89
+ '[' f78cafc6-5f56-4a6f-9157-e4228923fb89 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ + hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
dd 'if=/dev/mmcblk0boot1' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/loop5' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda8' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/loop7' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda' 'bs=1' 'skip=568' 'count=16'
+ set -- 1d 0c e5 a4 cf 02 47 db 8961-3feea2ffc376
+ '[' a4e50c1d-02cf-db47-8961-3feea2ffc376 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ + hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
dd 'if=/dev/mtdblock1' 'bs=1' 'skip=568' 'count=16'
+ set -- c1 e6 2b 14 f5 e5 16 7e e11d-d14ce700ac49
+ '[' 142be6c1-e5f5-7e16-e11d-d14ce700ac49 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda1' 'bs=1' 'skip=568' 'count=16'
+ set -- b5 99 bc 85 6d d2 61 35 eacf-911f4fc1271f
+ '[' 85bc99b5-d26d-3561-eacf-911f4fc1271f '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/mmcblk0p1' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/loop0' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda3' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/loop2'+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda5' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/mmcblk0boot0' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ + hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
dd 'if=/dev/loop4' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ + hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
dd 'if=/dev/sda7' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/loop6' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda9' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/mtdblock0' 'bs=1' 'skip=568' 'count=16'
+ set -- 3f 2b f9 d1 07 20 70 47 0a20-704704207047
+ '[' d1f92b3f-2007-4770-0a20-704704207047 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/sda2' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/loop1' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/sda4' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ '[' -e  ]
+ return 1

Does /dev -type b refers to the MBR boot flag? On this node PTR is deployed with no boot flag set to any partition. Also there is no separate vFAT partition for /boot mountpoint.

@jow is the GPT EFI boot flag EF00 neither supported by the script, only the MBR 0xEF flag?

Having setup /dev/sda7

Number  Start (sector)    End (sector)  Size       Code  Name
7       50333696          50436095      50.0 MiB   EF00  OpenWrt Master boot
the script does not detect it
+ export_bootdevice
+ local cmdline bootdisk rootpart uuid blockdev uevent line class
+ local MAJOR MINOR DEVNAME DEVTYPE
+ read cmdline
+ rootpart='PARTUUID=4d4ced8f-b95c-1142-9287-529911b660c6 rootflags=commit=5 rw cfg80211.freg=**'
+ rootpart='PARTUUID=4d4ced8f-b95c-1142-9287-529911b660c6'
+ uuid=4d4ced8f-b95c-1142-9287-529911b660c6
+ uuid=4d4ced8f-b95c-1142-9287-529911b660c600
+ find /dev -type b
+ dd 'if=/dev/zram0' 'bs=1'+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/loop3' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ + hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
dd 'if=/dev/sda6' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/mmcblk0' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- c6 af 8c f7 56 5f 6f 4a 9157-e4228923fb89
+ '[' f78cafc6-5f56-4a6f-9157-e4228923fb89 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/mmcblk0boot1' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/loop5' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/loop7' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/sda' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 1d 0c e5 a4 cf 02 47 db 8961-3feea2ffc376
+ '[' a4e50c1d-02cf-db47-8961-3feea2ffc376 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/mtdblock1' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- c1 e6 2b 14 f5 e5 16 7e e11d-d14ce700ac49
+ '[' 142be6c1-e5f5-7e16-e11d-d14ce700ac49 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/sda1' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- b5 99 bc 85 6d d2 61 35 eacf-911f4fc1271f
+ '[' 85bc99b5-d26d-3561-eacf-911f4fc1271f '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/mmcblk0p1' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/loop0' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/sda3' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/loop2' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/sda5' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/mmcblk0boot0' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ + hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
dd 'if=/dev/loop4' 'bs=1' 'skip=568' 'count=16'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/sda7' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/loop6' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/sda9' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/mtdblock0' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set -- 3f 2b f9 d1 07 20 70 47 0a20-704704207047
+ '[' d1f92b3f-2007-4770-0a20-704704207047 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda2' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd 'if=/dev/loop1' 'bs=1' 'skip=568' 'count=16'
+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
+ set --
+ '[' --- '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ dd+ hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"'
 'if=/dev/sda4' 'bs=1' 'skip=568' 'count=16'
+ set -- 00 00 00 00 00 00 00 00 0000-000000000000
+ '[' 00000000-0000-0000-0000-000000000000 '=' 4d4ced8f-b95c-1142-9287-529911b660c600 ]
+ '[' -e  ]

The script tries to extract a UUID value from a fixed position on all block partition devices and compares it to the value of PARTUUID passed to the kernel when booting in order to find the actual device corresponding to the rootfs. This appears to not work on your board because its EFI/partition layout is different to what is expected by the script.

With a GPT setup sysupgrade is basically doomed then? Suppose I could always dump a new kernel image manually into /boot/ and get compiled kmods through opkg upgrade but would not be able to upgrade the base-file package otherwise.

Given your current disk layout and the current limitation of the script - yes. But obviously it is not the intent to have a broken sysupgrade there.

Basically we need to come up with a way to take that UUID from the kernel command line and somehow figure out which /dev/sdXY block device corresponds to it, then figure out the related boot partition.

Maybe this is something which could be done by using sfdisk or similar.

1 Like

That would helpful for dual (multiple) boot scenarios, e.g. running stable and Master from the same SSD. I my case the device is hosting a 1 TB SSD and I would not want to waste it by running only one of the branches but being able to switch between the installations with adjusting the u-boot args.
Actually for testing purposes I got more than two OpenWrt installations on the same SSD

which gets me to

Thanks to opkgs -o option it was possible to upgrade that package from one of the other OpenWrt installations.

Doesn't blkid give that info?

root@TrainMan:~# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-nofan root=PARTUUID=c2085666-5505-c85e-1321-2d8d61bf1802 rootwait console=tty0 console=ttyS0,115200n8 acpi_enforce_resources=lax noinitrd
root@TrainMan:~# blkid
/dev/sda1: SEC_TYPE="msdos" LABEL_FATBOOT="kernel" LABEL="kernel" UUID="BCF6-F455" TYPE="vfat" PARTUUID="c2085666-5505-c85e-1321-2d8d61bf1801"
/dev/sda2: LABEL="rootfs" UUID="ff313567-e9f1-5a5d-9895-3ba130b4a864" TYPE="ext4" PARTUUID="c2085666-5505-c85e-1321-2d8d61bf1802"
/dev/sda128: PARTUUID="c2085666-5505-c85e-1321-2d8d61bf1880"