Hello Bob,

> As the title implies, I've overwritten the boot sector
> of my NT partition (512 bytes worth).  The MBR is fine
> and Linux boots as expected.  Is there a way
> to copy/restore the backup boot sector while running Linux.

 It depends on how you have overwritten this bootsector. Did you use lilo to 
do this? In that case you might be allright. If you did something else, it 
depends if you made a backup copy by hand, but I guess you didn't, or you 
wouldn't have to ask :). In that case, maybe you can do something like sys C: 
under NT? Maybe you loose your lilo in the MBR this way as well, so first make 
a backup copy:
dd if=/dev/hda of=~/MBR bs=512 count=1

> How can I locate and copy the backup boot sector (not the MBR)
> back to sector zero of the NT parition using Linux?

 So if you put lilo on your NT bootsector you will have to look for a file 
/boot/boot.####. For the MBR of hda this is /boot/boot.0300, for /dev/hda1 it 
is /boot/boot.0301 etc. Note that if this file existed before you ran lilo a 
backup copy has not been made and the boot.#### file might be useless.
 If you found the appropriate boot.#### file do (assuming C: is /dev/hda1):
dd if=/boot/boot.0301 of=/dev/hda1 bs=512 count=1
 Note that if you do this on the MBR or an extended partition and you resized 
partitions in the meantime you will want to keep your partitiontable, so you 
will only want to write 446 bytes. Set your bs to this number. This is 
probably allright in any case, although I usually just use a blocksize of 512.
 If you forget to use any bs/count and the file you dd happens to be bigger 
than 446/512 bytes you will ruin your whole disk. Take care.
 I hope this is clear enough,

                                Good luck,

                                Leonard.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to