x86: preserve partition table on sysupgrade
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Feb 2016 12:33:17 +0000 (12:33 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Feb 2016 12:33:17 +0000 (12:33 +0000)
commit4aeeead303cda2a85895fde9d3983eae323a30e1
tree30856f12366d0b265eb6a8b04825ad8449c52672
parent6b73b7a8ec744f557200f1b7be0c3018244996d6
x86: preserve partition table on sysupgrade

With this patch sysupgrade will write directly to the partitions
instead of to the main disk.  The UUID is copied from the image
to the MBR as well.  This prevents the mbr from being completely
overwritten and losing the partition table.  The -p option has
been added to maintain the original behavior and overwite the
entire disk with the new image.  Tests have been added to ensure
that the image partitions match up with the active partitions.

Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net>
SVN-Revision: 48682
package/base-files/files/lib/upgrade/common.sh
package/base-files/files/sbin/sysupgrade
target/linux/x86/Makefile
target/linux/x86/base-files/lib/upgrade/platform.sh