Requirements : Grub problem system,Live CD of UBUNTU or any other live CD based on GNU/Linux.
first boot the live CD and start the terminal as root user
second run the command
than it will move to the grub prompt.
# find /boot/grub/stage1
it displays the output as list of partitions or single partition like (hd0,?)
fourth select the apropriate partition and set as
# root (hd0,?)
fifth now setup the harddisk as
# setup (hd0)
now exit from the grub prompt by running
reboot the system and enjoy!!..