Backing up the Bootsector
Submitted by manraj on Wed, 05/20/2015 - 17:01If you going to play around with Bootloaders, it is wise to make a backup of your bootsector. Use the handy dd tool to make a backup.
dd if=/dev/hda of=bootsector.img bs=512 count=1
Make sure to change the drive device name hda to reflect whatever your system's is.
And to restore
dd if=bootsector.img of=/dev/hda