aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86/base-files
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2017-05-03 09:08:29 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2017-05-29 23:50:34 +0200
commitdac07ca05bab5ba61e109d05b66acc394c497016 (patch)
treeee5db4e5d9ff8f8ff42919ff87f19352af8344d4 /target/linux/x86/base-files
parenta77633d36defe79d303d79397aa859319a354aac (diff)
downloadupstream-dac07ca05bab5ba61e109d05b66acc394c497016.tar.gz
upstream-dac07ca05bab5ba61e109d05b66acc394c497016.tar.bz2
upstream-dac07ca05bab5ba61e109d05b66acc394c497016.zip
x86: sysupgrade: explicitly rescan disk after writing partition table
This should ensure that the kernel partition can be mounted in platform_copy_config when its size has changed. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'target/linux/x86/base-files')
-rw-r--r--target/linux/x86/base-files/lib/upgrade/platform.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh
index 4fa71999be..439ba8f512 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -70,6 +70,12 @@ platform_do_upgrade() {
if [ -n "$diff" ]; then
get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
+
+ # Separate removal and addtion is necessary; otherwise, partition 1
+ # will be missing if it overlaps with the old partition 2
+ partx -d - "/dev/$diskdev"
+ partx -a - "/dev/$diskdev"
+
return 0
fi