[LEDE-DEV] [RFC 13/13] x86: sysupgrade: explicitly rescan disk after writing partition table
Matthias Schiffer
mschiffer at universe-factory.net
Sun Apr 23 17:07:02 PDT 2017
This should ensure that the kernel partition can be mounted in
platform_copy_config when its size has changed. The following "sleep"
becomes unnecessary and is removed (it was skipped anyways when a change of
the partition table was detected).
While we're at it, also remove the ask_bool that can't work anymore with
staged sysupgrade.
Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
target/linux/x86/base-files/lib/upgrade/platform.sh | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh
index d3e9f360aa..0beef1703c 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -37,9 +37,8 @@ platform_do_upgrade() {
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
if [ -n "$diff" ]; then
echo "Partition layout is changed. Full image will be written."
- ask_bool 0 "Abort" && exit
-
get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
+ partx -u - "/dev/$diskdev"
return 0
fi
@@ -58,8 +57,7 @@ platform_do_upgrade() {
get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
else
get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
+ partx -u - "/dev/$diskdev"
fi
-
- sleep 1
fi
}
--
2.12.2
More information about the Lede-dev
mailing list