Recreate MBR

Hello all,

this is a follow-up question to this thread.
Short version: I’m tring to make a script for creating an vmdk image from a running SLES like the one in ec2-bundle-vol for AWS.
I’ve already created the raw image with rsync an converted it to a vmdk using qemu-img.

However, the image is missing the MBR. The image is OK: if I use Acronis DD, I can see that the partition but the drive is missing the MBR. I cannot see the partitions in /proc/partitions using the SLES rescue disk. Therefore, I cannot just recreate the MBR using grub-install /dev/sda1.
How can I solve this problem? I thought of creating the MBR from scratch and then rescan for paritions using Acronis DD.

Thanks in advance.

My progress so far:

I’ve extracted the MBR separately, joined both files with cat. I then deleted the partition table and used Acronis Recovery Expert to find the lost partition and recreate the partition table.
Well, this works but if anyone has an easier approach…
Additionally, I wonder if there is an open source tool to scan for lost partitions and add them to the MBRs partition table?