Use linux installation disc to start the machine. After that, you will be told that your linux partition is mounted to some mount point. Then use "chroot" to change your root directory to the mount point.
If you are using Lilo, you just run "lilo" to install lilo to mbr. For grub, it should have similar command to install grub to mbr. reboot the machine and you are all set.