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>
This commit is contained in:
Matthias Schiffer 2017-05-03 09:08:29 +02:00
parent a77633d36d
commit dac07ca05b
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -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