Re: [OpenWrt-Devel] [PATCH][RFC] x86: Save and restore partition table during upgrade

2016-01-17 Thread Jo-Philipp Wich
Hi. > This patch will save the partition table before an upgrade. > If the installed image has not changed the partition structure > the saved table will be restored, ensuring any user created > partitions will be present after the upgrade. That sounds odd. If I'd start to rely on such a feature

Re: [OpenWrt-Devel] [PATCH][RFC] x86: Save and restore partition table during upgrade

2016-01-16 Thread Rob Mosher
I considered a simpler approach without sfdisk, however /proc/partitions may not update after writing the image directly to the disk with dd, so an approach that actually read the partition table from the device was used. Also, /proc/partitions just lists block count, and not partition begin/e

Re: [OpenWrt-Devel] [PATCH][RFC] x86: Save and restore partition table during upgrade

2016-01-16 Thread Luiz Angelo Daros de Luca
Rob, I'll not judge the merit of keeping the previous position table, but I guess dd might be enough for saving/restore partitions (I guess only msdos is used). dd and /proc/partitions might replace sfdisk. Em sáb, 16 de jan de 2016 23:22, Rob Mosher escreveu: > This patch will save the partitio

[OpenWrt-Devel] [PATCH][RFC] x86: Save and restore partition table during upgrade

2016-01-16 Thread Rob Mosher
This patch will save the partition table before an upgrade. If the installed image has not changed the partition structure the saved table will be restored, ensuring any user created partitions will be present after the upgrade. An option is added to sysupgrade to disable this feature. Signed-off