You can backup your system partition table with sfdisk which you can also inlude extended partitions.

backup partition table

sfdisk -d /dev/sda > my-sda.sf

restore partition table

sfdisk /dev/sda < my-sda.sf --force

you can download the sfdisk source from

ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/

and you can compile it for your desktop PC or for your embedded device. (cross compiling)

Buy me a beer