aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-03-30 03:19:23 +0200
committerJo-Philipp Wich <jo@mein.io>2016-03-30 03:19:23 +0200
commit924fb794bde41eca8289c6cf10322bf6683b4a80 (patch)
tree2f114f9f982380f1437262d2e66e0170682364c9 /target/linux
parent9f422eba7c1a297a96a03b1cce05fa3cb9d71a4a (diff)
downloadupstream-924fb794bde41eca8289c6cf10322bf6683b4a80.tar.gz
upstream-924fb794bde41eca8289c6cf10322bf6683b4a80.tar.bz2
upstream-924fb794bde41eca8289c6cf10322bf6683b4a80.zip
x86: search PARTUUID in any block device
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/x86/base-files/lib/upgrade/platform.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh
index f12deebf64..29eac77dfb 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -17,7 +17,8 @@ platform_export_bootpart() {
PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
uuid="${disk#PARTUUID=}"
uuid="${uuid%-02}"
- for disk in /dev/[hsv]d[a-z] /dev/xvd[a-z]; do
+ for disk in /dev/*; do
+ [ -b "$disk" ] || continue
set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
if [ "$4$3$2$1" = "$uuid" ]; then
export BOOTPART="${disk}1"