aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2016-04-17 13:24:30 +0000
committerHauke Mehrtens <hauke@openwrt.org>2016-04-17 13:24:30 +0000
commiteb15253d46bcfa07ab2310ed1e76370de578db85 (patch)
treeebcee43d8a3c34c35393b53325461e1523a9909b /target/linux/x86
parenta0f92f0820432c6b445b9f92ed12ca1a80b19da8 (diff)
downloadmaster-187ad058-eb15253d46bcfa07ab2310ed1e76370de578db85.tar.gz
master-187ad058-eb15253d46bcfa07ab2310ed1e76370de578db85.tar.bz2
master-187ad058-eb15253d46bcfa07ab2310ed1e76370de578db85.zip
x86: fix platform_export_bootpart() for Xen virtual disks
Virtual disk devices in a Xen virtual machine (DomU) can be /dev/xvda, /dev/xvdb and so on with partitions like /dev/xdva1. Devices named like this where not considered before. This resulted in a non working sysupgrade, because the boot partition could not be found. Signed-off-by: Alexander Dahl <alex@netz39.de> Suggested-by: Matthias Schiffer <mschiffer@universe-factory.net> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49190 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/x86')
-rw-r--r--target/linux/x86/base-files/lib/upgrade/platform.sh2
1 files changed, 1 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 86696aec04..c21f1a7e5f 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -17,7 +17,7 @@ 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]; do
+ for disk in /dev/[hsv]d[a-z] /dev/xvd[a-z]; do
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"