Backup and recover your boot sector
You can can use rsync for remote backups and tar or dd for local backups to backup your file system, however, there aren't as many options for backuping the boot sector. But, having a backup of your boot sector is equally important in the events of system crash. Fortunately, dd tool does this work perfectly.
Grub and Lilo, or any other boot loader, generally installed ot the boot sector of your boot disc. After you have installed or modified your boot sector and verified that whether it works, back it up by writting it to a file on your hard driver:
for IDE driver:
for SCSI driver:
or you can write it to a floppy disk directly:
Make sure that you use the right source and destination, if you mistakely write the a file or the floppy to your boot driver when you make a backup, you'll damage your boot sector and won't enable to boot.
Now, if there has any error on your boot sector, you can restore rapidly from these images backuped previously by reversing the "if" and "of" destination:
if it stored on a floppy disk, use following command:
relatively, if the driver is a SCSI disk, substitute sda for hda.