]> git.ipfire.org Git - thirdparty/openwrt.git/commit
base-files: MAJOR/MINOR not sequential, use DISKSEQ instead 18962/head
authorClemens Hopfer <openwrt@wireloss.net>
Fri, 30 May 2025 12:03:40 +0000 (14:03 +0200)
committerRobert Marko <robimarko@gmail.com>
Fri, 3 Apr 2026 18:40:49 +0000 (20:40 +0200)
commit63d0b5c24388e2603ab1cd482d6e469029cde421
treed20ed6379dac8815f93508c75cb2b90e3b4eab5d
parent45a7dd55474217318c0cc2c0ce2b86e3845d4338
base-files: MAJOR/MINOR not sequential, use DISKSEQ instead

Export the unique, monotonic DISKSEQ sequence drive number instead of its
major/minor numbers to identify the boot disk and directly match the partition
in export_partdevice with PARTN.

The MINOR blockdevice numbers are not guaranteed sequential across disks, it
can happen that disks enumerate before their partitions are probed, resulting
in interleaved MINOR numbers breaking the partition offset calculation:

major minor  #blocks  name
 259        0  250059096 nvme0n1
 259        2       8192 nvme0n1p1
 259        3     491520 nvme0n1p2
 259        4        239 nvme0n1p128
 259        1  250059096 nvme1n1
 259        5  250057728 nvme1n1p1

Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
Link: https://github.com/openwrt/openwrt/pull/18962
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/base-files/files/lib/upgrade/common.sh
target/linux/stm32/base-files/lib/upgrade/platform.sh