
Originally Posted by
robin_listas
On 2012-01-24 07:36, please try again wrote:
> But @oldcpu, why not saving the partition table (in the following
> bytes)?
Because they change. The original windows mbr does not, unless you
overwrite it with grub or yast version of generic boot code.
But that's exactly the point! You 're going to back up what is going to change (and possibly get screwed up), not what is NOT going to change, hence my question.
I can understand why you would only save the bootcode - if you want to modify the partition table and restore the bootcode (which as you noticed is not going to change unless you overwrite it).
But if something has to be backed up and you want to be able to restart Windows (or something else) if something goes wrong while repartitioning (it happens), that would be the partition table. Otherwise if could be over ... or at least not fun to repare (I'm not kidding).
So this is the command to do it:
Code:
dd if=/dev/sda of=mbr-backup-windows7-512 bs=512 count=1
Or you could save only the partition table (but why would you?). Actually this command:
Code:
dd if=/dev/sda of=ptable-backup-windows7 bs=1 skip=446 count=64
is more useful than this one:
Code:
dd if=/dev/sda of=mbr-backup-windows7-440 bs=440 count=1
or at least might help you restore Windows. The first 440 bytes of the MBR won't and those are easy to rewrite with fixmbr (or whatever it is called under WIndows 7. I know it's not fixmbr). On the other hand, repairing the partition table when you don't know how it originally looked like is much more tricky, and the majority of users won't do it and just reinstall. I always recommend users to make a hard print of their partition table. It can save you a lot of time and trouble.
Bookmarks