Through some legacy code I'm using dd to save and restore (parts) of a bootsector after unzipping the .iso of the system onto the hard drive (from a live cd).
I use the following command to save the mbr (first 446 bytes thus everything BUT the partition table):
dd if=/dev/sda of=/mnt/mbr.bin bs=446 count=1
Then I restore the .iso of the hard drive and afterwards use the following command to restore the boot sector:
dd if=/mnt/mbr.bin of=/dev/sda bs=446 count=1
Now as I'm having the problem that before I had ONLY a windows xp installed and AFTER using the above method it lets me choose between a linux startup and a windows xp startup I guess something is going severly wrong there.
My question here is: Should these two commands above be sufficient for saving and then later on restoring a boot sector?